tedana.io.filewrite

filewrite(data, filename, ref_img, gzip=True, copy_header=True)[source]

Writes data to filename in format of ref_img

Parameters
  • data ((S [x T]) array_like) – Data to be saved

  • filename (str) – Filepath where data should be saved to

  • ref_img (str or img_like) – Reference image

  • gzip (bool, optional) – Whether to gzip output (if not specified in filename). Only applies if output dtype is NIFTI. Default: True

  • copy_header (bool, optional) – Whether to copy header from ref_img to new image. Default: True

Returns

name (str) – Path of saved image (with added extensions, as appropriate)