Open adam2392 opened 3 years ago
as you read raw files without preload doing raw.get_montage() seem acceptable no?
I would like to revive this discussion if possible. In some clinical workflows for iEEG, one might not have an existing EEG-data file yet, when they would like to localize the electrode coordinates. E.g.
electrodes.tsv
and coordsystem.json
files that will end up working with MNE-python/mne-bids, but without the need to use read_raw_bids
. electrodes.tsv
and coordsystem.json
files are already ready to be used.The following could use some iterating probably. For sake of an example:
def read_dig_bids(elecs_fname, coordsystem_fname):
# creates a DigMontage from the read in files that are supposedly BIDS-compliant and handles error/warning checks
and
def write_electrodes_tsv(name, x, y, z, size=None, impedance=None, **kwargs):
# writes the electrodes.tsv file
def write_coordsystem_json(
# writes the coordsystem.json file
Describe the problem
I was reading in some dataset and wanted to read in the montage again later, but without reading in the whole raw file. However, that is not possible right now.
Describe your solution
Outside of
read_raw_bids
, it would be nice to be able to have a public API forread_montage_bids
or something that gets the electrode coordinates and other data (e.g. impedance) and returns aDigMontage
, or a dictionary of coordinate points(?)Describe possible alternatives
I suppose, I could always just run
read_raw_bids
again and doraw.get_montage()
, but that seems extra to me.Additional context
Idk if this is possible for MEG, since I don't work w/ it (yet), but they have a coordsystem.json at least.