You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Needed: automatically quit the loop whenever MRI sequence ends (ie. "no more trigger pulses"). I think procedure should be
default to TR_timeout=4 (seconds) in the beginning. Use TR_timeout as time out for waiting for an event.
after receiving two first consecutive triggers pulses -- take the temporal distance between them +50% as the next value of TR_timeout
quit the loop whenever timing out of TR_timeout
close log file and get to the top of the loop to wait for the next MRI sequence.
when video card is disconnected -- quit the inner loop as likely would not be able to show anything since external display would be gone
May be that external loop should be coded completely separately into e.g. tools/reprostim-timesync-stimuli-cron and then drive the internal one (reprostim-timesync-stimuli) collecting samples for MRI sequences with already present/connected display.
The text was updated successfully, but these errors were encountered:
sequenceDiagram
Researcher->>+Magewell: Connect cable
Researcher-->>+MRI: Gets ready for new run (new sequence e.g. func_task-finger_run-1)
Researcher-->>+Magewell: Gets ready for new run (future: "displays start QR")
MRI->>+Birch: Trigger pulse
Birch->>+Researcher: Trigger pulse (5 via keyboard-like interface, USB)
MRI->>+Birch: Trigger pulse (after TR1)
Birch->>+Researcher: Trigger pulse (5)
Researcher-->>+Magewell: Starts the experimental stimuli protocol
MRI->>+Birch: Trigger pulse (after 2*TR1)
Birch->>+Researcher: Trigger pulse (5)
MRI->>+Birch: Trigger pulse (after 3*TR1)
Birch->>+Researcher: Trigger pulse (5)
Researcher-->>+Magewell: Displays stimuli asking for response
Participan->>+Birch: Response
Birch->>+Researcher: Response (1)
MRI->>+Birch: Trigger pulse (after 4*TR1)
Birch->>+Researcher: Trigger pulse
Researcher-->>+Magewell: Displays stimuli asking for response
Participan->>+Birch: Response
Birch->>+Researcher: Response (1)
Researcher-->>+Magewell: Ends the run (future: "displays end QR")
Researcher-->>+MRI: Gets ready for new run (new sequence e.g. func_task-rest_run-2)
Researcher-->>+Magewell: Gets ready for new run (future: "displays start QR")
MRI->>+Birch: Trigger pulse
Birch->>+Researcher: Trigger pulse (5)
MRI->>+Birch: Trigger pulse (after TR2)
Birch->>+Researcher: Trigger pulse (5)
MRI->>+Birch: Trigger pulse (after 2*TR2)
Birch->>+Researcher: Trigger pulse (5)
MRI->>+Birch: Trigger pulse (after 3*TR2)
Birch->>+Researcher: Trigger pulse (5)
MRI->>+Birch: Trigger pulse (after 4*TR2)
Birch->>+Researcher: Trigger pulse (5)
Researcher-->>+Magewell: Ends the run (future: "displays end QR")
Researcher->>+Magewell: Disconnect cable
Loading
As discussed, potentially
could be a single log file/sequence across all runs for the same "attached video cable" and then we would "split them apart" outside.
it would be outside script which would monitor for VGA cable connect/disconnect and start/stop the sreprostim-timesync-stimuli script "gracefully" (so we do have all logs saved).
Part of the solution for
That script should have two loops:
ntrials
hardcoded to run 300 (IIRC) times and exits only when receives eventq
(from keyboard)TR_timeout=4
(seconds) in the beginning. UseTR_timeout
as time out for waiting for an event.TR_timeout
TR_timeout
May be that external loop should be coded completely separately into e.g.
tools/reprostim-timesync-stimuli-cron
and then drive the internal one (reprostim-timesync-stimuli
) collecting samples for MRI sequences with already present/connected display.The text was updated successfully, but these errors were encountered: