JulieTremblay3/LIONirs

Trigger information issue

Opened this issue · 6 comments

Hi,
First, thank you very much for this toolbox which appears to be very complete and easy to use.

As for our experiment, we have recorded fNIRS continuously where different conditions (of different durations) were tested (please see design below). However, I am having some trouble including the trigger information to my design and especially during the estimation of the HRF. I am not sure what to enter as "trigger onset" and "duration" in "Create AUX" step ? When I enter only the duration of the first condition, the HRF is obviously wrong (see below) .. I tried also to enter the onset and duration of each condition but I got an error:
Failed 'Create AUX'
Error using vertcat
Dimensions of arrays being concatenated are not consistent.
In file "C:\MATLAB\R2020a\toolbox\spm12\toolbox\LIONirs\nirs_run_createAUXauto.m" (???), function "nirs_run_createAUXauto" at line 119.

I an not sure if I am using the trigger information correctly ? I also include the "manualtrigger" info in a note file, that I modified to try to match my experiment.

Thank you in advance for your help,
Best,
Nabila
ManualTrig.txt

image

Thanks for reporting this issue. It seems that your trigs are imported correctly. However, the function Create AUX seems to model the HRF out of the range of your data. Look at the 'duration' entered for the HRF model to avoid exceeding the NIRS data set. The HRF is modeled according to the parameters define and the duration following each trigger.
Best
image

Thanks for the quick reply.
What does the "Duration" represents exactly ? In the example you provided, it represents the duration of the task, but in my case the NIRS file contains different conditions, each are different and have different durations .. I am not sure what value I need to enter then ?
Thank you, Best,

You could try the new option 'XLS onset file' which use a custom timing define in an xls file to adapt your model with a different duration.
image

Best !
Julie

If you update the version you must have the new option. But to be selected, you have to be on the branch ‘Choose AUX to generate’ and select below ‘HRF Xlsx onset’. The option is available below only if you are on the good branch 'Choose AUX To generate' to be able to select it. If you don't have access to Xlsx it could also be a text file delimited by tabs or spaces.
OptionHRF
Best
Julie

Yes my bad, I did not have the lastest version of the toolbox. It works better now.

Thank you for you help,
Best,
Nabila