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

PHYSIO with multiecho data #270

Open
AndongZhou12 opened this issue Jun 3, 2024 · 3 comments
Open

PHYSIO with multiecho data #270

AndongZhou12 opened this issue Jun 3, 2024 · 3 comments
Assignees
Labels
physio Issues related to PhysIO Toolbox

Comments

@AndongZhou12
Copy link

AndongZhou12 commented Jun 3, 2024

Dear Lars,

I am currently using the PhysIO toolbox for generating the regressors for 7T multi-echo data. I also got the CSF and whiter matter anat files, and combined functional nii file and realignment parameters.
However, no matter how I modify my codes (I also tried turn off the ROIs and parameters), the same error appeared:
03-Jun-2024 22:07:16 - Failed 'TAPAS PhysIO Toolbox'
Error using horzcat
Dimensions of arrays being concatenated are not consistent.
In file "/Users/zhouandong/Desktop/spm12/toolbox/PhysIO/tapas_physio_main_create_regressors.m" (???), function "append_regressors" at line 466.
In file "/Users/zhouandong/Desktop/spm12/toolbox/PhysIO/tapas_physio_main_create_regressors.m" (???), function "tapas_physio_main_create_regressors" at line 363.
In file "/Users/zhouandong/Desktop/spm12/toolbox/PhysIO/tapas_physio_cfg_matlabbatch.m" (???), function "run_physio" at line 1661.

Can you give me some suggestions?

The following modules did not run:
Failed: TAPAS PhysIO Toolbox

800_PULS.log
800_RESP.log
800_Info.log
ME.txt

Best wishes,
Andong

@mrikasper
Copy link
Member

Dear Andong,

The horzcat error points to an issue with the length of the multiple regressors vectors, presumably the one created from the logfiles vs. the nifti image files CSF etc.). Here are some questions to explore:

  1. If you only use the logfiles (no noise_rois), does the script run through?
  2. If you only use the noise_rois (no logfiles specified), does the script run through?
  3. Does your .nii file exactly have 344 volumes, as specified in the sqpar.Nscans?
  4. If not, or if (2) fails with a wrong number of volumes, you may have to specify the 344 volumes within the 4D nifti-file explicitly, e.g.,
matlabbatch{1}.spm.tools.physio.model.noise_rois.yes.fmri_files = {
'/Users/zhouandong/Desktop/800p/800_CNBT.nii,1'
'/Users/zhouandong/Desktop/800p/800_CNBT.nii,2'
...
'/Users/zhouandong/Desktop/800p/800_CNBT.nii,344'
}

You can use functions such as spm_select to create this array automatically.

I hope this helps!

All the best,
Lars

@mrikasper mrikasper self-assigned this Jun 11, 2024
@mrikasper mrikasper added the physio Issues related to PhysIO Toolbox label Jun 11, 2024
@AndongZhou12
Copy link
Author

Dear Andong,

The horzcat error points to an issue with the length of the multiple regressors vectors, presumably the one created from the logfiles vs. the nifti image files CSF etc.). Here are some questions to explore:

  1. If you only use the logfiles (no noise_rois), does the script run through?
  2. If you only use the noise_rois (no logfiles specified), does the script run through?
  3. Does your .nii file exactly have 344 volumes, as specified in the sqpar.Nscans?
  4. If not, or if (2) fails with a wrong number of volumes, you may have to specify the 344 volumes within the 4D nifti-file explicitly, e.g.,
matlabbatch{1}.spm.tools.physio.model.noise_rois.yes.fmri_files = {
'/Users/zhouandong/Desktop/800p/800_CNBT.nii,1'
'/Users/zhouandong/Desktop/800p/800_CNBT.nii,2'
...
'/Users/zhouandong/Desktop/800p/800_CNBT.nii,344'
}

You can use functions such as spm_select to create this array automatically.

I hope this helps!

All the best, Lars

Dear Lars,

Thank you for the suggestions, there are very helpful and I found the mistakes I made.
One is that the realignment parameter I got from AFNI is not compatible with SPM (AFNI uses degrees for the roll, pitch and yaw parameters, whereas SPM12 uses radians), therefore I transfrom them into the correct version for SPM.
The second mistake is a bit embarrassing, I think I mistakenly typed the Nscans to 344 (it is 342 instead!)
After that I can get the regressors and SPM.mat with the logfiles and the movement files.

However, when I want to added the final step (the ROIs: the combined nii and white matter and CSF files), I can see a fancy plot been generated but got this error message: '14-Jun-2024 16:16:52 - Failed 'TAPAS PhysIO Toolbox'
Unrecognized field name "cm".
In file "/Users/zhouandong/Desktop/spm12/toolbox/PhysIO/code/model/tapas_physio_create_noise_rois_regressors.m" (???), function "tapas_physio_create_noise_rois_regressors" at line 186.
In file "/Users/zhouandong/Desktop/spm12/toolbox/PhysIO/tapas_physio_main_create_regressors.m" (???), function "tapas_physio_main_create_regressors" at line 360.
In file "/Users/zhouandong/Desktop/spm12/toolbox/PhysIO/tapas_physio_cfg_matlabbatch.m" (???), function "run_physio" at line 1661.

The following modules did not run:
Failed: TAPAS PhysIO Toolbox'

Can you give me some more guidance, I am really appreciated for the help!

Best wishes,
Andong
22391718346250_ pic

@AndongZhou12
Copy link
Author

Dear Andong,

The horzcat error points to an issue with the length of the multiple regressors vectors, presumably the one created from the logfiles vs. the nifti image files CSF etc.). Here are some questions to explore:

  1. If you only use the logfiles (no noise_rois), does the script run through?
  2. If you only use the noise_rois (no logfiles specified), does the script run through?
  3. Does your .nii file exactly have 344 volumes, as specified in the sqpar.Nscans?
  4. If not, or if (2) fails with a wrong number of volumes, you may have to specify the 344 volumes within the 4D nifti-file explicitly, e.g.,
matlabbatch{1}.spm.tools.physio.model.noise_rois.yes.fmri_files = {
'/Users/zhouandong/Desktop/800p/800_CNBT.nii,1'
'/Users/zhouandong/Desktop/800p/800_CNBT.nii,2'
...
'/Users/zhouandong/Desktop/800p/800_CNBT.nii,344'
}

You can use functions such as spm_select to create this array automatically.

I hope this helps!

All the best, Lars

Hi Lars,

after trying: physio.verbose.level = 1;

I succeed!!!!!

Thank u so much!

Best wishes,
Andong

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