| mk1dspec | noao.artdata | mk1dspec |
mk1dspec -- Make/add artificial 1D spectra
mk1dspec input
WHEN CREATING NEW SPECTRA
CONTINUUM PARAMETERS
LINE PARAMETERS
gaussian - Gaussian profile
lorentzian - Lorentzian profile
voigt - Voigt profile
PACKAGE PARAMETERS
This task creates or modifies one dimensional spectra. with a combination of blackbody and linear sloped continuum and emission and absorption spectral lines. The spectral lines may be gaussian, lorentzian, or voigt profiles. A velocity shift may be applied to the underlying artificial spectrum which is shifted into the specified observed wavelength region. No noise is included but may be added with the task mknoise . New spectra are created with the specified number of pixels, wavelength range, and real datatype. When nlines is greater than 1 then an image with the specified number of lines is created though only the line given by the ap is will have a spectrum. Existing spectra may be modified in place or new spectra output. Spectra are modified by adding the continuum and lines defined by the parameters.
For new images a set of header keywords may be added by specifying an image or data file with the header parameter (see also mkheader ). If a data file is specified lines beginning with FITS keywords are entered in the image header. Leading whitespace is ignored and any lines beginning with words having lowercase and nonvalid FITS keyword characters are ignored. In addition to this optional header, parameters for the wavelength coordinates are defined. Finally, comments may be added to the image header recording the task parameters and any information from the line file which are not line definitions.
Initially all spectra are created without a dispersion function; i.e. pixel coordinates. For multiple spectra in an image this task must be executed for each image line to set the dispersion function and add data. When an image line is selected if it has a defined dispersion function that is used otherwise the task wavelength parameters are used.
A continuum is defined by the value at the starting wavelength at rest, a slope, and a blackbody function of a given temperture. The blackbody function is scaled to have the specified continuum value at the starting wavelength at rest. The blackbody flux units are per unit wavelength (F-lambda). A zero continuum value or a zero temperture will not produce a blackbody continuum.
Spectral lines are modeled by gaussian, lorentzian, or voigt profiles of specified wavelength, peak, and widths. The lines are defined in a spectral line file or generated randomly. A spectral line file consists of text lines giving rest wavelength, peak, profile type, gaussian full width at half maximum and/or lorentzian full width at half maximum. Only the wavelength is required and subsequent fields may be missing or given as INDEF. The following table shows the possible formats where wavelength, peak, gfwhm, and lfwhm are values of wavelength, peak, gaussian FWHM, and lorentzian FWHM. The profile types are as shown though they may be abbreviated to one character.
wavelength wavelength peak wavelength peak gaussian wavelength peak gaussian gfwhm wavelength peak gaussian gfwhm wavelength peak lorentzian wavelength peak lorentzian lfwhm wavelength peak lorentzian lfwhm wavelength peak voigt wavelength peak voigt gfwhm wavelength peak voigt gfwhm lfwhm wavelength peak voigt gfwhm lfwhm
When a field is missing or INDEF the values given by the parameters peak , profile , gfwhm , and lfwhm are used. If a peak value is missing, random values between zero and the peak value are generated. Note that to get random line intensities with some specified profile type and widths the value INDEF would be used for the peak field.
If no spectral line file is specified or a new (nonexistent) file is named then the number of random lines given by the parameter nlines is generated. The rest wavelengths are uniformly random within the wavelength range of the spectrum and extend periodically outside this range in the case of an applied velocity shift, the peaks are uniformly random between zero and the peak parameter, and the profile type and widths are given by the profile , gfwhm , and lfwhm parameters. If a new file is named then the parameters of the generated lines will be output.
The peak values are taken relative to a positive continuum. In other words the generated line profile is multiplied by the continuum (with a minimum of zero for fully saturated absorption lines). If the continuum is less than or equal to zero, as in the case of an artificial arc spectrum or pure emission line spectrum, then the peak values are absolute intensities. Positive peak values produce emission lines and negative values produce absorption lines. Odd results will occur if the continuum has both positive and zero or negative values.
The underlying rest spectrum may be shifted. This is used primarily for testing radial velocity measuring algorithms and is not intended as a complete model of redshift effects. The starting and ending wavelengths are not changed by redshifting; these are the instrumental observed wavelengths. Input line wavelengths are specified at rest and then shifted into or out of the final spectrum. To be realistic the line list should include wavelengths over a great enough range to cover all desired redshifts. The peaks and widths are also appropriately modified by a redshift. As an example, if the redshift is 1 the lines will appear broader by a factor of 2 and the peaks will be down by a factor of 2 in order to maintain the same flux.
The random line generation is difficult in that one wants to have the same set of lines (for a given seed) observed at different redshifts. What is done is that the specified number of random lines is generated within the observed wavelength interval taken at rest. This set is then repeated periodical over all wavelengths. A redshift will then shift these rest lines in to or out of the observed spectrum. If the lines are output, they are given at rest. Note that this periodicity may be important in interpreting cross correlation redshift tests for large shifts between template and object spectra.
The definitions of the continuum are also affected by a redshift. The reference point for the continuum level, slope, and blackbody continuum is the starting wavelength taken at rest. Shifts will then modify the continuum level at the first pixel appropriately. In particular a large redshift will shift the blackbody in such a way that the flux is still given by the continuum parameter at the starting wavelength at rest.
1. Create a simple blackbody continuum between the default wavelengths.
cl> mk1dspec bb title=Blackbody
2. Create a random absorption spectrum on a blackbody continuum without saving the line list.
cl> mk1dspec bbab title=Absorption nlines=100
3. Create a random absorption spectrum with noise and cosmic rays.
cl> mk1dspec bbab title=Absorption nlines=100 cl> mknoise bbab rdnoise=10 poisson+ ncos=5 energy=1000
4. Create a random emission spectrum on a blackbody continuum and save the line list.
cl> mk1dspec bbem title=Emission nl=30 peak=0.6 lines=bbem.dat
5. Create an artificial random arc line spectrum.
cl> mk1dspec arc title="Arc lines" cont=0 peak=500 nl=30
6. Create a test spectrum with a line list.
cl> type linelist 4100 -.1 g 20 4200 -2. g 20 4300 -.3 g 20 5100 -.9 g 2 5200 -.9 g 4 5300 -.9 g 8 6700 .9 g 8 6800 .9 g 2 6900 .9 g 4 7700 .3 g 20 7800 .2 g 20 7900 .1 g 20 cl> mk1dspec testspec title=Test cont=500 temp=0 lines=linelist
7. Add absorption lines to a spectrum.
cl> mk1dspec bb out=artspec cont=0 lines=STDIN 4300 -60 5000 -200 [EOF]
Normally the input spectrum would be a real spectrum.
8. Make two spectra taken from the same set of random lines but differing in redshift.
cl> mk1dspec restspec nl=30 cl> mk1dspec redspec rv=3000 nl=30 cl> mk1dspec bluespec rv=-.01 z+ nl=30
9. Make a multispec image with 5 apertures and a range of redshifts.
cl> mk1dspec spec.ms ap=1 nl=30 rv=0 naps=5 cl> mk1dspec spec.ms ap=2 nl=30 rv=1000 cl> mk1dspec spec.ms ap=3 nl=30 rv=2000 cl> mk1dspec spec.ms ap=4 nl=30 rv=3000 cl> mk1dspec spec.ms ap=5 nl=30 rv=4000
mknoise, mk2dspec, mkheader, onedspec.sinterp