extract_time_window {FastGaSP} | R Documentation |
Extract time window from particle data
Description
Extracts a specified time window from a particle.data object while preserving all relevant tracking information and parameters. Works with both simulation and experimental data.
Usage
extract_time_window(data_obj, first_frame, last_frame)
Arguments
data_obj |
An object of class |
first_frame |
Integer specifying the first frame to include (must be >= 1). |
last_frame |
Integer specifying the last frame to include (must be less than the total number of frames). |
Value
Returns a new particle.data
object containing:
- px_list, py_list
Position data for the selected time window
- vx_list, vy_list
Velocity data for the selected time window
- theta_list
Angle data if present in original object
- particle_tracking
Tracking information for the selected frames (experimental data)
- data_type
Original data type ("simulation" or "experiment")
- n_particles
Particle counts (constant for simulation, time series for experimental)
- T_time
Number of time steps in the extracted window
- model, sigma_0, radius
Original model parameters (for simulation data)
- D_y
Original dimension of the output space