simulariumio/trajectory_converter.py
def _check_types_match_subpoints(trajectory_data: TrajectoryData) -> str:
        """
        For each frame, check that agents that have subpoints
        also have a display_type of "FIBER" and viz type of "FIBER", and vice versa.
        return a message with the type name of the first agent that is inconsistent
        """
        n_subpoints = trajectory_data.agent_data.n_subpoints
        display_data = trajectory_data.agent_data.display_data
        for time_index in range(n_subpoints.shape[0]):
            for agent_index in range(
                int(trajectory_data.agent_data.n_agents[time_index])
            ):
                inconsistent_type = TrajectoryConverter._check_type_matches_subpoints(
                    trajectory_data.agent_data.types[time_index][agent_index],
                    n_subpoints[time_index][agent_index],
                    trajectory_data.agent_data.viz_types[time_index][agent_index],
                    display_data,
                    f"at index Time = {time_index}, Agent = {agent_index}",
                )
                if inconsistent_type:
                    return inconsistent_type
        return ""

        For each frame, check that agents that have subpoints
        also have a display_type of "FIBER" and viz type of "FIBER", and vice versa.
        return a message with the type name of the first agent that is inconsistent
        
For each frame, check that agents that have subpoints
also have a display_type of "FIBER" and viz type of "FIBER", and vice versa.
return a message with the type name of the first agent that is inconsistent
For each frame check that agents that have subpoints also have a display_type of " FIBER " and viz type of " FIBER " and vice versa . return a message with the type name of the first agent that is inconsistent
def _check_types_match_subpoints(trajectory_data: TrajectoryData) -> str:
        n_subpoints = trajectory_data.agent_data.n_subpoints
        display_data = trajectory_data.agent_data.display_data
        for time_index in range(n_subpoints.shape[0]):
            for agent_index in range(
                int(trajectory_data.agent_data.n_agents[time_index])
            ):
                inconsistent_type = TrajectoryConverter._check_type_matches_subpoints(
                    trajectory_data.agent_data.types[time_index][agent_index],
                    n_subpoints[time_index][agent_index],
                    trajectory_data.agent_data.viz_types[time_index][agent_index],
                    display_data,
                    f"at index Time = {time_index}, Agent = {agent_index}",
                )
                if inconsistent_type:
                    return inconsistent_type
        return ""
def _check_types_match_subpoints ( trajectory_data : TrajectoryData ) -> str : n_subpoints = trajectory_data . agent_data . n_subpoints display_data = trajectory_data . agent_data . display_data for time_index in range ( n_subpoints . shape [ 0 ] ) : for agent_index in range ( int ( trajectory_data . agent_data . n_agents [ time_index ] ) ) : inconsistent_type = TrajectoryConverter . _check_type_matches_subpoints ( trajectory_data . agent_data . types [ time_index ] [ agent_index ] , n_subpoints [ time_index ] [ agent_index ] , trajectory_data . agent_data . viz_types [ time_index ] [ agent_index ] , display_data , f"at index Time = {time_index}, Agent = {agent_index}" , ) if inconsistent_type : return inconsistent_type return ""
For each frame, check that agents that have subpoints
also have a display_type of "FIBER" and viz type of "FIBER", and vice versa.
For each frame check that agents that have subpoints also have a display_type of " FIBER " and viz type of " FIBER " and vice versa .
"""
        For each frame, check that agents that have subpoints
        also have a display_type of "FIBER" and viz type of "FIBER", and vice versa.
        return a message with the type name of the first agent that is inconsistent
        """
trajectory_data
TrajectoryData