Dear Joseph,
I think the issue comes from this:
>> intmax('int32') < 228*228*96*[430 431]
ans =
0 1
In spm_spm.m and spm_est_non_sphericity.m, data are accessed through
spm_data_read.m using linear indexing and you probably have a numerical
overflow there (see @file_array/subsref.m and
@file_array/private/file2mat.c). The proper fix would be to upgrade
these functions but I'll try to think if there would be a simpler
workaround in the meantime (using SPM8 for model fitting might be one).
The rest of SPM mainly uses matrix indexing so I would assume it can
handle your file correctly - have you preprocessed your data with SPM
(ie, was this file created by SPM)?
Best regards,
Guillaume.
On 09/01/17 17:55, Joseph Nour wrote:
> Dear SPM
>
> I’m having trouble analysing data with SPM and it appears to be to do
> with file size. I’m trying to fit a linear regression on 7T data. I can
> get it to work if I downsample the data in space, or if I cut off a
> significant number of time points.
>
> The input file is a nifti 1 4D data file dimensions 228 x 228 x 96 x
> 576. It is a 7T scan with sub 1mm voxels. When we downsample the data in
> space to 3mm voxels (70x70x29x576) the analysis runs perfectly.
> Similarly, if we trim off the last 176 time points to make it
> 228x228x96x400, the analysis also completes.
> We have also tried running on a machine with much (much) more RAM and
> this changes nothing.
>
> Debugging the code, in spm_est_non_sphericity.m around line 141 is a
> loop for i=1:nbchunks
>
> if you put a breakpoint there and run the analysis with the full
> 576timeframe 7T data, and run the following (simply to read the nifti
> file for the given chunk and mask, at all time points).
>
> Y = nan(nScan,numel(chunk));
> cmask = mask(chunk);
> for j = 1:nScan
> Y(j,cmask) = spm_data_read(VY(j),chunk(cmask));
> end
>
> then we find that Y(j > 432,:) is all nans. When the same data file is
> opened in FSL we see data so it’s not just an empty file.
> I’m not sure if there is an issue with the spm_data_read.m file, or if
> the error is in the SPM.mat file that SPM creates.
>
>
> Many thanks for your time
>
> Joseph Nour
> Academic Visitor at fMRIB
--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG
|