IRAF help page for package noao.artdata, program mk1dspec

from NOAO mk1dspec -- Make/add artificial 1D spectraUSAGEPARAMETERSDESCRIPTIONKEYWORDSEXAMPLESREVISIONSSEE ALSO

mk1dspec -- Make/add artificial 1D spectra


USAGE

mk1dspec input


PARAMETERS

input

Spectra to create or modify.

output =

Output spectra when modifying input spectra. If no output spectra are given then existing spectra in the input list are modified directly. If an output list is given then it must match in number the input list.

ap = 1

Image line to be created or modified in images of dimension greater than 1.

rv = 0.

Radial velocity (km/s) or redshift, as selected by the parameter z, applied to line positions and continuum. Velocities are converted to redshift using the relativistic relation 1+z = sqrt ((1+rv/c)/(1-rv/c)). Note the shift is not a shift in the dispersion parameters but in the underlying artificial spectrum.

z = no

Is the velocity parameter a radial velocity or a redshift?

WHEN CREATING NEW SPECTRA

title =

Image title to be given to the spectra. Maximum of 79 characters.

ncols = 512

Number of columns.

naps = 1

Number of lines or apertures.

header = artdata$stdheader.dat

Image or header keyword data file. If an image is given then the image header is copied. If a file is given then the FITS format cards are copied. This only applies to new images. The data file consists of lines in FITS format with leading whitespace ignored. A FITS card must begin with an uppercase/numeric keyword. Lines not beginning with a FITS keyword such as comments or lower case are ignored. The user keyword output of imheader is an acceptible data file. See mkheader for further information.

wstart = 4000., wend = 8000.

Starting and ending wavelengths in Angstroms. The dispersion is determined by these values and the number of columns.

CONTINUUM PARAMETERS

continuum = 1000., slope = 0.

Continuum of the starting wavelength at rest and the slope of the continuum.

temperature = 5700.

Blackbody continuum temperture in Kelvin. A value of 0 is used if no blackbody continuum is desired. The intensity level is set by scaling to the continuum level of the starting wavelength at rest.

fnu = no

Compute the continuum as flux per unit frequency (F-nu) if yes or flux per unit wavelength (F-lambda) if no.

LINE PARAMETERS

lines =

List of spectral line files. Spectral line files contain lines of rest wavelength, peak, and widths (see the the DESCRIPTION section). The latter two parameters may be missing in which case they default to the task peak and sigma parameters. If no file or a new (nonexistent) file is specified then a number of random lines given by the parameter nlines is generated. If a new file name is specified then the lines generated are recorded in the file. If the list of spectral line files is shorter than the list of input spectra, the last spectral line list file is reused.

nlines = 0

If no spectral line file or a new file is specified then the task will generate this number of random spectral lines. The rest wavelengths are uniformly random within the limits of the spectrum, the peaks are uniformly random between zero and the value of the peak parameter and the width is fixed at the value of the sigma parameter. If a redshift is applied the rest wavelengths are shifted and repeated periodically.

peak = -0.5

The maximum spectral line peak value when generating random lines or when the peak is missing fromthe spectral line file. This value is relative to the continuum unless the continuum is zero. Negative values are absorption lines and positive values are emission lines.

sigma = 10.

The default line width as a gaussian sigma in Angstroms when generating random lines or when the width is missing from the spectral line file.

seed = 1

Random number seed.

comments = yes

Include comments recording task parameters in the image header?

PACKAGE PARAMETERS

nxsub = 10

Number of pixel subsamples used in computing the gaussian spectral line profiles.

dynrange = 100000.

The gaussian line profiles extend to infinity so a dynamic range, the ratio of the peak intensity to the cutoff intensity, is imposed to cutoff the profiles.


DESCRIPTION

This task creates or modifies one dimensional spectra. with a combination of blackbody and linear sloped continuum and emission and absorption gaussian profile spectral lines. 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 profiles of specified wavelength, peak, and sigma. The lines are defined in a spectral line file or generated randomly. A spectral line file consists of text lines giving rest wavelength, peak, and sigma. The sigma or the sigma and peak may be absent in which case the parameters sigma and peak will be used. If peak values are missing random values between zero and the peak value are generated. Thus, a simple list of wavelengths or a list of wavelengths and peaks may be used.

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 widths are given by the sigma parameter. 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 width values are gaussian sigmas given in Angstroms.

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 sigma 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.


KEYWORDS

The wavelengh parameters are written to the parameters W0, WPC, CRPIX1, CRVAL1, and CDELT1. Note that the keyword DC-FLAG is not created so some tasks may consider the spectra to not be dispersion corrected.


EXAMPLES

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 10
	4200 -.2 10
	4300 -.3 10
	5100 -.9 1
	5200 -.9 2
	5300 -.9 4
	6700 .9 4
	6800 .9 2
	6900 .9 1
	7700 .3 10
	7800 .2 10
	7900 .1 10
	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 3.2
	5000 -200 3.2
	[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

REVISIONS

REVISIONS

MK1DSPEC V2.10.3

The format parameter was eliminated and the task updated to produce the current coordinate system format.


SEE ALSO

mknoise, mk2dspec, mkheader, onedspec.sinterp,


This page automatically generated from the iraf .hlp file. If you would like your local iraf package .hlp files converted into HTML please contact Dave Mills at NOAO.

dmills@noao.edu