simulariumio/trajectory_converter.py
def _check_type_matches_subpoints(
        type_name: str,
        n_subpoints: int,
        viz_type: float,
        display_data: DisplayData,
        debug_name: str = "",
    ) -> str:
        """
        If the agent has subpoints, check that it
        also has a display_type of "FIBER" and viz type of "FIBER", and vice versa.
        return a message saying what is inconsistent
        """
        has_subpoints = n_subpoints > 0
        msg = (
            f"Agent {debug_name}: Type {type_name} "
            + ("has" if has_subpoints else "does not have")
            + " subpoints and "
        )
        if has_subpoints != (viz_type == VIZ_TYPE.FIBER):
            return msg + f"viz type is {viz_type}"
        if type_name in display_data:
            display_type = display_data[type_name].display_type
            if display_type is not DISPLAY_TYPE.NONE and has_subpoints != (
                display_type == DISPLAY_TYPE.FIBER
            ):
                return msg + f"display type is {display_type}"
        return ""

        If the agent has subpoints, check that it
        also has a display_type of "FIBER" and viz type of "FIBER", and vice versa.
        return a message saying what is inconsistent
        
If the agent has subpoints, check that it
also has a display_type of "FIBER" and viz type of "FIBER", and vice versa.
return a message saying what is inconsistent
If the agent has subpoints check that it also has a display_type of " FIBER " and viz type of " FIBER " and vice versa . return a message saying what is inconsistent
def _check_type_matches_subpoints(
        type_name: str,
        n_subpoints: int,
        viz_type: float,
        display_data: DisplayData,
        debug_name: str = "",
    ) -> str:
        has_subpoints = n_subpoints > 0
        msg = (
            f"Agent {debug_name}: Type {type_name} "
            + ("has" if has_subpoints else "does not have")
            + " subpoints and "
        )
        if has_subpoints != (viz_type == VIZ_TYPE.FIBER):
            return msg + f"viz type is {viz_type}"
        if type_name in display_data:
            display_type = display_data[type_name].display_type
            if display_type is not DISPLAY_TYPE.NONE and has_subpoints != (
                display_type == DISPLAY_TYPE.FIBER
            ):
                return msg + f"display type is {display_type}"
        return ""
def _check_type_matches_subpoints ( type_name : str , n_subpoints : int , viz_type : float , display_data : DisplayData , debug_name : str = "" , ) -> str : has_subpoints = n_subpoints > 0 msg = ( f"Agent {debug_name}: Type {type_name} " + ( "has" if has_subpoints else "does not have" ) + " subpoints and " ) if has_subpoints != ( viz_type == VIZ_TYPE . FIBER ) : return msg + f"viz type is {viz_type}" if type_name in display_data : display_type = display_data [ type_name ] . display_type if display_type is not DISPLAY_TYPE . NONE and has_subpoints != ( display_type == DISPLAY_TYPE . FIBER ) : return msg + f"display type is {display_type}" return ""
If the agent has subpoints, check that it
also has a display_type of "FIBER" and viz type of "FIBER", and vice versa.
If the agent has subpoints check that it also has a display_type of " FIBER " and viz type of " FIBER " and vice versa .
"""
        If the agent has subpoints, check that it
        also has a display_type of "FIBER" and viz type of "FIBER", and vice versa.
        return a message saying what is inconsistent
        """
type_name
str
n_subpoints
int
viz_type
float
display_data
DisplayData
debug_name
str