general-discussion > failed time_filter
Showing 1-4 of 4 posts
Results per page:
Oct 25, 2016  03:10 PM | Ami Tsuchida - McGill University
failed time_filter

I am running fMRI preprocessing using simexp/niak-boss:0.17.0 docker image. It's still running and not finished, but the news_feed.csv and other log files indicate failed time_filter in subset of subjects. So far, out of 60 or so subjects who were processed, 16 has failed time_filter, all failing at the same point. Here is the representative message in the worker.log.

Temporal filtering of fMRI data
Reading source data /export02/projects/BILGIN_niak_preprocess/resample/fmri_subject19_session1_rest_n.nii ...
Masking the brain ...
Filtering the time series ...

Something went bad ... the job has FAILED !
The last error message occured was :
niak:SI_processing : Please specify a cut-off frequency for low-pass filtering that is larger than 0 and smaller than the Nyquist frequency 0.00 Hz
File /usr/local/niak/commands/SI_processing/niak_filter_tseries.m at line 98
File /usr/local/niak/bricks/fmri_preprocess/niak_brick_time_filter.m at line 301
File /usr/local/niak/extensions/psom-2.0.2/psom_run_job.m at line 185
File /usr/local/niak/extensions/psom-2.0.2/psom_run_job.m at line 106
File /usr/local/niak/extensions/psom-2.0.2/psom_worker.m at line 161

I'm not sure why it's failing for some subjects but not for the majority of subjects. Do you have any idea why this may be or suggestions on what to do?

Ami Tsuchida
Oct 25, 2016  05:10 PM | Pierre Bellec
RE: failed time_filter
Hi Ami,

Thanks for trying out the docker image! 

So the error message says the Nyquist frequency here is 0 Hz. That is not good :)

Very likely a corrupt nifti header, with TR set to zero second. Would you mind sharing an example (raw) fmri file via email/drpobox? 

You can also check yourself:

[hdr,vol] = niak_read_vol('file.nii');

If that's the problem, and you know the TR, you can fix the files manually (or in a for loop if there are a lot...):
[hdr,vol] = niak_read_vol('file.nii'); = 2; % Example TR = 2 s
hdr.file_name = 'file_correct_tr.nii';

The new file 'file_correct_tr.nii' will have the correct TR. Also note that niak can handle .nii.gz files to save space. 

Let me know if that helps. Best,


PS: if you have processed these data in other software and did not manually specify TR, you may want to check that filtering was properly done. It may have produced non-sensical results without crashing.
Oct 25, 2016  06:10 PM | Ami Tsuchida - McGill University
RE: failed time_filter
Thank you Pierre!

Yes, you're right...! The failed images had nonsensical TR in the header, and I think I know where it was introduced, although I'm not sure why in these particular subset.
I've used CONN to analyze them but I did set TR manually, so hopefully it did not affect the analysis.

If I'm primarily interested in QC report though, would it affect any measures reported in the summary page? Registration, motion correction, scrubbing should not be affected by wrong TR and/or temporal filtering?

Oct 26, 2016  02:10 AM | Pierre Bellec
RE: failed time_filter
OK great to know we've zeroed this one down. The scrubbing mask is generated with the generation of all confounds, so I am not sure you will get the full report. You can always try to access it (it's located in the "report" folder) and see if there are missing parts. Otherwise you may have to fix the headers.