I have a quick question regarding reject criteria for fNIRS data. Our lab has been collecting data using auditory comprehension tasks consisting of 3 experimental conditions and 3 control conditions.
I have been simply following the codes and tutorials provided with our dataset to see how it works with our data. I became curious about reject criteria used in the example code. The reject criteria set to 80e-6 with a finger tapping dataset. Should I use the same criteria for our dataset? Can you tell me how you got to the reject criteria, 80e-6?
When I ran the code, it seems all epochs rejected. To me, it sounds like there’s no data that I can further explore. Did I understand it in a correct way?
the figure you posted indicates that more than 80% of your epochs were dropped because they were “too short”. This is extremely unusual – normally, epochs become “too short” if the trigger events one uses to create them occur too closely to the beginning or end of the recording, such that there’s simply not enough data to create these epochs. This commonly only affects a handful of epochs, if any. So what we’re seeing here is very odd.
Can you please share the code you’re using to create those epochs?
Also, please fill in the version of MNE-Python you’re using in the posting template (you can edit your posting).
Thank you for your response. I copied and pasted my codes below. I set the annotations and the look at the plots and information about the annotation in the data, which seems correct to me. FYI, I attached a plot that I got below.
I am a beginner of Python as well, and I don’t know how I can share the code more efficiently than this.
I assume this is simply too long. How long is your recording? Here, you’re trying to create epochs of 305 seconds (i.e., 5:05 min) duration. Are you absolutely sure that’s what you intended to do?
Maybe I misunderstood the function of tmin and tmax. I thought it would cover the entire recording of the task which is 6 min 6 seconds.
I have three experimental conditions taking 1 minute long, and three control conditions taking 35 seconds in one task/ An inter-stimulus interval of either 10 or 12 seconds occurs between story and reverse speech trials. Each run begins with 15 seconds of rest.
What number should I input here since the length of the conditions varies in our task. Lastly, should I still keep the reject criteria 80e-6? It would be greatly helpful to hear your opinion. Thank you!
I’m not sure exactly what the misunderstanding is, so here are a few points of clarification; hopefully one of them helps you:
Every epoch must be the same length. This is an integral feature of the Epochs data structure in MNE-Python. Usually the length is dictated by your analysis plan, e.g., for an evoked / event-related experimental paradigm, you might want to analyze 100ms pre-stimulus and 1000ms post-stimulus time, in which case every epoch would be 1100ms long.
The variable events decides where time=0 will be for each epoch.
tmin and tmax determine the start and end of each epoch relative to the t-zero times set by events. So in the example above in point (1), you would do tmin=0.1, tmax=1.0 (because they’re expressed in seconds, not milliseconds).
the peak-to-peak rejection criterion is highly data dependent and there is little general advice possible. For EEG, for example, the signal amplitude can depend on the hardware manufacturer, the subject’s hair length/thickness, how recently they showered, etc. You really just have to either (1) know what is typical for your system and population, or (2) look at your raw data, look at what the typical values are, take note of some obvious artifacts and how big their amplitudes are, and set the threshold at a level in between the typical peak values and the artifactual peak values.
@kim1208 Just in case it didn’t become absolutely clear through @drammock’s response: you don’t want to have an entire task in your epoch, but rather you want to create epochs around each individual “experimental event of interest” (e.g., stimulus onset, or stimulus offset, or response onset, …)
Also tagging @rob-luke, our fNIRS expert, who might be able to point you to some beginners’ resources or give some general advice.
Thanks @kim1208 for trying MNE with your fNIRS data.
I concur with the comments from @drammock and @richard. Specifically the reject criteria is highly dependent on the population and task, I usually aim to reject 5-10% of trials but that’s not based on any specific literature.
You can find additional fNIRS tutorials at Examples — MNE-NIRS 0.1.2-dev documentation but I encourage you to also read the MNE-Python documentation as concepts such as filtering, picking, epoching, etc are common across neuroimaging modalities.
Good luck and please let us know how you go and any other snags you hit,
Rob