NIRSTORM / QT-NIRS (detect bad channels) does not work

Hello everyone, i'm new on the NIRStorm plugin and Brainstorm and i have few problems that i will explain in future posts.

The first one i would like to adress is the usage of QT-NIRS in NIRStorm. When i use the process "NIRS --> Pre-process --> Detect Bad channels" to only keep channels with a SCI>75% and PSP>10%, none of my channels are removed.


However, if i use "NIRS --> Pre-process --> Scalp Coupling Index" and i take a look at "SCI" and "PSP", i can clearly see that a channel is below SCI threshold but not PSP.


But i thought that channels were removed when value of one of the parameters is not above threshold.
So, is this a bug or do i have to check for each of my participants ?

Thank you very much for the toolbox anyway !
Kind regards,
Brieuc

@edelaire, can your take a look?

1 Like

Hello,

Currently, i am tagging as bad channels the channels that have SCI < 75% and power < 10%.

Now that you mention it, it might indeed make sense to mark as bad channel if either SCI < 75% or power < 10%. Do you know what people from QT-nirs recommend ?

Note: You can see the code here : nirstorm/bst_plugin/preprocessing/process_nst_detect_bad.m at master ยท Nirstorm/nirstorm ยท GitHub


SCI_threshold = options.sci_threshold.Value{1};
SCI_channels = false(1,nb_chnnels);
SCI_channels(nirs_flags) = SCI < SCI_threshold ;
            
power_threshold =  options.power_threshold.Value{1};
power_channels = false(1,nb_chnnels);
power_channels(nirs_flags) = power < power_threshold 

channel_flags(SCI_channels & power_channels) = -1;

Note2: you can change channel_flags(SCI_channels & power_channels) = -1; to channel_flags(SCI_channels | power_channels) = -1;

to do what you suggested

HS: we call our software NIRSTORM; not NIRStorm :slight_smile:

It seems i got it wrong: qt-nirs/qtnirs.m at master ยท lpollonini/qt-nirs ยท GitHub. It should indeed be an OR instead of and.

It has been fixed here: fix the bad channel detection using QT by Edouard2laire ยท Pull Request #245 ยท Nirstorm/nirstorm ยท GitHub

You can update nirstorm and it should be working now. Thx for the bug repport.

Thank you very much for your very fast support !

See you soon :wink:
Brieuc

No problem.

A small note: i just realized you were using the option 'keep upaired channel' during the bad channel detection. We don't recomend using it as it means that for some channel you will keep only one wavelength and it might lead to issues with the MBLL.

Also, if one wavelength is not reliable, the other one is also often not trustworthy.

So i actually removed the option alltogether now. it was mainly here for test purpose.

1 Like

Hello Edouard, Ok thank for the tips, i did not know what this option was for but as it was used in the NIRS tutorial, i thought that it had to be checked.

I encountered a problem following the (very) nice update with QT-NIRS !
Now i have a feedback telling me that 2 channels are actually removed (both wavelengths for the channel) but i can't open the signal anymore after that. I have the error telling me that there is a mismatch between the original file and the "new" file :

Even if i can't open it, i can still Raw to Delta ---- Motion Correct ---- bandpass (and open further signals)

Have a great day !
Brieuc

i tried again on my side and it is working. i think reimporting the data fron zero after the update will solve the issue. Let me know.

Blockquote
Ok thank for the tips, i did not know what this option was for but as it was used in the NIRS tutoria

Which tutorial did you checked ? i am currently rewriting a new tutorial here:
https://neuroimage.usc.edu/brainstorm/Tutorials/NIRSTORM

it is still working in progress but feel free to check it out

Edouard

Hi Edouard !

I just tried and it works doing Bad channels tagging with SCI/PSP --> Raw to delta --> TDDR --> bdp --> OD to Hb :wink:

Which tutorial did you checked ? i am currently rewriting a new tutorial here:
https://neuroimage.usc.edu/brainstorm/Tutorials/NIRSTORM

I was going on the gihthub page, then clicking on Home ยท Nirstorm/nirstorm Wiki ยท GitHub and clicking on the tutorials https://neuroimage.usc.edu/brainstorm/Tutorials/NIRSFingerTapping

Ok nice thank you very much ! I will try it then, i did not see it :wink:

Brieuc