Dear experts,
SPM12 isn't able to calculate globals for 1st level model specification and I don't know why. I saw that this issue has come up previously too but I wasn't able to find how to resolve it. The error message and the .m code for my batch is below. I checked a few of the preprocessed files (^swrf*.nii) for the test subject I'm running the 1st level analysis on and they appear normal.
Thanks so much for your help!
Halima
filename='/Volumes/RAFI_PhD/RAFI/STUDIES/EMANATION/FUTURE/1stlevel/test/subj_35/run1/swrf033855-0013-00001-000001-01.nii'
d = dir(filename); d =
struct with fields:
name: 'swrf033855-0013-00001-000001-01.nii'
folder: '/Volumes/RAFI_PhD/RAFI/STUDIES/EMANATION/FUTURE/1stlevel/test/subj_35/run1'
date: '31-Mar-2023 09:38:34'
bytes: 1186142
isdir: 0
datenum: 7.3898e+05
n = nifti(filename); n =
NIFTI object: 1-by-1
dat: [79×95×79 file_array]
mat: [4×4 double]
mat_intent: 'Aligned'
mat0: [4×4 double]
mat0_intent: 'Aligned'
descrip: 'Warped - conv(5,5,5)'
n.dat =
fname: '/Volumes/RAFI_PhD/RAFI/STUDIES/EMANATION/FUTURE/1stlevel/test/subj_35/run1/swrf033855-0013-00001-000001-01.nii'
dim: [79 95 79]
dtype: 'UINT16-LE'
offset: 352
scl_slope: 1
scl_inter: 0
------------------------------------------------------------------------
01-Apr-2023 14:43:44 - Running job #1
------------------------------------------------------------------------
01-Apr-2023 14:43:44 - Running 'fMRI model specification'
SPM12: spm_fMRI_design (v7739) 14:43:46 - 01/04/2023
========================================================================
Saving fMRI design : ...SPM.mat saved
SPM12: spm_fmri_spm_ui (v7738) 14:43:46 - 01/04/2023
========================================================================
Mapping files : ...done
Calculating globals : 01-Apr-2023 14:43:51 - Failed 'fMRI model specification'
Error using spm_global
File too small.
In file "/Users/halima/Documents/spm12/spm_fmri_spm_ui.m" (v7738), function "spm_fmri_spm_ui" at line 315.
In file "/Users/halima/Documents/spm12/config/spm_run_fmri_spec.m" (v7739), function "spm_run_fmri_spec" at line 386.
No executable modules, but still unresolved dependencies or incomplete module inputs.
The following modules did not run:
Failed: fMRI model specification
Skipped: Model estimation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1st level batch .m code:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
matlabbatch{1}.spm.stats.fmri_spec.dir = {'/Volumes/RAFI_PhD/RAFI/STUDIES/EMANATION/FUTURE/1stlevel/test/subj_35'};
matlabbatch{1}.spm.stats.fmri_spec.timing.units = 'secs';
matlabbatch{1}.spm.stats.fmri_spec.timing.RT = 1;
matlabbatch{1}.spm.stats.fmri_spec.timing.fmri_t = 16;
matlabbatch{1}.spm.stats.fmri_spec.timing.fmri_t0 = 8;
%%
matlabbatch{1}.spm.stats.fmri_spec.sess(1).scans = {478 swrf^*.nii files};
%%
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(1).name = 'PS';
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(1).onset = [2.271751
39.57422
53.61384
93.03411
110.6575
180.7736
367.9643
419.9412
461.7663];
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(1).duration = [6.36723
9.80107
13.6129
4.87236
8.12254
7.0954
9.1431
7.24712
7.22392];
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(1).tmod = 0;
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(1).pmod = struct('name', {}, 'param', {}, 'poly', {});
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(1).orth = 0;
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(2).name = 'FS';
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(2).onset = [76.58161
130.7085
137.4334
170.3422
190.1862
203.3252
251.7825
271.4262
382.0555];
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(2).duration = [7.1813
5.4843
7.3062
7.199
8.9152
4.2837
5.4147
8.3298
7.3333];
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(2).tmod = 0;
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(2).pmod = struct('name', {}, 'param', {}, 'poly', {});
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(2).orth = 0;
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(3).name = 'PO';
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(3).onset = [68.4961661999996
222.572246
243.764077
260.4209494
283.9859067
316.5252611
339.8994947
391.6119091
443.1709345];
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(3).duration = [5.84908370000085
8.02270510000017
6.77681650000068
5.91566200000034
6.24207260000003
11.4421378000006
7.42863039999975
7.81235939999988
6.80323240000052];
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(3).tmod = 0;
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(3).pmod = struct('name', {}, 'param', {}, 'poly', {});
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(3).orth = 0;
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(4).name = 'FO';
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(4).onset = [21.38221
84.99351
157.986
291.5274
329.1945
356.3346
400.6495
429.4256
451.1773];
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(4).duration = [7.7121
4.81006
11.1154
7.49165
7.48985
7.31126
8.85374
9.51613
8.36444];
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(4).tmod = 0;
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(4).pmod = struct('name', {}, 'param', {}, 'poly', {});
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(4).orth = 0;
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(5).name = 'RTc';
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(5).onset = [8.746433
29.13265
118.8488
207.6732
230.666
266.4113
299.0873
347.3858];
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(5).duration = [9.3827
3.38948
7.61283
5.20822
5.75638
2.79982
10.1238
6.70843];
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(5).tmod = 0;
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(5).pmod = struct('name', {}, 'param', {}, 'poly', {});
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(5).orth = 0;
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(6).name = 'RTt';
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(6).onset = [32.62533
97.98159
144.7804
212.9534
236.485
309.2846
377.1789
409.5781];
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(6).duration = [4.72962
10.4708
10.9577
8.37903
5.01336
5.01496
3.64581
7.0979];
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(6).tmod = 0;
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(6).pmod = struct('name', {}, 'param', {}, 'poly', {});
matlabbatch{1}.spm.stats.fmri_spec.sess(1).cond(6).orth = 0;
matlabbatch{1}.spm.stats.fmri_spec.sess(1).multi = {''};
matlabbatch{1}.spm.stats.fmri_spec.sess(1).regress = struct('name', {}, 'val', {});
matlabbatch{1}.spm.stats.fmri_spec.sess(1).multi_reg = {''};
matlabbatch{1}.spm.stats.fmri_spec.sess(1).hpf = 128;
%%
matlabbatch{1}.spm.stats.fmri_spec.sess(2).scans = {455 swrf^*.nii files};
%%
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(1).name = 'PS';
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(1).onset = [2.276401
44.9285
60.2665
97.82674
112.9606
172.998
355.1537
396.5906
433.4623];
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(1).duration = [8.69875
11.0893
8.49436
8.9297
5.75339
9.21973
6.04658
8.26891
9.22442];
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(1).tmod = 0;
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(1).pmod = struct('name', {}, 'param', {}, 'poly', {});
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(1).orth = 0;
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(2).name = 'FS';
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(2).onset = [78.19303
126.0605
134.7254
159.665
184.4395
194.3371
244.1964
270.5092
366.9045];
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(2).duration = [7.31709
7.45301
8.98137
10.0998
5.66879
7.21399
7.86804
12.5678
5.77167];
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(2).tmod = 0;
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(2).pmod = struct('name', {}, 'param', {}, 'poly', {});
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(2).orth = 0;
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(3).name = 'PO';
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(3).onset = [70.02815
214.2954
236.2101
255.3428
287.305
310.2488
330.1964
374.9119
417.4456];
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(3).duration = [5.8966
9.0756
6.7609
8.4387
7.3037
7.8544
5.4939
5.8474
6.091];
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(3).tmod = 0;
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(3).pmod = struct('name', {}, 'param', {}, 'poly', {});
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(3).orth = 0;
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(4).name = 'FO';
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(4).onset = [20.40928
86.70828
152.4584
295.8382
319.342
342.0902
382.0019
407.206
424.7759];
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(4).duration = [11.5679
7.89273
5.97304
4.85179
7.62168
8.83705
7.04945
6.02229
6.43761];
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(4).tmod = 0;
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(4).pmod = struct('name', {}, 'param', {}, 'poly', {});
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(4).orth = 0;
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(5).name = 'RTc';
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(5).onset = [11.06096
32.05579
118.7872
201.6171
223.4397
263.8455
300.764
335.7579];
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(5).duration = [6.083
4.9126
3.0656
7.1125
5.4646
4.46
4.0934
4.1126];
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(5).tmod = 0;
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(5).pmod = struct('name', {}, 'param', {}, 'poly', {});
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(5).orth = 0;
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(6).name = 'RTt';
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(6).onset = [37.03726
106.8266
143.7778
208.7953
228.9758
304.9313
361.2729
389.1165];
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(6).duration = [5.6269
3.902
6.4367
4.2768
4.9718
3.0714
4.4097
4.2413];
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(6).tmod = 0;
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(6).pmod = struct('name', {}, 'param', {}, 'poly', {});
matlabbatch{1}.spm.stats.fmri_spec.sess(2).cond(6).orth = 0;
matlabbatch{1}.spm.stats.fmri_spec.sess(2).multi = {''};
matlabbatch{1}.spm.stats.fmri_spec.sess(2).regress = struct('name', {}, 'val', {});
matlabbatch{1}.spm.stats.fmri_spec.sess(2).multi_reg = {''};
matlabbatch{1}.spm.stats.fmri_spec.sess(2).hpf = 128;
matlabbatch{1}.spm.stats.fmri_spec.fact = struct('name', {}, 'levels', {});
matlabbatch{1}.spm.stats.fmri_spec.bases.hrf.derivs = [0 0];
matlabbatch{1}.spm.stats.fmri_spec.volt = 1;
matlabbatch{1}.spm.stats.fmri_spec.global = 'None';
matlabbatch{1}.spm.stats.fmri_spec.mthresh = 0.8;
matlabbatch{1}.spm.stats.fmri_spec.mask = {''};
matlabbatch{1}.spm.stats.fmri_spec.cvi = 'AR(1)';
matlabbatch{2}.spm.stats.fmri_est.spmmat(1) = cfg_dep('fMRI model specification: SPM.mat File', substruct('.','val', '{}',{1}, '.','val', '{}',{1}, '.','val', '{}',{1}), substruct('.','spmmat'));
matlabbatch{2}.spm.stats.fmri_est.write_residuals = 0;
matlabbatch{2}.spm.stats.fmri_est.method.Classical = 1;
|