kai.instruments

Attributes

module_dir

default_inst

Classes

Instrument

NIRC2

OSIRIS

OSIRIS Imager - after 2019

Module Contents

kai.instruments.module_dir[source]
class kai.instruments.Instrument[source]

Bases: object

hdr_keys[source]
get_bad_pixel_mask_name()[source]
get_filter_name(hdr)[source]
get_plate_scale(hdr)[source]
get_position_angle(hdr)[source]
get_parallactic_angle(hdr)[source]
get_instrument_angle(hdr)[source]
get_central_wavelength(hdr)[source]
get_gain(hdr)[source]
make_filenames(files, rootDir='', prefix='n')[source]
get_distortion_maps(date)[source]
get_align_type(errors=False)[source]
get_saturation_level()[source]
get_lin_corr_coeffs()[source]
class kai.instruments.NIRC2[source]

Bases: Instrument

name = 'NIRC2'[source]
hdr_keys[source]
bad_pixel_mask = 'nirc2mask.fits'[source]
distCoef = ''[source]
distXgeoim[source]
distYgeoim[source]
telescope = 'Keck'[source]
telescope_diam = 10.5[source]
get_filter_name(hdr)[source]
get_plate_scale(hdr)[source]

Return the plate scale in arcsec/pixel.

get_position_angle(hdr)[source]

Get the sky PA in degrees East of North.

get_parallactic_angle(hdr)[source]

Get the parallactic angle in degrees East of North

get_instrument_angle(hdr)[source]
get_central_wavelength(hdr)[source]

Return the central wavelength of the filter for this observation in microns.

get_gain(hdr)[source]
make_filenames(files, rootDir='', prefix='n')[source]
get_distortion_maps(hdr)[source]
get_align_type(hdr, errors=False)[source]
get_saturation_level()[source]

Set to the 95% saturation threshold in DN.

get_linearity_correction_coeffs()[source]

Returns coefficients (coeffs, as defined below) in order to perform linearity correction

x = (FITS_orig) / (No. of coadds)

norm = coeffs[0] + coeffs[1] * x + coeffs[2] * x^2

FITS_corrected = FITS_orig / norm

From Stanimir Metchev’s linearity correction code (http://www.astro.sunysb.edu/metchev/ao.html)

class kai.instruments.OSIRIS[source]

Bases: Instrument

OSIRIS Imager - after 2019

name = 'OSIRIS'[source]
hdr_keys[source]
bad_pixel_mask = 'osiris_img_mask.fits'[source]
distCoef = ''[source]
distXgeoim[source]
distYgeoim[source]
telescope = 'Keck'[source]
telescope_diam = 10.5[source]
get_filter_name(hdr)[source]
get_plate_scale(hdr)[source]

Return the plate scale in arcsec/pix.

get_pcu_scale(hdr)[source]

The scale on the PCU pinhole mask, in mm (at the front focus) per pixel

get_pcuxyRef(hdr)[source]

The reference position, when the PCU is on-axis

get_position_angle(hdr)[source]

Get the sky PA in degrees East of North.

get_instrument_angle(hdr)[source]

Get the angle of the instrument w.r.t. to the telescope or AO bench in degrees.

get_parallactic_angle(hdr)[source]

Get the parallactic angle in degrees East of North

get_central_wavelength(hdr)[source]

Return the central wavelength of the filter for this observation in microns.

get_gain(hdr)[source]
make_filenames(files, rootDir='', prefix='')[source]
flip_images(files, rootDir='')[source]

Flip images (as they come from the detector flipped) and subtract reference pixels.

subtract_reference_pixels(img)[source]
get_distortion_maps(hdr)[source]
get_align_type(hdr, errors=False)[source]
get_saturation_level()[source]

Set to the 95% saturation threshold in DN.

kai.instruments.default_inst[source]