Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template versus True digitization data #264

Open
sappelhoff opened this issue Aug 23, 2019 · 2 comments
Open

Template versus True digitization data #264

sappelhoff opened this issue Aug 23, 2019 · 2 comments

Comments

@sappelhoff
Copy link
Member

sappelhoff commented Aug 23, 2019

related to #89 and #263

In BIDS, we should not write template data, such as position/digitization data from electrodes.

In our last call @agramfort @jasmainak @massich and I agreed to deal with this in the following way:

  • add a non-defaulting, boolean parameter dig_is_template where users MUST indicate in MNE-BIDS, whether the raw object they are passing to write_raw_bids contains template or true data
    • if dig_is_template == True ... we do NOT write electrodes.tsv and coordsystem.json
    • else ... we write it as Neuromag/Elekta coordinates (="head") if available
    • if "head" is not available, we do not write
  • within write_raw_bids, and IF dig_is_template ==False ... make a check to see if raw.info['dig'] fits on a sphere
    • if it does, that's an indication, that we have template data ... so put out a warning
  • In any case, we ALWAYS write our position data in "Elekta/Neuromag" coordinate frame (="head" in mne-python)
    • it might be possible that the raw data file had some digitization / position data inherently saved in the raw data format --> and that this data was not in the "head" coordinate frame
    • in that case --- we have to live with the fact that there are two different representations of the same digitization data (one in the raw data files, one in electrodes.tsv ... but most likely both in different coordinate frames)
    • however, this case should be rare in EEG data (only in .set/.fdt and potentially .vhdr/.vmrk/.eeg)
@jasmainak
Copy link
Member

so bottom line is we need a new param dig_is_template and transform to head coordinates before writing to BIDS?

@sappelhoff
Copy link
Member Author

yes, and potentially checking if points fit on a sphere ... and IF they do, send a warning that we probably deal with template data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants