seek_localize.label_elecs_anat

seek_localize.label_elecs_anat(bids_path: mne_bids.path.BIDSPath, img_fname: Union[str, pathlib.Path], fs_lut_fpath: Union[str, pathlib.Path], verbose: bool = True, **kwargs)[source]

Label electrode anatomical location based on an annotated image volume.

Parameters
bids_pathBIDSPath

The BIDS path constructed using mne_bids.BIDSPath() that leads to the *electrodes.tsv file.

img_fnamestr | pathlib.Path

The file path for the image volume. Must be a Nifti file.

fs_lut_fpathstr | pathlib.Path

The file path for the FreeSurferColorLUT.txt file.

verbosebool

Verbosity.

kwargsdict

Keyword arguments to be passed to seek_localize.convert_elec_coords().

Returns
elecs_dfpd.DataFrame

DataFrame for electrodes.tsv file. If you would like to save it to disc. Suggested code

elecs_df.to_csv(bids_path, sep=’ ‘, index=None)