Exportation module#

pyneon.export.export_motion_bids(rec: NeonRecording, motion_dir: str | Path, prefix: str = '', 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 (NeonRecording) – 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-XX_task-YY_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> and {prefix}_channels.tsv.

  • 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

pyneon.export.exports_eye_bids(rec: NeonRecording, output_dir: str | Path)#