arielletambini / denoiser

Nuisance removal tool for fMRI data
Apache License 2.0
55 stars 18 forks source link

IndexError: index 240 is out of bounds for axis 0 with size 240 #37

Open weberam2 opened 3 years ago

weberam2 commented 3 years ago

Hi! Just wondering what I'm doing wrong here.

I run: run_denoise.py sub-01_ses-01_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz sub-01_ses-01_task-rest_desc-confounds_timeseries.tsv denoise --col_names a_comp_cor_00 a_comp_cor_01 a_comp_cor_02 a_comp_cor_03 a_comp_cor_04 a_comp_cor_05 framewise_displacement trans_x trans_y trans_z rot_x rot_y rot_z

I get this output:

/home/weberam2/.local/lib/python3.8/site-packages/nilearn/glm/init.py:55: FutureWarning: The nilearn.glm module is experimental. It may change in any future release of Nilearn. warn('The nilearn.glm module is experimental. ' '# of TRs: 240' Filling in 1 NaN value for framewise_displacement '# of Confound Regressors: 13 [SELECTED regressors in CSV]' No High-pass Filter Applied Saving output file... Output directory: denoise/sub-01_ses-01_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold_NR_figures Traceback (most recent call last): File "/home/weberam2/Scripts/denoiser/run_denoise.py", line 462, in denoise(img_file, tsv_file, out_path, col_names, hp_filter, lp_filter, out_figure_path) File "/home/weberam2/Scripts/denoiser/run_denoise.py", line 244, in denoise sc_idx[thr_idx][curr_idx] = True IndexError: index 240 is out of bounds for axis 0 with size 240

The number of timepoints is indeed 240 for the .nii.gz file. There are 241 rows in the .tsv file (as the first row is the column titles) There are some n/a values in the first row... I wonder if this is where I'm getting the error...

nuttaon commented 3 years ago

Hi,

I got the exact same error but in only some datasets. Most of the other ones work fine (same scanners/parameters/data_index). The program did give out .NR.nii.gz and matrix figs (2) but nothing else. I wonder if the .NR.nii.gz was completed?

FYI, Line 244 is a part of the framewise_displacement.

Please advise.

Chihhao-Lien commented 3 years ago

Hi,

I also get the same error with my .nii files which have 290 time points

IndexError: index 290 is out of bounds for axis 0 with size 290

Does anyone know how to fix with this error? or It's OK and we can use the result for the next step?

nuttaon commented 3 years ago

Hi,

I also get the same error with my .nii files which have 290 time points

IndexError: index 290 is out of bounds for axis 0 with size 290

Does anyone know how to fix with this error? or It's OK and we can use the result for the next step?

After looked at the script, I think it might be a bug in the plotting for the framewise_displacement. I still use the output for further analysis.

Chihhao-Lien commented 3 years ago

Hi, I also get the same error with my .nii files which have 290 time points IndexError: index 290 is out of bounds for axis 0 with size 290 Does anyone know how to fix with this error? or It's OK and we can use the result for the next step?

After looked at the script, I think it might be a bug in the plotting for the framewise_displacement. I still use the output for further analysis.

Thanks!