buildcal module

buildcal.buildcalibrations(inImage, inLam, mask, indir, outdir='./', order=3, lam1=1150, lam2=2400, R=25, trans=None, upsample=True, header=None, ncpus=8)[source]

Build the calibration files needed to extract data cubes from sequences of CHARIS reads.

Inputs: 1. inImage: Image class, should include count rate and ivar for

a narrow-band flatfield calibration image.
  1. inLam: wavelength in nm of inImage
  2. mask: bad pixel mask, =0 for bad pixels
  3. indir: directory where master calibration files live

Optional inputs: 1. outdir: directory in which to place 1. order: int, order of polynomial fit to position(lambda).

Default 3 (strongly recommended).
  1. lam1: minimum wavelength (in nm) of the bandpass
    Default 1150
  2. lam2: maximum wavelength (in nm) of the bandpass
    Default 2400
  3. R: spectral resolution of the PSFlets templates
    Default 25
  4. trans: ndarray, trans[:, 0] = wavelength in nm, trans[:, 1]
    is fractional transmission through the filter and atmosphere. Default None –> trans[:, 1] = 1
  5. header: FITS header, to which will be appended the shifts
    and rotation angle between the stored and the fitted wavelength solutions. Default None.
  6. ncpus: number of threads for multithreading.
    Default multiprocessing.cpu_count()

Returns None, writes calibration files to outdir.