Saving outputs¶
Each Nighres processing interface allows you to save the outputs by setting the save_data
parameter to True
. If this parameter is not specified, it defaults to False
and the data is returned as a data object (see Data handling and the niimg) but not saved to disk.
If save_data
is set to True, Nighres applies the following logic:
Output directory
- If
output_dir
is specified, the data is saved there. In caseoutput_dir
doesn’t exist, it is created - If
output_dir
is not specified, Nighres tries to use the location of an input file as the location for saving. This only works if the input is a file name and not a data object - Otherwise, the data is saved in the current working directory
File names
- If
file_name
is specified, this name is used as a base to create the output names. A suffix is added to each output (you can see in the docstrings which suffix refers to which output). The extension offile_name
specifies the format in which the output will be saved. Iffile_name
has no extension, Nighres defaults to nii.gz - If
file_name
is not specified, Nighres tries to use the name of an input file as a base name for saving. This only works if the input is indeed a file name and not a data object