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

Using Physio to obtain physiological metrics without MRI noise correction #279

Open
tantantree opened this issue Aug 21, 2024 · 2 comments
Assignees
Labels
physio Issues related to PhysIO Toolbox

Comments

@tantantree
Copy link

Dear Lars,

I am trying to use PhysIO to analyze my physio trace (breathing belt and pulse oximeter) collected from a Siemens Prisma 3T. I have noticed that PhysIO requires me to input MRI-related data (such as Nscans; relative_start_acquisition, etc.), but I am only interested in analyzing the physiological signals to obtain the average heart rate/pulse rate per minute/ HRV/ RVT during the scans. Is it possible to achieve this without providing MRI-related parameters?

I also tried running PhysIO with MRI data, but encountered an error: "Index exceeds the number of array elements. Index must not exceed 0."
In file "/Users/guanqi/Downloads/tapas-master/PhysIO/code/preproc/tapas_physio_simulate_pulse_samples.m" (???), function "tapas_physio_simulate_pulse_samples" at line 102.
In file "/Users/guanqi/Downloads/tapas-master/PhysIO/code/readin/tapas_physio_read_physlogfiles.m" (???), function "tapas_physio_read_physlogfiles" at line 107.
In file "/Users/guanqi/Downloads/tapas-master/PhysIO/code/tapas_physio_main_create_regressors.m" (???), function "tapas_physio_main_create_regressors" at line 137.
In file "/Users/guanqi/Downloads/tapas-master/PhysIO/code/tapas_physio_cfg_matlabbatch.m" (???), function "run_physio" at line 1661.
It seems that the calculated value of "meanPulseRateInSamples" is very abnormal, which is causing the failure to compute simulatedPulses. If I must use MRI data to calculate physiological metrics, could you help me troubleshoot this error?
Physiotest

Thank you so much!

Warm wishes,
Anqi

@mrikasper mrikasper self-assigned this Aug 27, 2024
@mrikasper mrikasper added the physio Issues related to PhysIO Toolbox label Aug 27, 2024
@mrikasper
Copy link
Member

Dear Anqi,

PhysIO uses the sequence parameter information to estimate how long the time series should be that it focuses on (and later create regressors for the right number of volumes, but that is not important in your case).

So, if you have a rough estimate in seconds how long the time series is that you want to analyze, you can just put nScans = durationTimeSeries_seconds and TR =1, and nSlices =1 (maybe 2, if 1 gives an error).

If your estimate is longer than the actual time series in the files, then PhysIO tries to extrapolate data which could lead to the simulatedPulses you encounter and maybe relates to the error you see. Rather choose the duration as described above to be something a little bit shorter than the expected length of the physiological recordings.

I hope that helps.

All the best,
Lars

@tantantree
Copy link
Author

Dear Lars,

Thank you for your timely reply, it gives me the hope of solving this problem. I tried TR =1 and 2; nScans = 200 (which is definitely shorter than my physiological recordings duration). The physiological recordings duration was 4min 58s for pulse and 4 min 59s for respiration, calculated from .resp and .plus log file, respectively.
image

However, I met the same error after adjusted the parameters.
image

It seems that PhysIO was still trying to simulate the data. Should I change the value of "relative_start_acquisition"?

Thank you for your patience and support!

Best,
Anqi

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
Status: To do
Development

No branches or pull requests

2 participants