simulariumio/medyan/medyan_converter.py
def _read(input_data: MedyanData) -> TrajectoryData:
        """
        Return an object containing the data shaped for Simularium format
        """
        print("Reading MEDYAN Data -------------")
        agent_data = MedyanConverter._get_trajectory_data(input_data)
        # get display data (geometry and color)
        for object_type in input_data.display_data:
            for tid in input_data.display_data[object_type]:
                display_data = input_data.display_data[object_type][tid]
                if (
                    display_data.display_type != DISPLAY_TYPE.NONE
                    and display_data.display_type != DISPLAY_TYPE.FIBER
                ):
                    display_data.display_type = DISPLAY_TYPE.FIBER
                    print(
                        f"{display_data.name} display type of "
                        f"{display_data.display_type.value} was changed to FIBER"
                    )
                agent_data.display_data[display_data.name] = display_data
        input_data.meta_data._set_box_size()
        return TrajectoryData(
            meta_data=input_data.meta_data,
            agent_data=agent_data,
            time_units=UnitData("s"),
            spatial_units=UnitData("nm", 1.0 / input_data.meta_data.scale_factor),
            plots=input_data.plots,
        )

        Return an object containing the data shaped for Simularium format
        
Return an object containing the data shaped for Simularium format
Return an object containing the data shaped for Simularium format
def _read(input_data: MedyanData) -> TrajectoryData:
        print("Reading MEDYAN Data -------------")
        agent_data = MedyanConverter._get_trajectory_data(input_data)
        for object_type in input_data.display_data:
            for tid in input_data.display_data[object_type]:
                display_data = input_data.display_data[object_type][tid]
                if (
                    display_data.display_type != DISPLAY_TYPE.NONE
                    and display_data.display_type != DISPLAY_TYPE.FIBER
                ):
                    display_data.display_type = DISPLAY_TYPE.FIBER
                    print(
                        f"{display_data.name} display type of "
                        f"{display_data.display_type.value} was changed to FIBER"
                    )
                agent_data.display_data[display_data.name] = display_data
        input_data.meta_data._set_box_size()
        return TrajectoryData(
            meta_data=input_data.meta_data,
            agent_data=agent_data,
            time_units=UnitData("s"),
            spatial_units=UnitData("nm", 1.0 / input_data.meta_data.scale_factor),
            plots=input_data.plots,
        )
def _read ( input_data : MedyanData ) -> TrajectoryData : print ( "Reading MEDYAN Data -------------" ) agent_data = MedyanConverter . _get_trajectory_data ( input_data ) for object_type in input_data . display_data : for tid in input_data . display_data [ object_type ] : display_data = input_data . display_data [ object_type ] [ tid ] if ( display_data . display_type != DISPLAY_TYPE . NONE and display_data . display_type != DISPLAY_TYPE . FIBER ) : display_data . display_type = DISPLAY_TYPE . FIBER print ( f"{display_data.name} display type of " f"{display_data.display_type.value} was changed to FIBER" ) agent_data . display_data [ display_data . name ] = display_data input_data . meta_data . _set_box_size ( ) return TrajectoryData ( meta_data = input_data . meta_data , agent_data = agent_data , time_units = UnitData ( "s" ) , spatial_units = UnitData ( "nm" , 1.0 / input_data . meta_data . scale_factor ) , plots = input_data . plots , )
Return an object containing the data shaped for Simularium format
Return an object containing the data shaped for Simularium format
"""
        Return an object containing the data shaped for Simularium format
        """ # get display data (geometry and color)
input_data
MedyanData