Closed jcohenadad closed 3 months ago
Version: https://github.com/spinal-cord-7t/coil-qc-code/blob/0609ec86ccd3765fe190344102afdef4f86ecfb7/data_processing-phantom.ipynb
--------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) File ~/miniconda3/lib/python3.10/site-packages/nibabel/loadsave.py:87, in load(filename, **kwargs) 86 try: ---> 87 stat_result = os.stat(filename) 88 except OSError: FileNotFoundError: [Errno 2] No such file or directory: '/Users/julien/code/coil-qc-code/data-phantom/derivatives/labels/sub-UCL/fmap/sub-UCL_acq-coilQaSagSmall_GFactor_mask.nii.gz' During handling of the above exception, another exception occurred: FileNotFoundError Traceback (most recent call last) Cell In[9], line 14 11 gfac_data=(gfac_map.get_fdata()[:,:,:,5]) 13 fname_mask=os.path.join(path_labels, subject, "fmap", f"{subject}_acq-coilQaSagSmall_GFactor_mask.nii.gz") ---> 14 gfac_mask_map=nib.load(fname_mask) 15 gfac_mask_data=(gfac_mask_map.get_fdata()[:,:,:]) 17 # mask data File ~/miniconda3/lib/python3.10/site-packages/nibabel/loadsave.py:89, in load(filename, **kwargs) 87 stat_result = os.stat(filename) 88 except OSError: ---> 89 raise FileNotFoundError(f"No such file or no access: '{filename}'") 90 if stat_result.st_size <= 0: 91 raise ImageFileError(f"Empty file: '{filename}'") FileNotFoundError: No such file or no access: '/Users/julien/code/coil-qc-code/data-phantom/derivatives/labels/sub-UCL/fmap/sub-UCL_acq-coilQaSagSmall_GFactor_mask.nii.gz'
I am no longer using a pre-defined mask, but rather calculating the mean within a central box.
Version: https://github.com/spinal-cord-7t/coil-qc-code/blob/0609ec86ccd3765fe190344102afdef4f86ecfb7/data_processing-phantom.ipynb