addpec loads a file defining spectra and from this can generate a time series of spectra. See below for the format of the spectrum definition file.
addspec spectra data scale xover yover [seed xd yd yrms]
spectra | --- | Name of the spectrum definition file |
data | --- | Name of file or a file list to add spectra to. The times will be used if there are moving lines. |
scale | --- | Scale factor to multiply the input strengths by to give an easy way to change the effective brightness, telescope size etc. 1 implies no change. |
xover | --- | Oversampling factor (in terms of unbinned pixels) in the X direction, i.e. spectral direction. |
yover | --- | Oversampling factor (in terms of unbinned pixels) in the Y direction, i.e. spatial direction. |
seed | --- | Random number seed. This and succedding arguments is only prompted for if there is more than 1 image. |
xdrift, ydrift | --- | Drift per image in x and y. Note that X is the dispersion direction and therefore represents flexure while Y includes guiding as well. |
yrms | --- | RMS scatter in Y |
seeing1 | --- | Starting seeing, in pixels. It is assumed that the spectrum profile is gaussian. Then a linear ramp of seeing will be added to them with image number. The seeing is added in quadrature to the specified width. |
seeing2 | --- | Ending seeing, in pixels. It is assumed that the profiles given are without any seeing added. |
nreset | --- | Reset drift every nreset images. Simulates a position correction at the telescope. |
The best way to make a spectrum definition file is to generate one using gentemp and then to edit it directly. This will contain lines to define the position of the spectra such as
Position = 1 500.5 499.5 2 450 2The parameters define a polynomial as a function of x giving the y position of the spectrum concerned. The initial '1' indicates a 'normal' polynomial; the other option is not relevant. Then come the middle and half range of the polynomial, the number of coefficients (2) and their values. So in this case the Y position is 450 with a tilt of 2 pixels.
The FWHM of the profile is similarly defined:
FWHM = 1 500.5 499.5 3 3 0 0.5giving the width of the profile as a function of x position. Similarly the continuum flux:
Continuum = 1 500.5 499.5 2 100 20Finally there are lines that can be added to the continuum of the form
Lines = 2 300 1000 20 50000 0.05 0 550 300 15 50000 0.05 0This means add 2 gaussian lines each of which is defined by 6 parameters which are the central X position (pixels), the peak height in counts, the FWHM in pixels, a zero point for sinusoidal motion ephemeris (MJD), a period in days, and a semi-amplitude in pixels.
This command is a member of the classes: Programs, Spectra, Testing.
Author: T.R. Marsh
Created: 04 October 2005
Revised: 02 December 2006