cwitools.synthesis.pseudo_nb

cwitools.synthesis.pseudo_nb(fits_in, wav_center, wav_width, pos=None, fit_rad=1, sub_rad=6, var_cube=None)

Create a pseudo-Narrow-Band (pNB) image from a data cube.

Input can be ~astropy.io.fits.HDUList, ~astropy.io.fits.PrimaryHDU or ~astropy.io.fits.ImageHDU. If HDUList given, PrimaryHDU will be used.

Returned objects will be of same type as input.

Parameters:
  • fits_in (astropy HDU or HDUList) – Input HDU/HDUList with 3D data.
  • wav_center (float) – The central wavelength of the pNB, in Angstrom.
  • wav_width (float) – The bandwidth of the pNB, in Angstrom.
  • pos (float tuple) – Provide the x,y location the source to subtract. Leave empty to skip white-light subtraction.
  • fit_rad (float) – Radius (px) to use for scaling the PSF.
  • sub_rad (float) – Radius (px) to use when subtracting PSF.
  • var_cube (NumPy.ndarray) – Variance cube associated with input cube. Provide to obtain variance estimates on pNB (and WL) images.
Returns:

pseudo-Narrowband image. HDU / HDUList*: The variance on the pNB image. HDU / HDUList*: White-light / broad-band image. HDU / HDUList*: The variance on the white-light image *Return type matches type of fits_in argument.

Return type:

HDU / HDUList*