CutoutsCombiner

class astrocut.CutoutsCombiner(fits_list=None, exts=None, img_combiner=None)[source]

Bases: object

Class for combining cutouts.

Methods Summary

build_img_combiner(function_builder, ...)

Build the function that will combine cutout extensions.

combine([output_file, memory_only])

Combine cutouts and either save the output to a FITS file,

load(fits_list[, exts])

Load the input cutouts and select the desired fits extensions.

Methods Documentation

build_img_combiner(function_builder, builder_args)[source]

Build the function that will combine cutout extensions.

Parameters
function_builderfunc

The function that will create the combine function.

builder_argslist

Array of arguments for the function builder

combine(output_file='./cutout.fits', memory_only=False)[source]

Combine cutouts and either save the output to a FITS file,

Parameters
output_filestr

Optional. The filename for the combined cutout file.

memory_onlybool

Default value False. If set to true, instead of the combined cutout file being written to disk it is returned as a HDUList object. If set to True, output_file is ignored.

Returns
responsestr, HDUList

The combined cutout filename, or if memory_only is True, the cutout as a HDUList object..

load(fits_list, exts=None)[source]

Load the input cutouts and select the desired fits extensions.

Parameters
fits_listlist

List of fits filenames or HDUList objects with cutouts to be combined.

extslist or None

Optional. List of fits extensions to combine. Default is None, which means all extensions will be combined. If the first extension is a PrimaryHeader with no data it will be skipped.