physio-support > No consistent volume Amplitude
Showing 1-4 of 4 posts
Jul 20, 2017 05:07 PM | Brunno M. de Campos - University of Campinas
No consistent volume Amplitude
Dear PhysIO Experts,
This is the second time I am using PhysIO Toolbox on my research. At the first time, I used physio.log files, from a Philips Achieva 3T of the Univ. of Birmingham. I opened the file on Matlab and easily defined thresholds for slice, volumes and etc.
Now I am using distinct log files, also from a Philips Achieva 3T, but from Univ. of Campinas. There are lots of prep. pulses and also 5 dummies, I create the Matlabbatch similarly, but I notice that there is no consistent peak at the beginning of each volume, so, it is impossible to define the thresh.vol, since sometimes, the slice amplitude is higher them some "volumes start" peaks. I am aligning from the last scan, I identified the inter volumes time, defined the number of slices and volumes + dummies, but the toolbox is still considering prep pulses (only them in fact). Looks like it still searching from the "first" or tottaly missing all the real data.
Any idea? Physiolog file attached.
TR = 2 secs
40 slices
400 volumes
5 dummies
Thank you very much!
This is the second time I am using PhysIO Toolbox on my research. At the first time, I used physio.log files, from a Philips Achieva 3T of the Univ. of Birmingham. I opened the file on Matlab and easily defined thresholds for slice, volumes and etc.
Now I am using distinct log files, also from a Philips Achieva 3T, but from Univ. of Campinas. There are lots of prep. pulses and also 5 dummies, I create the Matlabbatch similarly, but I notice that there is no consistent peak at the beginning of each volume, so, it is impossible to define the thresh.vol, since sometimes, the slice amplitude is higher them some "volumes start" peaks. I am aligning from the last scan, I identified the inter volumes time, defined the number of slices and volumes + dummies, but the toolbox is still considering prep pulses (only them in fact). Looks like it still searching from the "first" or tottaly missing all the real data.
Any idea? Physiolog file attached.
TR = 2 secs
40 slices
400 volumes
5 dummies
Thank you very much!
Jul 21, 2017 07:07 PM | Brunno M. de Campos - University of Campinas
RE: No consistent volume Amplitude
Dear PhysIO Experts,
Attaching a figure with some thresholds applied to Y Grad. The Volume Peak is negative, and using a threshold like YGrad(YGrad>-1000 & YGrad<500) = 0; I got a figure like that, great (attached). Notice that even if I apply the abs, the volume marker has lower amplitude. And it is impossible to set the PhysIO Batch defining the volume peak with negative value.
Any idea?
Thanks again!
Attaching a figure with some thresholds applied to Y Grad. The Volume Peak is negative, and using a threshold like YGrad(YGrad>-1000 & YGrad<500) = 0; I got a figure like that, great (attached). Notice that even if I apply the abs, the volume marker has lower amplitude. And it is impossible to set the PhysIO Batch defining the volume peak with negative value.
Any idea?
Thanks again!
Aug 10, 2017 10:08 PM | Lars Kasper - Translational Neuromodeling Unit, IBT, University of Zurich and ETH Zurich
RE: No consistent volume Amplitude
Dear Brunno,
my apologies for the late reply.
You are right, there is no consistent volume threshold in you log file - at least no positive one. It is an interesting idea to implement negative thresholds (or invert the gradient time course, for that purpose) that I can integrate into the toolbox in an upcoming version.
However, in your case, the solution is much simpler: If you run the toolbox with
thresh.zero = 1000
thresh.sli = 1300
thresh.vol = [] % i.e., without volume threshold
you will see in the lowest subplot of the Gradient Thresholding figure (see attached) that the volume start is indicated by a slightly smaller gap between the slice events: some 65 instead of 50 ms. So, if you set
thresh.vol_spacing = 0.06; % 60 ms = 0.06s
the toolbox finds the right events. I have pasted the corresponding SPM job-file below as well.
I hope that works for you as well.
Another thing you mentioned is that the toolbox did not count volume events correctly from the end of the time series. Could you show me such a case? In case there is no clear volume peak, this feature only works properly, if you set thresh.vol = [];
All the best,
Lars
%-----------------------------------------------------------------------
% Job saved on 10-Aug-2017 23:59:14 by cfg_util (rev $Rev: 6460 $)
% spm SPM - SPM12 (6906)
% cfg_basicio BasicIO - Unknown
%-----------------------------------------------------------------------
matlabbatch{1}.spm.tools.physio.save_dir = {''};
matlabbatch{1}.spm.tools.physio.log_files.vendor = 'Philips';
matlabbatch{1}.spm.tools.physio.log_files.cardiac = {'/Users/kasperla/Documents/Cooperations/physIO/BrunnoCampos/SCANPHYSLOG20170721130757.log'};
matlabbatch{1}.spm.tools.physio.log_files.respiration = {'/Users/kasperla/Documents/Cooperations/physIO/BrunnoCampos/SCANPHYSLOG20170721130757.log'};
matlabbatch{1}.spm.tools.physio.log_files.scan_timing = {''};
matlabbatch{1}.spm.tools.physio.log_files.sampling_interval = [];
matlabbatch{1}.spm.tools.physio.log_files.relative_start_acquisition = 0;
matlabbatch{1}.spm.tools.physio.log_files.align_scan = 'last';
matlabbatch{1}.spm.tools.physio.scan_timing.sqpar.Nslices = 40;
matlabbatch{1}.spm.tools.physio.scan_timing.sqpar.NslicesPerBeat = [];
matlabbatch{1}.spm.tools.physio.scan_timing.sqpar.TR = 2;
matlabbatch{1}.spm.tools.physio.scan_timing.sqpar.Ndummies = 5;
matlabbatch{1}.spm.tools.physio.scan_timing.sqpar.Nscans = 400;
matlabbatch{1}.spm.tools.physio.scan_timing.sqpar.onset_slice = 20;
matlabbatch{1}.spm.tools.physio.scan_timing.sqpar.time_slice_to_slice = [];
matlabbatch{1}.spm.tools.physio.scan_timing.sqpar.Nprep = [];
matlabbatch{1}.spm.tools.physio.scan_timing.sync.gradient_log.grad_direction = 'y';
matlabbatch{1}.spm.tools.physio.scan_timing.sync.gradient_log.zero = 1000;
matlabbatch{1}.spm.tools.physio.scan_timing.sync.gradient_log.slice = 1300;
matlabbatch{1}.spm.tools.physio.scan_timing.sync.gradient_log.vol = [];
matlabbatch{1}.spm.tools.physio.scan_timing.sync.gradient_log.vol_spacing = 0.06;
matlabbatch{1}.spm.tools.physio.preproc.cardiac.modality = 'PPU';
matlabbatch{1}.spm.tools.physio.preproc.cardiac.initial_cpulse_select.auto_matched.min = 0.4;
matlabbatch{1}.spm.tools.physio.preproc.cardiac.initial_cpulse_select.auto_matched.file = 'initial_cpulse_kRpeakfile.mat';
matlabbatch{1}.spm.tools.physio.preproc.cardiac.posthoc_cpulse_select.off = struct([]);
matlabbatch{1}.spm.tools.physio.model.output_multiple_regressors = 'multiple_regressors.txt';
matlabbatch{1}.spm.tools.physio.model.output_physio = 'physio.mat';
matlabbatch{1}.spm.tools.physio.model.orthogonalise = 'none';
matlabbatch{1}.spm.tools.physio.model.retroicor.yes.order.c = 3;
matlabbatch{1}.spm.tools.physio.model.retroicor.yes.order.r = 4;
matlabbatch{1}.spm.tools.physio.model.retroicor.yes.order.cr = 1;
matlabbatch{1}.spm.tools.physio.model.rvt.no = struct([]);
matlabbatch{1}.spm.tools.physio.model.hrv.no = struct([]);
matlabbatch{1}.spm.tools.physio.model.noise_rois.no = struct([]);
matlabbatch{1}.spm.tools.physio.model.movement.yes.file_realignment_parameters = {''};
matlabbatch{1}.spm.tools.physio.model.movement.yes.order = 6;
matlabbatch{1}.spm.tools.physio.model.movement.yes.outlier_translation_mm = Inf;
matlabbatch{1}.spm.tools.physio.model.movement.yes.outlier_rotation_deg = Inf;
matlabbatch{1}.spm.tools.physio.model.other.no = struct([]);
matlabbatch{1}.spm.tools.physio.verbose.level = 2;
matlabbatch{1}.spm.tools.physio.verbose.fig_output_file = '';
matlabbatch{1}.spm.tools.physio.verbose.use_tabs = false;
my apologies for the late reply.
You are right, there is no consistent volume threshold in you log file - at least no positive one. It is an interesting idea to implement negative thresholds (or invert the gradient time course, for that purpose) that I can integrate into the toolbox in an upcoming version.
However, in your case, the solution is much simpler: If you run the toolbox with
thresh.zero = 1000
thresh.sli = 1300
thresh.vol = [] % i.e., without volume threshold
you will see in the lowest subplot of the Gradient Thresholding figure (see attached) that the volume start is indicated by a slightly smaller gap between the slice events: some 65 instead of 50 ms. So, if you set
thresh.vol_spacing = 0.06; % 60 ms = 0.06s
the toolbox finds the right events. I have pasted the corresponding SPM job-file below as well.
I hope that works for you as well.
Another thing you mentioned is that the toolbox did not count volume events correctly from the end of the time series. Could you show me such a case? In case there is no clear volume peak, this feature only works properly, if you set thresh.vol = [];
All the best,
Lars
%-----------------------------------------------------------------------
% Job saved on 10-Aug-2017 23:59:14 by cfg_util (rev $Rev: 6460 $)
% spm SPM - SPM12 (6906)
% cfg_basicio BasicIO - Unknown
%-----------------------------------------------------------------------
matlabbatch{1}.spm.tools.physio.save_dir = {''};
matlabbatch{1}.spm.tools.physio.log_files.vendor = 'Philips';
matlabbatch{1}.spm.tools.physio.log_files.cardiac = {'/Users/kasperla/Documents/Cooperations/physIO/BrunnoCampos/SCANPHYSLOG20170721130757.log'};
matlabbatch{1}.spm.tools.physio.log_files.respiration = {'/Users/kasperla/Documents/Cooperations/physIO/BrunnoCampos/SCANPHYSLOG20170721130757.log'};
matlabbatch{1}.spm.tools.physio.log_files.scan_timing = {''};
matlabbatch{1}.spm.tools.physio.log_files.sampling_interval = [];
matlabbatch{1}.spm.tools.physio.log_files.relative_start_acquisition = 0;
matlabbatch{1}.spm.tools.physio.log_files.align_scan = 'last';
matlabbatch{1}.spm.tools.physio.scan_timing.sqpar.Nslices = 40;
matlabbatch{1}.spm.tools.physio.scan_timing.sqpar.NslicesPerBeat = [];
matlabbatch{1}.spm.tools.physio.scan_timing.sqpar.TR = 2;
matlabbatch{1}.spm.tools.physio.scan_timing.sqpar.Ndummies = 5;
matlabbatch{1}.spm.tools.physio.scan_timing.sqpar.Nscans = 400;
matlabbatch{1}.spm.tools.physio.scan_timing.sqpar.onset_slice = 20;
matlabbatch{1}.spm.tools.physio.scan_timing.sqpar.time_slice_to_slice = [];
matlabbatch{1}.spm.tools.physio.scan_timing.sqpar.Nprep = [];
matlabbatch{1}.spm.tools.physio.scan_timing.sync.gradient_log.grad_direction = 'y';
matlabbatch{1}.spm.tools.physio.scan_timing.sync.gradient_log.zero = 1000;
matlabbatch{1}.spm.tools.physio.scan_timing.sync.gradient_log.slice = 1300;
matlabbatch{1}.spm.tools.physio.scan_timing.sync.gradient_log.vol = [];
matlabbatch{1}.spm.tools.physio.scan_timing.sync.gradient_log.vol_spacing = 0.06;
matlabbatch{1}.spm.tools.physio.preproc.cardiac.modality = 'PPU';
matlabbatch{1}.spm.tools.physio.preproc.cardiac.initial_cpulse_select.auto_matched.min = 0.4;
matlabbatch{1}.spm.tools.physio.preproc.cardiac.initial_cpulse_select.auto_matched.file = 'initial_cpulse_kRpeakfile.mat';
matlabbatch{1}.spm.tools.physio.preproc.cardiac.posthoc_cpulse_select.off = struct([]);
matlabbatch{1}.spm.tools.physio.model.output_multiple_regressors = 'multiple_regressors.txt';
matlabbatch{1}.spm.tools.physio.model.output_physio = 'physio.mat';
matlabbatch{1}.spm.tools.physio.model.orthogonalise = 'none';
matlabbatch{1}.spm.tools.physio.model.retroicor.yes.order.c = 3;
matlabbatch{1}.spm.tools.physio.model.retroicor.yes.order.r = 4;
matlabbatch{1}.spm.tools.physio.model.retroicor.yes.order.cr = 1;
matlabbatch{1}.spm.tools.physio.model.rvt.no = struct([]);
matlabbatch{1}.spm.tools.physio.model.hrv.no = struct([]);
matlabbatch{1}.spm.tools.physio.model.noise_rois.no = struct([]);
matlabbatch{1}.spm.tools.physio.model.movement.yes.file_realignment_parameters = {''};
matlabbatch{1}.spm.tools.physio.model.movement.yes.order = 6;
matlabbatch{1}.spm.tools.physio.model.movement.yes.outlier_translation_mm = Inf;
matlabbatch{1}.spm.tools.physio.model.movement.yes.outlier_rotation_deg = Inf;
matlabbatch{1}.spm.tools.physio.model.other.no = struct([]);
matlabbatch{1}.spm.tools.physio.verbose.level = 2;
matlabbatch{1}.spm.tools.physio.verbose.fig_output_file = '';
matlabbatch{1}.spm.tools.physio.verbose.use_tabs = false;
Aug 11, 2017 10:08 AM | Brunno M. de Campos - University of Campinas
RE: No consistent volume Amplitude
Dear Lars,
Thank you very much for your response. Your suggestion solves the problem. I did not realise that I can leave a confounding (in my case) field as empty.
About the wrong "volume counting": this was happening because I set the thresholds wrongly. No more problems for now!
Thanks again and have a nice weekend!
Thank you very much for your response. Your suggestion solves the problem. I did not realise that I can leave a confounding (in my case) field as empty.
About the wrong "volume counting": this was happening because I set the thresholds wrongly. No more problems for now!
Thanks again and have a nice weekend!