convert_to_simularium_objects#
- convert_to_simularium_objects(series_key: str, simulation_type: str, categories: DataFrame, regions: list[str], frame_spec: tuple[int, int, int], box: tuple[int, int, int], ds: tuple[float, float, float], dt: float, colors: dict[str, str], group_size: int, url: str, jitter: float = 1.0) str [source]#
Convert data to Simularium trajectory using mesh objects.
- Parameters:
series_key – Simulation series key.
simulation_type ({'potts'}) – Simulation type.
categories – Simulation data containing ID, FRAME, and CATEGORY.
regions – List of regions.
frame_spec – Specification for simulation ticks.
box – Size of bounding box.
ds – Spatial scaling in um/voxel.
dt – Temporal scaling in hours/tick.
colors – Map of category to colors.
group_size – Number of objects in each mesh group.
url – URL for mesh object files.
jitter – Relative jitter applied to colors (set to 0 for exact colors).
- Returns:
Simularium trajectory.
- format_potts_for_objects(categories: DataFrame, frames: list[int], group_size: int, regions: list[str], length: int, width: int, height: int) DataFrame [source]#
Format
potts
simulation data for object-based Simularium trajectory.- Parameters:
categories – Simulation data containing ID, FRAME, and CATEGORY.
frames – List of frames.
group_size – Number of objects in each mesh group.
regions – List of regions.
length – Length of bounding box.
width – Width of bounding box.
height – Height of bounding box.
- Returns:
Data formatted for trajectory.