CubeBlot

class jwst.cube_build.blot_cube_build.CubeBlot(median_model, input_models)[source]

Bases: object

Main module for blotting a sky cube back to detector space.

Information is pulled out of the median sky cube created by a previous run of cube_build in single mode and stored in the class. These variables include the WCS of median sky cube, the weighting parameters used to create this median sky image, and basic information of the input data (instrument, channel, band, grating, or filter).

Parameters:
median_modelIFUCubeModel

The median input sky cube is created from a median stack of all the individual input models mapped to the full IFU cube imprint on the sky.

input_modelsModelContainer

The input models used to create the median sky cube.

Methods Summary

blot_images()

Call the instrument specific blotting code.

blot_images_miri()

Core blotting routine for MIRI.

blot_images_nirspec()

Core blotting routine for NIRSPEC.

blot_info()

Print the basic parameters of the blot image and median sky cube.

Methods Documentation

blot_images()[source]

Call the instrument specific blotting code.

Returns:
blotmodelsModelContainer

Blotted IFU image models

input_list_numberlist of int

List containing index of blot model in input models

blot_images_miri()[source]

Core blotting routine for MIRI.

This is the main routine for blotting the MIRI median sky cube back to the detector space and creating a blotting image for each input model:

  1. Loop over every data model to be blotted and find RA, Dec, and wavelength for every pixel in a valid slice on the detector.

  2. Loop over every input model and using the inverse (backwards) transform convert the median sky cube values RA, Dec, lambda to the blotted x, y detector value (x_cube, y_cube).

  3. For each input model loop over the blotted x, y values and find the x, y detector values that fall within the ROI. The blotted flux is the weighted flux, where the weight is based on distance between the center of the blotted pixel and the detector pixel.

Returns:
blot_modelsModelContainer

Container of blotted IFUImageModel

blot_images_nirspec()[source]

Core blotting routine for NIRSPEC.

This is the main routine for blotting the NIRSPEC median sky cube back to the detector space and creating a blotting image for each input model. This routine was split from the MIRI routine because the blotting for NIRSpec needs to be done slice by slice and an error in the inverse mapping (sky to detector) mapped too many values back to the detector. This routine adds a check and first pulls out the min and max RA and Dec values in the slice and only inverts the slice values back to the detector. For each data model loop over the 30 slices and find:

  1. the x, y bounding box of slice

  2. the RA, Dec, lambda values for the x, y pixels in the slice

  3. from step b, determine the min and max RA and Dec for slice values

  4. pull out the valid RA, Dec and lambda values from the median sky cube that fall within the min and max RA and Dec determined in step c

  5. invert the valid RA, Dec, and lambda values for the slice determined in step d to the detector

  6. blot the inverted x, y values to the detector plane. This step determines the overlap of the blotted x, y values with a regular grid setup in the detector plane which is the blotted image.

Returns:
blot_modelsModelContainer

Container of blotted IFUImageModel.

blot_info()[source]

Print the basic parameters of the blot image and median sky cube.