middle_from_wcs

jwst.extract_1d.source_location.middle_from_wcs(wcs, bounding_box, dispaxis)[source]

Calculate the effective middle of the spectral region.

Parameters:
  • wcs (WCS) – WCS for the input data model, containing detector to wavelength transforms.

  • bounding_box (tuple) – A pair of tuples, each consisting of two numbers. Represents the range of useful pixel values in both dimensions, ((xmin, xmax), (ymin, ymax)).

  • dispaxis (int) – Dispersion axis.

Returns:

  • middle_disp (float) – Middle pixel in the dispersion axis.

  • middle_xdisp (float) – Middle pixel in the cross-dispersion axis.

  • middle_wavelength (float) – Wavelength at the middle pixel.