<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ligatures:standardcontextual;
mso-fareast-language:EN-US;}
span.E-mailStijl17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-ligatures:standardcontextual;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=NL link="#0563C1" vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>Dear all,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-GB>My name is Evelyne and I am just started to explore fieldtrip.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>I use fieldtrip to define trials in physiological recordings to estimate physiological regressors for MRI preprocessing. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>However, when using the physio toolbox, no trials are detected within my data.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>When I run the separate ft_definetrial function, I get trials, but I seem to fail to include this in my matlabbatch.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>This is my output with error message:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB>evaluating trial function 'ft_trialfun_general'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>reading the header from '/home/affneu/evefra/Spinalcord/data/Physio/subx19_new_threat_SPINAL.vhdr'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>reading the events from '/home/affneu/evefra/Spinalcord/data/Physio/subx19_new_threat_SPINAL.vhdr'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>found 169 events<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>created 20 trials<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>the call to "ft_definetrial" took 0 seconds and required the additional allocation of an estimated 0 MB<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>Item model: No field(s) named<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>event<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB>------------------------------------------------------------------------<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>09-Jun-2023 15:02:40 - Running job #41<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>------------------------------------------------------------------------<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>09-Jun-2023 15:02:40 - Running 'TAPAS PhysIO Toolbox'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>Warning: cfg.trialdef.eventtype='?' is deprecated, please specify cfg.trialfun='ft_trialfun_show' <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>evaluating trial function 'ft_trialfun_show'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>reading the events from '/home/affneu/evefra/Spinalcord/data/Physio/subx19_new_threat_SPINAL.vhdr'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>the following events were found in the data<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>event type: 'New Segment' <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>with event values: <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB>event type: 'Response' <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>with event values: 'R 1' <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB>event type: 'Stimulus' <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>with event values: 'S 1' 'S 97' <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB>no trials have been defined yet, see FT_DEFINETRIAL for further help<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>found 169 events<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>the call to "ft_definetrial" took 0 seconds and required the additional allocation of an estimated 0 MB<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>evaluating trial function 'ft_trialfun_general'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>reading the header from '/home/affneu/evefra/Spinalcord/data/Physio/subx19_new_threat_SPINAL.vhdr'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>reading the events from '/home/affneu/evefra/Spinalcord/data/Physio/subx19_new_threat_SPINAL.vhdr'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>09-Jun-2023 15:02:41 - Failed 'TAPAS PhysIO Toolbox'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>Error using ft_definetrial<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>no trials were defined, see FT_DEFINETRIAL for help<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB>The following modules did not run:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>Failed: TAPAS PhysIO Toolbox<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB>Error using MATLABbatch system<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>Job execution failed. The full log of this run can be found in MATLAB command window, starting with the lines (look for the line showing the<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>exact #job as displayed in this error message)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>------------------<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>Running job #41<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>------------------<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB>This is my code:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB>if physio_regressor == 1<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> %cd /home/affneu/evefra/Spinalcord/data/Physio/ <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> %define log input<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> data_path_physio = fullfile(data_path, 'Physio');<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> data_path_physio_sub = dir(fullfile(data_path_physio, sprintf('subx%d*threat*.eeg', sub))) ; %CHANE FORMAT <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> filenames = {data_path_physio_sub.name};<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> filenames = filenames'; <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> filefolder = {data_path_physio_sub.folder};<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> filefolder = filefolder';<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> filename_folder = cellfun(@(folder, name) fullfile(folder, name), filefolder, filenames, 'UniformOutput', false);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB> %define vhdr<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> data_path_physio_sub = dir(fullfile(data_path_physio, sprintf('subx%d*threat*.vhdr', sub))) ; %CHANE FORMAT <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> filenames = {data_path_physio_sub.name};<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> filenames = filenames'; <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> filefolder = {data_path_physio_sub.folder};<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> filefolder = filefolder';<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> filename_folder_vhdr = cellfun(@(folder, name) fullfile(folder, name), filefolder, filenames, 'UniformOutput', false);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB> %define vmkr<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> data_path_physio_sub = dir(fullfile(data_path_physio, sprintf('subx%d*threat*.vmrk', sub))) ; %CHANE FORMAT <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> filenames = {data_path_physio_sub.name};<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> filenames = filenames'; <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> filefolder = {data_path_physio_sub.folder};<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> filefolder = filefolder';<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> filename_folder_vmrk = cellfun(@(folder, name) fullfile(folder, name), filefolder, filenames, 'UniformOutput', false);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB> %define trials<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> cfg = [];<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> cfg.headerfile = char(filename_folder_vhdr);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> cfg.eventfile = char(filename_folder_vmrk);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> cfg.trialdef.eventtype = 'Stimulus'; <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> cfg.trialdef.eventvalue = 'S 1'; <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> cfg.trialdef.prestim = 0; <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> cfg.trialdef.poststim = 0; <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> %cfg.trialfun = 'ft_trialfun_show';<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> trials = ft_definetrial(cfg);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> %run regressor estimation<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> clear matlabbatch<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.save_dir = {fullfile(data_path_tos_brain,'physio_regressors')};<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.log_files.vendor = 'BrainProducts';<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.log_files.cardiac = filename_folder;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.log_files.respiration = filename_folder;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.log_files.scan_timing = {''};<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.log_files.sampling_interval = [];<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.log_files.relative_start_acquisition = 0;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.log_files.align_scan = 'last';<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.scan_timing.sqpar.Nslices = 44;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.scan_timing.sqpar.NslicesPerBeat = [];<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.scan_timing.sqpar.TR = 3.39;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.scan_timing.sqpar.Ndummies = 0;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.scan_timing.sqpar.Nscans = 147;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.scan_timing.sqpar.onset_slice = 1;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.scan_timing.sqpar.time_slice_to_slice = [];<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.scan_timing.sqpar.Nprep = [];<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.scan_timing.sync.nominal = struct([]);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.preproc.cardiac.modality = 'ECG';<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.preproc.cardiac.filter.no = struct([]);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.preproc.cardiac.initial_cpulse_select.auto_matched.min = 0.4;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.preproc.cardiac.initial_cpulse_select.auto_matched.file = 'initial_cpulse_kRpeakfile.mat';<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.preproc.cardiac.initial_cpulse_select.auto_matched.max_heart_rate_bpm = 90;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.preproc.cardiac.posthoc_cpulse_select.off = struct([]);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.preproc.respiratory.filter.passband = [0.01 2];<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.preproc.respiratory.despike = false;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.model.output_multiple_regressors = 'multiple_regressors.txt';<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.model.output_physio = 'physio.mat';<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.model.orthogonalise = 'none';<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.model.censor_unreliable_recording_intervals = false;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.model.retroicor.yes.order.c = 3;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.model.retroicor.yes.order.r = 4;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.model.retroicor.yes.order.cr = 1;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.model.rvt.no = struct([]);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.model.hrv.no = struct([]);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.model.noise_rois.no = struct([]);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.model.movement.no = struct([]);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.model.other.no = struct([]);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.verbose.level = 2;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.verbose.fig_output_file = '';<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.verbose.use_tabs = false;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> matlabbatch{1}.spm.tools.physio.model.event.trials = trials.trl(:,1);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB> spm_jobman('run', matlabbatch)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB> end<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB>If anybody has some tips, it would be greatly appreciated.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>Best,<br>Evelyne<o:p></o:p></span></p></div></body></html>