tedana.io.OutputGenerator

class OutputGenerator(reference_img, convention='bidsv1.5.0', out_dir='.', prefix='', config='auto', make_figures=True, overwrite=False, verbose=False, old_registry=None)[source]

A class for managing tedana outputs.

Parameters:
  • reference_img (img_like) – The reference image which defines affine, shape, etc. of output images.

  • convention ({“bidsv1.5.0”, “orig”, or other str}, optional) – Default is “bidsv1.5.0”. Must correspond to a key in config.

  • out_dir (str, optional) – Output directory. Default is current working directory (“.”).

  • prefix (None or str, optional) – Prefix to prepend to output filenames. Default is None, which means no prefix will be used.

  • config (str, optional) – Path to configuration json file, which determines appropriate filenames based on file descriptions. Default is “auto”, which uses tedana’s default configuration file.

  • make_figures (bool, optional) – Whether or not to actually make a figures directory

  • overwrite (bool, optional) – Whether to force overwrites of data. Default False.

Variables:
  • config (dict) – File naming configuration information.

  • reference_img (img_like) – The reference image which defines affine, shape, etc. of output images.

  • convention (str) – The naming convention for output files.

  • out_dir (str) – Directory in which outputs will be saved.

  • figures_dir (str) – Directory in which figures will be saved. This will correspond to a “figures” subfolder of out_dir.

  • prefix (str) – Prefix to prepend to output filenames.

  • overwrite (bool) – Whether to force file overwrites.

  • verbose (bool) – Whether or not to generate verbose output.

  • registry (dict) – A registry of all files saved

__init__(reference_img, convention='bidsv1.5.0', out_dir='.', prefix='', config='auto', make_figures=True, overwrite=False, verbose=False, old_registry=None)[source]

Methods

get_name(description, **kwargs)

Generate a file full path to simplify file output.

register_input(names)

Register input filenames.

save_file(data, description, **kwargs)

Save data to a filename determined by the file's description and config info.

save_img(data, name)

Save image data to a nifti file.

save_json(data, name)

Save dictionary data to a json file.

save_self()

Save the registry to a json file.

save_tsv(data, name)

Save DataFrame to a tsv file.