Set up reject criteria in fNIRs preprocessing

Hello,

I have a question of using the reject_criteria in fNIRs preprocessing.

The MNE documentation says reject_criteria = dict(hbo=80e-6) sets the maximum acceptable peak-to-peak amplitudes for each channel type in an epoch.

My questions, can I set the reject criteria in terms of absolute peak value instead of peak-to-peak value? For example, reject epochs has peak higher than 80 or lower than -80? Thank you.

  • MNE version: 1.3.1
  • operating system: Windows 11

Hello,

I think the simplest is to annotate programmatically segments which exceed your thresholds with a “bad_amplitude” annotation. Then when creating your epochs, set reject_by_annotation=True and epochs which partially overlaps those bad annotation will be dropped.

You can have a look at the code of annotate_amplitude: mne-python/mne/preprocessing/annotate_amplitude.py at main · mne-tools/mne-python · GitHub
IIRC It’s annotating based on PTP as well, but maybe you can adapt it to your need with an absolute peak amplitude.

Mathieu

1 Like

Hi,

I have a related question to the annotation of bad channels and segments for glm analysis. As far as I understand bad channels and segments will automatically rejected for Epoching, but the glm_run() function does not allow any argument like “reject_by_annotation” to explicitly exclude bad channels.

I use this code to disregard bad channels for the results:

glm_est = run_glm(raw_haemo.copy().pick(‘fnirs’,exclude=‘bads’), design_matrix, noise_model = ‘ar5’)

but I am not sure if there is a way to also disregard bad segments in the glm as identified by the peak_power() function? Are these annotations automatically passed to the glm function or would I manually need to crop the data which might mess up the regressors?

mne nirs version: 0.7.1, operating system: windows 11

Alina