PyNOT : wave1d

This task will apply a wavelength solution obtained by the task pynot identify to a 1-dimensional spectrum extracted by pynot extract on a science image which has not been rectified using a 2D wavelength solution.

I highly recommend performing a 2D wavelength calibration using the task pynot wave2d; but in some cases you may want to limit the potential additional correlations introduced by the rectification, of the rectification may fail due to issues in the calibration image (over or under-exposed arc lines). In these cases, you can extract the spectrum of your object before performing the wavelength calibration. However, you should make sure that you extract the arc line spectrum used for the line identification at the same spatial position along the slit as your science spectrum. Otherwise you may introduce a systematic shift in your wavelength calibration.

Applying the wavelength solution from PyNOT identify

The files needed to perform the wavelength calibration are:

  1. Extracted 1D spectrum in a FITS table format. This is the default format from pynot extract.
  2. The pixel table. This is the output from the line identification step that translates the pixel position along the dispersion axis to wavelengths.

Controlling the wavelength sampling

The code then simply applies the given pixel-to-wavelength calibration converting each pixel value to its corresponding wavelength value. This results in a non-linear sampling with varying pixel size as a function of wavelength. PyNOT overcomes this by interpolating the spectrum onto a linearized wavelength grid resulting in a constant sampling with fixed pixel size in wavelength. If you want to skip this additional interpolation and keep the raw but varying pixel size, you can pass the option --no-int in the command line.

Logarithmic resampling:
You can also tell PyNOT to resample the spectrum onto a logarithmic grid instead of a linear grid. The number of pixels is conserved but the pixel size is rescaled to vary linearly with wavelength resulting in a fixed pixel size in velocity space. To do so, pass the command line option --log. This logarithmic resmapling can be very practical for certain scientific analyses (e.g., cross-correlations in redshift/velocity space).

Increased sampling:
In some cases you may want to increase the wavelength sampling. This is performed by increasing the number of pixels in the output wavelength grid in either linear or log-space. By default, the number of detector pixels determines the native sampling, however, you can use the command line option --npix to bypass this as set a higher or lower number of pixels.

Example commands

In order to perform a wavelength calibration of the 1D spectrum 'object_1D.fits' (must be a FITS table format) using the identified list of reference calibration lines 'pixeltab.dat' (from PyNOT identify), you can run:

pynot wave1d object_1D.fits --table pixeltab.dat  --output object_1D_wavecal.fits
which will create the wavelength calibrated 1D spectrum named 'object_1D_wavecal.fits' in this case. Note that it's mandatory to give an output filename with the -o (or --output) option.
If we want to set the sampling at a fixed number of 3000 pixels, then we can include the following option:
pynot wave1d object_1D.fits --table pixeltab.dat  --output object_1D_wavecal.fits --npix 3000
And if we instead want to resample the spectrum onto a logarithmic grid of 3000 pixels, then we include the --log option:
pynot wave1d object_1D.fits --table pixeltab.dat  --output object_1D_wavecal.fits --npix 3000 --log

Example Syntax

pynot wave1d --table TABLE -o OUTPUT input


Full example of command line syntax:

pynot wave1d [-h] --table TABLE -o OUTPUT [--order_wl ORDER_WL] [--log] [--npix NPIX] [--no-int] input



Overview of parameters

input
Input filename of 1D spectrum (FITS Table format)
--table
Pixeltable of line identification from 'PyNOT-identify' [REQUIRED]
--output (-o)
Output filename of wavelength calibrated 1D spectrum (FITS table) [REQUIRED]
Optional Arguments:
--order_wl: None
Polynomial order for fitting wavelength solution
--log: False
Create logarithmically binned spectrum
--npix: None
Number of pixels in output spectrum (default= number of input pixels)
--no-int: True
Do not interpolate data onto linearized grid!