translationalneuromodeling / tapas

TAPAS - Translational Algorithms for Psychiatry-Advancing Science
https://translationalneuromodeling.github.io/tapas/
GNU General Public License v3.0
216 stars 89 forks source link

How to determine certain PhysIO parameters for Philips scanphyslog #273

Open Jothi-Ni opened 1 month ago

Jothi-Ni commented 1 month ago

Dear Lars,

I am trying to use the PhysIO toolbox for my Philips scanphyslog files and I am not sure whether I entered the correct values for some of the required parameters:

Some information on my own setup:

-This is the figure created, when I run PhysIO with my values: image

Thank you,

Jothini

mrikasper commented 2 weeks ago

Dear Jothini,

Thank you so much for the detailed description of your question and for trying out the PhysIO Toolbox. Let me try to anwer your questions inline below

  • log_file.log_scan_timing: Do I need to add the same scanphyslog.log file as I entered for log_cardiac and log_respiration?

Yes. For Philips, this information is all in one file.

  • log_files.relative_start_acquisition: The Philips log files do contain a marker column, where the value 0010 indicates the start of the MRI scan. In order to calculate the relative_start_acquisition I determined the number of measurements at which the starter marker occured (e.g. in the 29967 th line) and I calculate 29967/sampling rate=29967/496Hz=60.42 s in order to get the start of the MRI acquisition relative to the start of the scanphyslog file in seconds. Is that the correct approach or does PhysIO automatically recognize the 0010 start marker in the log file? Because later when PhysIO runs, it says "tmin (1st scan start (1st dummy))= 86.42 s" in the command window, even though I specified a start_aquisition of 60.42 seconds.

I haven't scanned on a Philips system in the last 5 years, but did so for more than 10 years before that. In all that time, I never got to understand what the start and stop marker really mean in the logfile. They never quite aligned with the start of the first imaging volume or end of the last one - maybe they have fixed that in the meantime, but if not, I would suggest that you just leave this field at 0 and let PhysIO try to figure out the scan synchronization from the gradient timecourses.

  • log_files.align_scan: The description says "align the last scan to the end of the logfile". However, in the case of Philips, there is again a dedicated stop marker in the log file (value of 0020 in the marker column) which usually appears few seconds before the actual physlog file ends. Wouldn't there be a small mismatch then or should I remove those last lines of physiological data points after the end of the MRI scan from my scanphyslog file in the first place?

No, you don't have to edit your logfiles. It should work out of the box. The reason I recommend aligning to the last scan on Philips systems is that logging starts as soon as you hit the Start Scan button on the console, so the physiological logfiles contains all the preparations (shimming) and dummy scans including their gradient timecourses before the first volume is acquired. It's much easier to count from the end, where the logging ends shortly after the scan stops.

  • scan_timing.sqpar.onset.slice: I don't know how to determine this value. My fMRI experiment with a block-design immediately starts with the task block, as soon as the scan starts, so I would set this value to 0? With this, also Ndummies would be 0, correct?

onset_slice should be the index of the slice you want the regressors to be aligned with. Typically, I would set it to nSlices/2 where nSlices is the total number of slices in the scan volume.

  • scan_timing.Scan/Physlog time synchronization.gradient_log: How do I know which of x,y,z to set for grad_direction? Does this depend on the slice acquisition direction? Moreover, can you please tell me how to choose values for gradient_log.zero and gradient_log.slice?

There is a short description in the PhysIO FAQ. Let me know if you need more pointers.

Some information on my own setup:

  • I am using a 3T scanner with the wireless physiological sensors (sampling rate=496Hz). My fMRI sequence has a TR=2.9s, Nslices=53, Nscans=152.

This all makes sense.

-This is the figure created, when I run PhysIO with my values: image

If you zoom in a bit to see only a 20s window or so, you should be able to discern regularities with the volume or slice TR in at least one of the gradient time courses (top panel), and maybe regular gaps at the end of a volume TR (after the last slice) in the bottom one, which should help you select the thresholds for the slice or volume onset detection.

Nothing unexpected here from first glance. I think you should just go ahead and ajdust the thresholds for the gradient peak detection until you get a reasonable result. You only have to do this once for your study and can leave them the same for your other subjects (unless you change scan geometry a lot between participants).

I hope that helps. Let me know if you get stuck with the thresholding.

All the best, Lars