Exportation module#
- pyneon.export.export_motion_bids(rec: Recording, motion_dir: str | Path, prefix: str | None = None, extra_metadata: dict = {})#
Export IMU data to Motion-BIDS format. Continuous samples are saved to a .tsv file and metadata (with template fields) are saved to a .json file. Users should later edit the metadata file according to the experiment to make it BIDS-compliant.
- Parameters:
rec (Recording) – Recording object containing the IMU data.
motion_dir (str or pathlib.Path) – Output directory to save the Motion-BIDS formatted data.
prefix (str, optional) – Prefix for the BIDS filenames, by default “sub-
wearer_name``_task-XXX_tracksys-NeonIMU". The format should be "sub-<label>[_ses-<label>]_task-<label>_tracksys-<label>[_acq-<label>][_run-<index>]" (Fields in [] are optional). Files will be saved as ``{prefix}_motion.<tsv|json>
.extra_metadata (dict, optional) – Additional metadata to include in the JSON file. Defaults to an empty dict.
Notes
Motion-BIDS is an extension to the Brain Imaging Data Structure (BIDS) to standardize the organization of motion data for reproducible research [1]. For more information, see https://bids-specification.readthedocs.io/en/stable/modality-specific-files/motion.html.
References