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:
ncoeffint

number of dispersion coefficients

coeffndarray of float64

array of dispersion coefficients, modified in-place

delta_offset1float

incidence angle offset in degrees

shifta1float

MSM offset (ref. pixels) in the dispersion direction

delta_tanfloat

difference in tangents of slit angle and ref angle

delta_rowfloat

difference between current row number and CRPIX2

binaxis1float

binning factor in dispersion direction

inang_inforec_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:
shapetuple of two ints

the number of rows and columns in the output image

phdrfits Header object

primary header

hdrfits Header object

extension header

helcorrstring

"PERFORM" if heliocentric correction should be done

Returns:
wavelengthsndarray 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:
apdestabstring

name of the aperture description table

aperturestring

aperture (slit) name

ref_aperstring

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

Returns:
anglefloat

incidence angle offset in degrees