wavelen

stistools.wavelen.adjust_disp(ncoeff, coeff, delta_offset1, shifta1, inang_info, delta_tan, delta_row, binaxis1)

Adjust the dispersion coefficients.

The changes to the coefficients are for the incidence angle correction, the offset from the SHIFTA1 keyword, and the tilt of the slit. The coefficients will be modified in-place.

Parameters:
ncoeff : int

number of dispersion coefficients

coeff : ndarray of float64

array of dispersion coefficients, modified in-place

delta_offset1 : float

incidence angle offset in degrees

shifta1 : float

MSM offset (ref. pixels) in the dispersion direction

delta_tan : float

difference in tangents of slit angle and ref angle

delta_row : float

difference between current row number and CRPIX2

binaxis1 : float

binning factor in dispersion direction

inang_info : rec_array

rows from the incidence-angle table

stistools.wavelen.compute_wavelengths(shape, phdr, hdr, helcorr)

Compute a 2-D array of wavelengths, one value for each image pixel.

Parameters:
shape : tuple of two ints

the number of rows and columns in the output image

phdr : fits Header object

primary header

hdr : fits Header object

extension header

helcorr : string

“PERFORM” if heliocentric correction should be done

Returns:
wavelengths : ndarray of float64

an array of wavelengths, of the same shape (nrows, ncols) as the output image

stistools.wavelen.get_delta_offset1(apdestab, aperture, ref_aper)

Get the incidence angle offset.

Parameters:
apdestab : string

name of the aperture description table

aperture : string

aperture (slit) name

ref_aper : string

name of the reference aperture, the one that was used to calculate the dispersion relation

Returns:
angle : float

incidence angle offset in degrees