DataTypes

class jwst.cube_build.data_types.DataTypes(input_models, single, output_file, output_dir)[source]

Bases: object

Class to handle reading input data to cube_build for processing.

Determine if data is a single input model or a set of input models contained in a ModelContainer. The method populates the self.input_models`, which is a list of input models. An initial base name for the output file is also constructed.

Parameters:
input_modelsIFUImageModel or ModelContainer

Input data to cube_build, either a single model or a model container.

singlebool

If True, then create single mode IFU cubes for outlier detection. If False, then create standard IFU cubes.

output_filestr

Optional user-provided output file name.

output_dirstr

Optional user-provided output directory name.

Raises:
TypeError

Input data was not of correct form

Attributes Summary

template

Methods Summary

build_product_name(filename)

Determine the base of output name if an input data is a FITS filename.

Attributes Documentation

template = {'asn_pool': '', 'asn_rule': '', 'asn_type': '', 'products': [{'members': [{'expname': '', 'exptype': ''}], 'name': ''}], 'target': ''}

Methods Documentation

build_product_name(filename)[source]

Determine the base of output name if an input data is a FITS filename.

Parameters:
filenamestr

If a string filename is given as the input data to cube_build, then determine the base name of the output IFU cube filename.

Returns:
single_productstr

Output base filename.