kai.reduce.dar

Module Contents

Functions

get_atm_conditions(year)

Retrieve atmospheric conditions from CFHT archive website,

keckDARcoeffs(lamda, year, month, day, hour, minute)

Calculate the differential atmospheric refraction

kaidar(fitsFile, instrument=instruments.default_inst)

Use the FITS header to extract date, time, wavelength,

darPlusDistortion(inputFits, outputRoot, xgeoim=None, ygeoim=None, instrument=instruments.default_inst)

Create lookup tables (stored as FITS files) that can be used

applyDAR(inputFits, spaceStarlist, plot=False, instrument=instruments.default_inst, plotdir='./')

inputFits: (str) name of fits file associated with this starlist

splitAtmosphereCFHT(year)

Take an original archive file containing atmospheric parameters and

test_darPlusDistortion()

Attributes

p2

module_dir

kai.reduce.dar.p2 = False[source]
kai.reduce.dar.module_dir[source]
kai.reduce.dar.get_atm_conditions(year)[source]

Retrieve atmospheric conditions from CFHT archive website, then calls dar.splitAtmosphereCFHT() to separate the data by months.

kai.reduce.dar.keckDARcoeffs(lamda, year, month, day, hour, minute)[source]

Calculate the differential atmospheric refraction for two objects observed at Keck.

Input: lamda – Effective wavelength (microns) assumed to be the same for both year, month, day, hour, minute of observation (HST)

Output: refA refB

kai.reduce.dar.kaidar(fitsFile, instrument=instruments.default_inst)[source]

Use the FITS header to extract date, time, wavelength, elevation, and image orientation information. This is everything that is necessary to calculate the differential atmospheric refraction. The differential atmospheric refraction is applicable only along the zenith direction of an image. This code calculates the predicted DAR using archived CFHT atmospheric data and the elevation and wavelength of the observations. Then the DAR correction is transformed into image coefficients that can be applied in image coordinates.

kai.reduce.dar.darPlusDistortion(inputFits, outputRoot, xgeoim=None, ygeoim=None, instrument=instruments.default_inst)[source]

Create lookup tables (stored as FITS files) that can be used to correct DAR. Optionally, the shifts due to DAR can be added to existing NIRC2 distortion lookup tables if the xgeoim/ygeoim input parameters are set.

Inputs: inputFits - a NIRC2 image for which to determine the DAR correction outputRoot - the root name for the output. This will be used as the

root name of two new images with names, <outputRoot>_x.fits and <outputRoot>_y.fits.

Optional Inputs: xgeoim/ygeoim - FITS images used in Drizzle distortion correction

(lookup tables) will be modified to incorporate the DAR correction. The order of the correction is 1. distortion, 2. DAR.

kai.reduce.dar.applyDAR(inputFits, spaceStarlist, plot=False, instrument=instruments.default_inst, plotdir='./')[source]

inputFits: (str) name of fits file associated with this starlist

spaceStarlist: (astropy table) must include columns ‘x0’ and ‘y0’.

Input a starlist in x=RA (+x = west) and y=Dec (arcseconds) taken from space and introduce differential atmospheric refraction (DAR). The amount of DAR that is applied depends on the header information in the input fits file. The resulting output starlist should contain what was observed after the starlight passed through the atmosphere, but before the starlight passed through the telescope. Only achromatic DAR is applied in this code.

returns spaceStarlist with updated ‘x0’ and ‘y0’

kai.reduce.dar.splitAtmosphereCFHT(year)[source]

Take an original archive file containing atmospheric parameters and split it up into seperate files for individual months. This makes later calls to calculate DAR parameters MUCH faster.

kai.reduce.dar.test_darPlusDistortion()[source]