-
Notifications
You must be signed in to change notification settings - Fork 173
[export bids] Adds basic NIRS support #812
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
base: master
Are you sure you want to change the base?
Conversation
Adds initial support for NIRS (Near-Infrared Spectroscopy) data processing within the BIDS export functionality. This includes: - Recognizing NIRS data based on channel types. - Extracting NIRS-specific metadata (optode counts). - Creating 'nirs' subfolder and using '_nirs' suffix. - Exporting data to the SNIRF format. - Generating an optodes coordinate file. - Creating an events TSV file.
Adds functionality to export Brainstorm channel files in the BIDS _channels.tsv format, specifically tailored for NIRS data. This enhancement supports the BIDS standard for NIRS data organization.
Adds coordinate system information in json format for NIRS data (ScanRAS exclusively). Improved export channel option using export_channel, replacing 'out_channel_bids'.
- Adds section of code to generate the .tsv file by calling out_nirs_channel - Fixes detector labels (previously labelled 'S' instead of 'D') - Changes channel type to NIRSCWAMPLITUDE, a valid BIDS raw data type. Potential improvement in future to add other valid data types.
- out_nirs_channel header explanation now uses the correct fields - process_export_bids CreateMegJson has been working, no need for this note.
Hello @rcassani. I've worked with @Edouard2laire on this first version of the export bids function, making it work for NIRS data following the documentation of the BIDS team (https://bids-website.readthedocs.io/en/latest/datasets/examples.html). Let us know if you have any comments! |
|
||
%% Prepare coordinate structure | ||
coorddata = struct(); | ||
coorddata = addField(coorddata, 'NIRSCoordinateSystem', 'SCANRAS'); % Make sure it isnt CapRAS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This coordinate system doesnt seems valid for BIDS ? it is however, matching how we export the channel coordinate : export_channel(sInput.ChannelFile, bst_fullfile(megFolder, [prefix '_optodes.tsv']), 'BIDS-NIRS-SCANRAS-MM', 0);
any idea ?
- Checks datasettype is either 'raw' or 'derivative' - if not one of the two accepted values, defaults to 'raw' as per BIDS documentation and gives a warning.
- Adds 'FiducialsCoordinates' field with NAS, LPA, and RPA coordinates to coordsystem.json from ChannelMat.SCS - Sets other fiducials coordinate metadata fields in coordsystem.json
Hello @rcassani! We were wondering if you were able to give this pull a look. We are running into some issues and @Edouard2laire and I would like to schedule a meeting with you, if possible, to understand the coordinate system better. Thanks for your attention,
|
Hi @JBusgang, we could have a meeting next week to check this PR |
Perfect, I've set up a when2meet: https://www.when2meet.com/?31412184-lLPQb |
So let's say tuesday at 11am. |
hi @rcassani Did you had time to look at the PR yet ? let me kbnow if you need anything from us to move forward :) |
@Edouard2laire, @JBusgang, from the meeting we had I remember we agreed you'd check a couple of things on your side regarding the coordinate system. No changes would be done in that topic? |
i think you can start having a look. especially it would be very helpfulll if you could check the coordinate system issue. |
Adds initial support for NIRS (Near-Infrared Spectroscopy) data processing within the BIDS export functionality.
This includes: