-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for segmentation with continuous trigger #474
Comments
I would be curious to hear some feedback on that. I've taken a closer look to the code, and I think it would be fairly straightforward to change the So maybe something like:
Would that work ? Not sure if everything should go in the |
@tsalo didn't you try to implement something similar back in the days? |
(It is trick-able in the sense that you can have a train of 1-trigger runs with TR equivalent to the full span of the trigger, but it's true that we do not have a way to deal with continuous triggers) |
Just to make sure, @smoia do you think it would work to segment runs with continuous trigger by given to the tr parameters a list containing the duration (in seconds) of the runs, and for the number of expected timepoints to be 1 for each run ? |
Absolutely yes - we've been doing that. However, I do see the appeal to capture automatically when the trigger ends so that the program can guess the run duration. Incidentally, the same code could even detect a group of triggers and decide how to divide runs based on adjacent trigger distances |
I did have something to work with this kind of trigger, but in my case it was exacerbated by the fact that the trigger sometimes wasn't disabled at the end of a run or enabled at the start of a run, so I had to align times of runs from the BOLD DICOMs against the timing of the starts of trigger blocks that were present. While I did have a working branch that implemented it (and it's what I used for the physio data in this dataset), I doubt that it's worth incorporating into phys2bids proper. |
Detailed Description
It would be nice to be able to segment runs that are defined by a continuous trigger (see last channel in the figure below). It that case, when the run starts, the value of that channel changes from 0 to 5, and when it ends, it changes from 5 to 0. It would thus be useful if, to be able to segment the physiological signals from when the value of the trigger channel initial change to the point where it change again to 0.
Context / Motivation
Currently there is no support (?) for segmenting runs from recordings containing continuous trigger (ex. physio recordings not acquired with fMRI).
Possible Implementation
If value of
tr
argument isFalse
, compute the gradient on the trigger channel to find the start/end of the runs. The number of expected timepoints could be based on the expected duration (number of expected timepoints = expected duration * sampling rate) of the run instead of the number of expected triggers. The functioncheck_trigger_amount
inphysio_obj.py
could be changed accordingly. That function will have to be called inslice4phys.py
if tr is False.The text was updated successfully, but these errors were encountered: