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

Bug with multiband acquisition data (Siemens ..._Info.log) in PhysIO toolbox #236

Open
poeplau opened this issue Jun 26, 2023 · 2 comments
Assignees
Labels
physio Issues related to PhysIO Toolbox
Projects

Comments

@poeplau
Copy link

poeplau commented Jun 26, 2023

Hello,
I've encountered similar problems as other people regarding multiband acquisition data. I checked past forum entries/issues and it seems like this hasn't been discovered yet. I'm using version R2022a-v8.1.0, so if this has been fixed already kindly forgive my ignorance.
Here is the bug I discovered:
I have 72 slices with an acceleration factor of 8. As such slices 0, 9, 18, ..., 63 were acquired at the same time (at the first point in time) so they are the first slices listed in the log-file. The toolbox instead assumes that slices 0-8 were acquired first. (This also applies to all following slices.) As such the calculated acquisition times are incorrect and accordingly the delays for different onset_slices are also incorrect. I have modified the source code to fit my needs (see appended files, mainly tapas_physio_create_scan_timing_from_tics_siemens) and to fix this bug. All modifications are marked with the original code also still visible. If you have comments/questions I'm happy to answer.
I thought you might find it interesting.
Kind regards,
Clemens

tapas_physio_create_scan_timing_from_tics_siemens.txt
tapas_physio_crop_scanphysevents_to_acq_window.txt
tapas_physio_get_cardiac_phase.txt
tapas_physio_get_sample_points.txt

@poeplau poeplau changed the title Bug with multiband acquisition data (Siemens ..._Info.log) Bug with multiband acquisition data (Siemens ..._Info.log) in PhysIO toolbox Jun 26, 2023
@mrikasper mrikasper self-assigned this Jul 27, 2023
@mrikasper mrikasper added the physio Issues related to PhysIO Toolbox label Jul 27, 2023
@mrikasper mrikasper added this to To do in PhysIO via automation Jul 27, 2023
@mrikasper
Copy link
Member

Dear @poeplau,

Thank you for your contribution. In order to understand it better, would you be willing to share an example dataset and the script/SPM job you used to process it with PhysIO?

Thank you!

All the best,
Lars

@poeplau
Copy link
Author

poeplau commented Aug 2, 2023

Dear Lars,

For sure! I have attached example log-files and the script I use (individual_regressors.m) aswell as some other modified scripts that are used by the main script (*_mod.m).
The main script (individual_regressors.m) is a modified version of tapas_physio_main_create_regressors.m. All modifications should be marked but they are completely irrelevant to the issue at hand. (They serve to output slicewise RETROICOR regressors as nii-volumes, oversampled versions of the physiological regressors at the original sampling rate and the raw cardiac/respiratory phase.)
The only relevant modifications are in the scripts I included in my first message, so you can safely ignore the rest. A standard example with the attached logs should run with the first round of modified scripts.

Hope this helps! If you have questions regarding any of my modifications feel free to ask!

Best regards,
Clemens
Physio_example_Info.log
Physio_example_PULS.log
Physio_example_RESP.log
individual_regressors.txt
tapas_physio_create_hrv_regressors_mod.txt
tapas_physio_create_retroicor_regressors_mod.txt
tapas_physio_create_rvt_regressors_mod.txt
tapas_physio_get_cardiac_phase_mod.txt
tapas_physio_get_fourier_expansion_mod.txt

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
PhysIO
  
To do
Development

No branches or pull requests

2 participants