mne_bids.physio.write_eyetrack_calibration#

mne_bids.physio.write_eyetrack_calibration(bids_path: BIDSPath, calibrations: Calibration | list[Calibration]) list[Path][source]#

Write eyetrack calibration metadata into an existing *_physio.json sidecar.

Parameters:
bids_pathmne_bids.BIDSPath

BIDSPath for the eyetracking recording. The BIDSPath should point to a modality directory (e.g. beh or eeg) that contains <match>_physio.json file(s). If the BIDSPath contains a recording entity (e.g. eye1), it will be ignored (see the notes section).

calibrationsCalibrationObject | list of CalibrationObject

Calibration instance(s) (e.g., an item returned by read_eyelink_calibration()). Each instance must expose an eye attribute with value "left" or "right".

Returns:
Updated sidecar filepathslist of pathlib.Path

A list of filepaths pointing to the <match>_physio.json sidecar files that were updated with calibration information.

Notes

This function routes calibration metadata to the correct per-eye physio sidecar(s):

  • Binocular recordings: left eye -> <match>_recording-eye1_physio.json, right eye -> <match>_recording-eye2_physio.json

  • Monocular recordings: whichever eye was recorded -> <match>_recording-eye1_physio.json

If more than one calibration was run on the participant, this function will write the last calibration in the sequence passed to the calibrations parameter.

See The Eyetracking BIDS specification.