Skip to content

TrajectoryResult

TrajectoryResult

Contains the complete tracking trajectory for a single particle.

Attributes:

Name Type Description
particle_id int

The id supplied in the corresponding ParticleStart.

final_status str

Short string tag for the terminal state, e.g. "captured_well", "exited_domain", "max_steps".

termination_reason str

Human-readable description of why tracking stopped.

particle_id instance-attribute

particle_id: int

final_status instance-attribute

final_status: str

termination_reason instance-attribute

termination_reason: str

to_records

to_records() -> List[Dict[str, Any]]

Convert the trajectory to a list of per-step record dicts.

Each record contains the keys t, x, y, z, cell_id, and dt. The list can be passed directly to pandas.DataFrame(result.to_records()).

Returns:

Type Description
List[Dict[str, Any]]

A list of dicts, one per recorded trajectory step.

__len__

__len__() -> int

Return the number of recorded trajectory steps.