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 formats) but not saved to disk.
If save_data is set to True, Nighres applies the following logic:
Output directory
- If
output_diris specified, the data is saved there. In caseoutput_dirdoesn’t exist, it is created - If
output_diris 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_nameis 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_namespecifies the format in which the output will be saved. Iffile_namehas no extension, Nighres defaults to nii.gz - If
file_nameis 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