Summary
Add a parameter to load_trajectory_from_txt that preserves columns beyond the standard id, frame, x, y instead of silently dropping them.
Background / Context
The txt loader currently uses usecols=[0, 1, 2, 3] in pd.read_csv, discarding any columns past the first four. Users who have extra data in their txt files (e.g. z, group id, or other per-agent attributes) lose it on load. Constructing TrajectoryData directly from a DataFrame already preserves extra columns, so the file-based loader is inconsistent with the direct construction path.
Technical Details
- Column selection happens in
_load_trajectory_data_from_txt via usecols=[0, 1, 2, 3] and names=[ID_COL, FRAME_COL, X_COL, Y_COL]
- The txt format has no column headers, so extra columns beyond the standard four have no names — the parameter should accept an optional mapping or list of names for those columns
TrajectoryData.__post_init__ already passes extra columns through unchanged, so no changes needed there
Acceptance Criteria
Summary
Add a parameter to
load_trajectory_from_txtthat preserves columns beyond the standardid,frame,x,yinstead of silently dropping them.Background / Context
The txt loader currently uses
usecols=[0, 1, 2, 3]inpd.read_csv, discarding any columns past the first four. Users who have extra data in their txt files (e.g.z, group id, or other per-agent attributes) lose it on load. ConstructingTrajectoryDatadirectly from a DataFrame already preserves extra columns, so the file-based loader is inconsistent with the direct construction path.Technical Details
_load_trajectory_data_from_txtviausecols=[0, 1, 2, 3]andnames=[ID_COL, FRAME_COL, X_COL, Y_COL]TrajectoryData.__post_init__already passes extra columns through unchanged, so no changes needed thereAcceptance Criteria
load_trajectory_from_txtaccepts a new optional parameter to preserve additional columnstraj.dataafter loading