simulariumio/filters/multiply_space_filter.py
def apply(self, data: TrajectoryData) -> TrajectoryData:
        """
        Multiply spatial values in the data
        """
        print(
            f"Filtering: multiplying spatial scale by {self.multiplier} -------------"
        )
        data.meta_data.box_size = self.multiplier * data.meta_data.box_size
        data.agent_data.positions = self.multiplier * data.agent_data.positions
        data.agent_data.radii = self.multiplier * data.agent_data.radii
        data.agent_data.subpoints = self.multiplier * data.agent_data.subpoints
        data.spatial_units.multiply(1.0 / self.multiplier)
        return data

        Multiply spatial values in the data
        
Multiply spatial values in the data
Multiply spatial values in the data
def apply(self, data: TrajectoryData) -> TrajectoryData:
        print(
            f"Filtering: multiplying spatial scale by {self.multiplier} -------------"
        )
        data.meta_data.box_size = self.multiplier * data.meta_data.box_size
        data.agent_data.positions = self.multiplier * data.agent_data.positions
        data.agent_data.radii = self.multiplier * data.agent_data.radii
        data.agent_data.subpoints = self.multiplier * data.agent_data.subpoints
        data.spatial_units.multiply(1.0 / self.multiplier)
        return data
def apply ( self , data : TrajectoryData ) -> TrajectoryData : print ( f"Filtering: multiplying spatial scale by {self.multiplier} -------------" ) data . meta_data . box_size = self . multiplier * data . meta_data . box_size data . agent_data . positions = self . multiplier * data . agent_data . positions data . agent_data . radii = self . multiplier * data . agent_data . radii data . agent_data . subpoints = self . multiplier * data . agent_data . subpoints data . spatial_units . multiply ( 1.0 / self . multiplier ) return data
Multiply spatial values in the data
Multiply spatial values in the data
"""
        Multiply spatial values in the data
        """
self
data
TrajectoryData