Skip to content
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

Long form physio trace from Siemens machine #227

Open
HeardMatthew opened this issue Feb 17, 2023 · 3 comments
Open

Long form physio trace from Siemens machine #227

HeardMatthew opened this issue Feb 17, 2023 · 3 comments
Assignees
Labels
physio Issues related to PhysIO Toolbox

Comments

@HeardMatthew
Copy link

Hello,

Thanks so much for maintaining such an excellent toolbox, I think this project is the perfect solution for in my current dataset. I wanted to verify that this toolbox can handle my current obstacle, or if I need to process my data before feeding it into the toolbox.

I have a physio trace (breathing belt and pulse oximeter) collected from a Siemens Prisma 3T and saved using the VB (.resp and .puls) file format. The scanning technician started physio recording as soon as the participant was put inside the scanner, and let the script run for the duration of the entire scan (~30 minutes). In particular, I would like to create a physiological regressor for a resting state scan acquired about 10 minutes into the scan, and lasted for 10 minutes.

Can I feed the "long form", raw physio trace into the toolbox and instruct it to create a physio regressor for the specific scan? Or do I need to break the physio trace into smaller chunks?

Thanks!
Matthew

@mrikasper
Copy link
Member

Dear Matthew,

Thank you for your positive feedback regarding PhysIO!

I believe you can (and should) use the "long form" trace out of the box. It might take PhysIO a bit longer to process a larger file, but splitting it up the Siemens VB format is not so easy, because the trace is "sandwiched" between a header and a footer part in the files (See here for a description).

But what you do have to get right is the temporal synchronization of your 10 min resting state scan within this long trace. There are basically two options here

  1. You have a DICOM (header) file for the first volume of your resting-state scan. In this case, you can just set it as the log_files.scan_timing file and log_files.align_scan = 'first', so PhysIO will match the timestamps of log file and DICOM, similar to what I describe here for a slightly different issue.
  2. You have an external TTL trigger from the scanner connected to your physiological recording box, so the .ext files are populated with trigger traces (instead of all 0, you can check the file content with a text editor). I am working on a solution to support these files as log_files.scan_timing input as well (inspired by this issue that shows the DICOM header solution is not always reliable, in particular for very long trace files). If you also have a need for this, it will bubble up my priority list of new feature implementations.

All the best,
Lars

@HeardMatthew
Copy link
Author

HeardMatthew commented Feb 17, 2023 via email

@mrikasper
Copy link
Member

Dear Matthew,

I agree with your choice for synchronization. Regarding using the first or last scan volume for synchronization, in your case (Siemens) it's fine to use either, as long as you know which DICOM file pertains to the first and last volume you want to use in your fMRI analysis (Sometimes people prefer the first one, because then they have to change less in their scripts, because the number of volumes might vary between subjects or runs).

The general recommendation for the last scan volume comes from the fact that on some scanner vendors, it's not always clear whether certain scan preparation modules (shimming/frequency adjustment) or dummy scans (to facilitate T1 equilibration) elicit a trigger signal, so you might end up with a wrong synchronization using the first trigger.

On the other hand, the only time I wouldn't recommend using the last volume is if you manually stop the sequence and there could be incomplete volumes (only a few slices) at the end of a run and the related logfile. But again, not an issue on Siemens usually, because you manually start/stop the logging.

I hope that clarifies the issue.

All the best,
Lars

@mrikasper mrikasper self-assigned this Feb 23, 2023
@mrikasper mrikasper added the physio Issues related to PhysIO Toolbox label Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
physio Issues related to PhysIO Toolbox
Projects
None yet
Development

No branches or pull requests

2 participants