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.jsonsidecar.- Parameters:
- bids_path
mne_bids.BIDSPath BIDSPath for the eyetracking recording. The BIDSPath should point to a modality directory (e.g.
behoreeg) that contains<match>_physio.jsonfile(s). If the BIDSPath contains arecordingentity (e.g.eye1), it will be ignored (see the notes section).- calibrations
CalibrationObject|listofCalibrationObject Calibration instance(s) (e.g., an item returned by
read_eyelink_calibration()). Each instance must expose aneyeattribute with value"left"or"right".
- bids_path
- Returns:
- Updated sidecar filepaths
listofpathlib.Path A list of filepaths pointing to the
<match>_physio.jsonsidecar files that were updated with calibration information.
- Updated sidecar filepaths
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.jsonMonocular 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
calibrationsparameter.