Is anyone able to provide insight into why my HRF values are exporting like this (attached)? There seems to be missing data. I'm not very experienced in exporting HRF, but I don't believe my previous exports have looked like this, and I'm not sure how to troubleshoot. Any help is appreciated!
Thanks in advance,
Looks like you are talking about the NaN (not a number) appearing for many of your channels.
Without looking at this in detail, my first guess would be that those channels were excluded from calculating the HRF. Did they get pruned somehow... perhaps by hmrR_PruneChannels? Or did motion reject all the trials for that condition?
I didn't do any pruning and I am getting the same NaN result with the motion correction functions off. What is weird is I successfully exported the HRF for a subject a few months back and did not have this problem (that data is in the excel doc attached). I just can't figure out what is different between the first and second time I exported the results. I tried different subjects, turned off the motion correction, I even re-exported the original raw data from oxysoft. I am kind of stumped, but also inexperienced so it may be something I am doing wrong that is causing the error. Would there be another reason causing NaN to result?
I was only able to include one attachment, but let me know if you need more from me.
Thanks in advance,
Nicollette, do you have negative values in your raw intensity signal? That may result in NaN.
I have seen this in one of the fnirs group members and replied as:
"The bandpass function expects all elements (time points) of the data to be finite. The OD input from your data has some “Inf” elements. That is why you are getting this error. And the Inf elements result from the negative values in raw intensity signal (d). One quick fix would be to add a dc offset to all your raw signal to get rid of any negative values. This should not affect your results as you would be looking at changes. Then the filter should work just fine. You can also check with the nirs company, regarding why the system outputs “negative intensity”."
We should modify the hmrR_Intensity2OD function to produce a warning about negative values if they appear.
It can be a choice menu asking if they should be ignored, set to a small positive number, or an offset added to all the data to raise it to a small positive number. What do you think? Add it to the to do list?