simulariumio/data_objects/trajectory_data.py
def from_buffer_data(cls, buffer_data: Dict[str, Any]):
        """
        Create TrajectoryData from a simularium JSON dict containing buffers
        """
        return cls(
            meta_data=MetaData.from_buffer_data(buffer_data),
            agent_data=AgentData.from_buffer_data(buffer_data),
            time_units=UnitData(
                buffer_data["trajectoryInfo"]["timeUnits"]["name"],
                float(buffer_data["trajectoryInfo"]["timeUnits"]["magnitude"]),
            ),
            spatial_units=UnitData(
                buffer_data["trajectoryInfo"]["spatialUnits"]["name"],
                float(buffer_data["trajectoryInfo"]["spatialUnits"]["magnitude"]),
            ),
            plots=buffer_data["plotData"]["data"],
        )

        Create TrajectoryData from a simularium JSON dict containing buffers
        
Create TrajectoryData from a simularium JSON dict containing buffers
Create TrajectoryData from a simularium JSON dict containing buffers
def from_buffer_data(cls, buffer_data: Dict[str, Any]):
        return cls(
            meta_data=MetaData.from_buffer_data(buffer_data),
            agent_data=AgentData.from_buffer_data(buffer_data),
            time_units=UnitData(
                buffer_data["trajectoryInfo"]["timeUnits"]["name"],
                float(buffer_data["trajectoryInfo"]["timeUnits"]["magnitude"]),
            ),
            spatial_units=UnitData(
                buffer_data["trajectoryInfo"]["spatialUnits"]["name"],
                float(buffer_data["trajectoryInfo"]["spatialUnits"]["magnitude"]),
            ),
            plots=buffer_data["plotData"]["data"],
        )
def from_buffer_data ( cls , buffer_data : Dict [ str , Any ] ) : return cls ( meta_data = MetaData . from_buffer_data ( buffer_data ) , agent_data = AgentData . from_buffer_data ( buffer_data ) , time_units = UnitData ( buffer_data [ "trajectoryInfo" ] [ "timeUnits" ] [ "name" ] , float ( buffer_data [ "trajectoryInfo" ] [ "timeUnits" ] [ "magnitude" ] ) , ) , spatial_units = UnitData ( buffer_data [ "trajectoryInfo" ] [ "spatialUnits" ] [ "name" ] , float ( buffer_data [ "trajectoryInfo" ] [ "spatialUnits" ] [ "magnitude" ] ) , ) , plots = buffer_data [ "plotData" ] [ "data" ] , )
Create TrajectoryData from a simularium JSON dict containing buffers
Create TrajectoryData from a simularium JSON dict containing buffers
"""
        Create TrajectoryData from a simularium JSON dict containing buffers
        """
cls
buffer_data
Dict[str, Any]