pypeit.core.wavecal.echelle module
Module for echelle-specific wavelength calibration functions.
- pypeit.core.wavecal.echelle.identify_ech_orders(arcspec, echangle, xdangle, dispname, angle_fits_file, composite_arc_file, debug=False, pad=3)[source]
Identify the orders in the echelle spectrum via cross correlation with the best guess predicted arc based on echangle, xdangle, and cross-disperser
- Parameters:
arcspec (numpy.ndarray) – Extracted arc spectrum, shape = (nspec, norders)
echangle (float) – Echelle angle
xdangle (float) – Cross-disperser angle
dispname (str) – Cross-disperser. E.g. for Keck HIRES this is either ‘UV’ or ‘RED’
angle_fits_file (str) – File containing the fits to wavelength solution vs echangle and xdangle
composite_arc_file (str) – File containing the archived composite arcs for each order.
pad (int, optional) – Number of orders to pad the coverage by on the blue and red side.
debug (bool, optional) – Passed to xcorr_shift
- Returns:
order_vec (numpy.ndarray) – Array of order numbers corresponding to the input arcspec, shape = (norders,)
wave_soln_guess (numpy.ndarray) – Array containing the predicted wavelength solution, shape = (nspec, norders)
arcspec_guess (numpy.ndarray) – Array containing the predicted arc spectrum, shape = (nspec, norders)
- pypeit.core.wavecal.echelle.predict_ech_arcspec(angle_fits_file, composite_arc_file, echangle, xdangle, xdisp, nspec, norders, pad=3)[source]
Predict the echelle arc spectrum using the fits to wavelength solution vs echangle and xdangle and the archived composite arcs.
- Parameters:
angle_fits_file (str) – File containing the fits to wavelength solution vs echangle and xdangle
composite_arc_file (str) – File containing the archived composite arcs for each order.
echangle (float) – Echelle angle
xdangle (float) – Cross-disperser angle
xdisp (str) – Cross disperser. E.g. for Keck HIRES this is either ‘UV’ or ‘RED’
nspec (int) – Number of spectral pixels in the echelle spectrum
norders (int) – Number of orders in the echelle spectrum
pad (int) – Number of orders to pad the coverage by on the blue and red side.
- Returns:
order_vec_guess (numpy.ndarray) – Vector of order numbers for the predicted echelle spectrum. Shape = (norders,)
wave_soln_guess (numpy.ndarray) – Predicted wavelength solution. Shape = (nspec, norders)
arcspec_guess (numpy.ndarray) – Predicted echelle arc spectrum. Shape = (nspec, norders)
- pypeit.core.wavecal.echelle.predict_ech_order_coverage(angle_fits_params, xd_angle_coeffs, xdisp, xdangle, norders, pad=0)[source]
Predict the coverage of orders in the echelle spectrum using the disperser dependent fits of the reddest order as a function of xdangle.
- Parameters:
angle_fits_params (astropy.table.Table) – Table holding the arxiv parameters
xd_angle_coeffs – Table holding the arxiv data
xdisp (str) – Corss disperser. For HIRES this is either ‘UV’ or ‘RED’
xdangle (float) – Cross-disperser angle.
norders (int) – Number of orders identified on the detector
pad (int) – Number of orders to pad the coverage by on the blue and red side.
- Returns:
Array of order numbers for the predicted coverage.
- Return type:
- pypeit.core.wavecal.echelle.predict_ech_wave_soln(angle_fits_params, ech_angle_coeffs, ech_angle, order_vec, nspec)[source]
Predict an echelle spectrum wavelength solution for each order by evluating the polynomial fits of wavelength solution coefficients vs echelle angle at the given echelle angle.
- Parameters:
angle_fits_params (astropy.table.Table) – Table holding the parameters governing the echelle angle fits
ech_angle_coeffs (numpy.ndarray) – Array holding the polynomial coefficients for the fits of the wavelength solution polynomial coefficients vs echelle angle.
ech_angle (float) – Echelle angle
order_vec (numpy.ndarray) – Array of order numbers for the deisred predicted spectrum. Shape = (norders,)
nspec (int) – Number of spectral pixels in the echelle spectrum
- Returns:
Array containing the predicted echelle spectrum. Shape is (nspec, norders)
- Return type: