CubeBuildStep

class jwst.cube_build.cube_build_step.CubeBuildStep(name=None, parent=None, config_file=None, _validate_kwds=True, **kws)[source]

Bases: jwst.stpipe.Step

CubeBuildStep: Creates a 3-D spectral cube

Notes

This is the controlling routine for building IFU Spectral Cubes. It loads and sets the various input data and parameters need by the cube_build_step.

This routine does the following operations:

1. Extracts the input parameters from the cubepars reference file and merges them with any user-provided values. 2. Creates the output WCS from the input images and defines the mapping between all the input arrays and the output array 3. Passes the input data to the function to map all thei input data to the output array. 4. Updates the output data model with correct meta data

Create a Step instance.

Parameters
  • name (str, optional) – The name of the Step instance. Used in logging messages and in cache filenames. If not provided, one will be generated based on the class name.

  • parent (Step instance, optional) – The parent step of this step. Used to determine a fully-qualified name for this step, and to determine the mode in which to run this step.

  • config_file (str path, optional) – The path to the config file that this step was initialized with. Use to determine relative path names of other config files.

  • **kws (dict) – Additional parameters to set. These will be set as member variables on the new Step instance.

Attributes Summary

reference_file_types

spec

Methods Summary

process(input)

This is the main routine for IFU spectral cube building.

read_user_input()

Read user input options for channel, subchannel, filter, or grating

Attributes Documentation

reference_file_types = ['cubepar', 'resol']
spec = "\n channel = option('1','2','3','4','all',default='all') # Channel\n band = option('short','medium','long','all',default='all') # Band\n grating = option('prism','g140m','g140h','g235m','g235h',g395m','g395h','all',default='all') # Grating\n filter = option('clear','f100lp','f070lp','f170lp','f290lp','all',default='all') # Filter\n output_type = option('band','channel','grating','multi',default='band') # Type IFUcube to create.\n scale1 = float(default=0.0) # cube sample size to use for axis 1, arc seconds\n scale2 = float(default=0.0) # cube sample size to use for axis 2, arc seconds\n scalew = float(default=0.0) # cube sample size to use for axis 3, microns\n weighting = option('emsm','msm','miripsf',default = 'msm') # Type of weighting function\n coord_system = option('skyalign','world','internal_cal','ifualign',default='skyalign') # Output Coordinate system.\n rois = float(default=0.0) # region of interest spatial size, arc seconds\n roiw = float(default=0.0) # region of interest wavelength size, microns\n weight_power = float(default=0.0) # Weighting option to use for Modified Shepard Method\n wavemin = float(default=None) # Minimum wavelength to be used in the IFUCube\n wavemax = float(default=None) # Maximum wavelength to be used in the IFUCube\n single = boolean(default=false) # Internal pipeline option used by mrs_imatch & outlier detection\n xdebug = integer(default=None) # debug option, x spaxel value to report information on\n ydebug = integer(default=None) # debug option, y spaxel value to report information on\n zdebug = integer(default=None) # debug option, z spaxel value to report information on\n skip_dqflagging = boolean(default=false) # skip setting the DQ plane of the IFU\n search_output_file = boolean(default=false)\n output_use_model = boolean(default=true) # Use filenames in the output models\n "

Methods Documentation

process(input)[source]

This is the main routine for IFU spectral cube building.

Parameters

input (list of objects or str) – list of datamodels or string name of input fits file or association.

read_user_input()[source]

Read user input options for channel, subchannel, filter, or grating

Determine if any of the input paramters channel, band, filter or grating have been set. If they have been check fill in input_pars dictionary.

Parameters

none

Notes

This routine updates the dictionary self.pars_input with any user provided inputs. In particular it sets pars_input[‘channel’], pars_input[‘sub_channel’], pars_input[‘grating’], and pars_input[‘filter’] with user provided values.