get_consecutive_data: Extract consecutive time steps data from particle trajectories
Description
Extracts paired data from consecutive time steps for a specified variable in particle trajectory data. This function is particularly useful for experimental data, where it uses particle tracking information to maintain particle identity between frames.
A list of length T_time containing the data at each time step t.
end
A list of length T_time containing the corresponding data at time step t+1.
For each time t, start[[t]] and end[[t]] contain paired measurements for the same particles at consecutive time steps.
Arguments
data_obj
An object of class particle.data containing particle trajectory data.
variable
A character string specifying which variable to extract. Must be one of "vx" (x-velocity), "vy" (y-velocity), "px" (x-position), "py" (y-position), or "theta" (angle).