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

Error in tapas_physio_filter_respiratory with Siemens_Tics data #272

Open
Jhcprep opened this issue Jul 3, 2024 · 1 comment
Open

Error in tapas_physio_filter_respiratory with Siemens_Tics data #272

Jhcprep opened this issue Jul 3, 2024 · 1 comment

Comments

@Jhcprep
Copy link

Jhcprep commented Jul 3, 2024

Dear Lars,

Thanks a lot for the toolbox! Now I would like to use PhysIO by MATLAB scripts to create physiological regressors with Siemens_Tics data acquired using CMRR multiband sequence. I use the "extractCMRRphysio.m" to get .log files from physiological data saved in DICOM format. The script worked well previously, but when I switched to some new data, an error occurred:

Unable to perform assignment because the left and right sides have a different number of elements.

Error in tapas_physio_filter_respiratory (line 134)
rpulset_padded(1:n_pad) = padding_window(1:n_pad) .* rpulset_padded(1:n_pad);

Error in tapas_physio_main_create_regressors (line 225)
                [ons_secs.fr, verbose] = tapas_physio_filter_respiratory( ...

Error in physio_regression_jh (line 96)
physio = tapas_physio_main_create_regressors(physio); 

My script and data is attached. Could you please provide some guidance on how to resolve this issue? Thank you!

Best regards,
Jinhan

physio_regression_240703.zip

@Jhcprep
Copy link
Author

Jhcprep commented Jul 19, 2024

I've just found out that when I remove the path 'spm12\toolbox\PhysIO' before running the MATLAB script, the errors mentioned above would disappear and the regressors could be generated.

Now I would synchronize physiological signals and MR images, generating slice specific regressors, so I tried different values of physio.scan_timing.sqpar.onset_slice. However, I found that the regressors calculated with onset_slice selected do not correspond to the actual slice, because the onset slice 1 to 5 would lead to the same regressors (MB factor is 5). For Siemens_Tics data which has scanner timing data, how does the onset slice timing be calculated? Is the onset_slice correspond to the chronological order in which slices are actually acquired?

For example, imagine we acquired 15 slices in a volume with a MB factor of 3, and the order is interleaved. In this case, would onset_slice actually correspond to the number of terms in the following array that we choose as the reference slice?
[(1,6,11), (3,8,13), (5,10,15),(2,7,12),(4,9,14)] and the slices in ( ) were acquired simultaneously.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant