IRAF help page for package noao.twodspec.multispec, program newimage

from NOAO newimage -- Create a new multi-spectra imageUSAGEPARAMETERSDESCRIPTIONEXAMPLESSEE ALSO

newimage -- Create a new multi-spectra image


USAGE

newimage image output


PARAMETERS

image

Image to be used to create the new image.

output

Filename for the new multi-spectra image.

lower = -10

Lower limit for model profiles. It is measured in pixels from the spectra centers defined by the position functions in the database.

upper = -10

Upper limit for model profiles. It is measured in pixels from the spectra centers defined by the position functions in the database.

lines = *

Image lines of the multi-spectra image to be in the new multi-spectra image.

ex_model = no

Create a model image?

clean = yes

Replace bad pixels with model values? The following parameters are used:

nreplace = 1000.

Maximum number of pixels to be replaced per image line when cleaning with model gauss5 or maximum number of pixels to be replaced per spectrum when cleaning with model smooth.

sigma_cut = 4.

The cleaning threshold in terms of the predicted pixel sigma.

niterate = 1

Maximum number of cleaning iterations per line when cleaning with model gauss5.

model = smooth

Choice of gauss5 or smooth. Minimum match abbreviation is allowed. This parameter is required only if ex_model = yes or clean = yes.

fit_type = 2

Model fitting algorithm for model gauss5.

naverage = 20

Number of lines to be averaged in model smooth.

interpolator = spline3

Type of image interpolation function to be used. The choices are "nearest", "linear", "poly3", "poly5", and "spline3". Minimum match abbreviation is allowed.

verbose = no

Print verbose output?


DESCRIPTION

A new multi-spectra image is created using the description of the multi-spectra image in the MULTISPEC database associated with image. The user selects the image lines from the original image to be in the new image. The options allow the creation of model images or images in which the bad or deviant pixels are replaced by model profile values.

If ex_model = yes or clean = yes model spectra are fit to the spectra in the image. There are two models: a five parameter Gaussian profile called gauss5 and profiles obtained by averaging naverage image lines surrounding the image line being modeled called smooth. The model is selected with the parameter model.

When ex_model = yes an image containing model spectra is produced.

When clean = yes pixels with large residuals from the model are detected and removed from the model fit. The selected model is fit to the pixels which are not in the bad pixel list (not yet implemented) and which have not been removed from the model fit. The sigma of the fit is computed. Deviant pixels are detected by comparing them to the model to determine if they differ by more than sigma_cut times the sigma. The model fit is iterated, removing deviant pixels at each iteration, until no more pixels are found deviant or nreplace pixels have been found. The pixels removed or in the bad pixel list are then replaced with model values. (To clean and extract the spectra with this algorithm see msextract.)

There are some technical differences in the model fitting and cleaning algorithms for the two models. In model smooth the fit for the profile scale factors is done independently for each spectrum and automatically corrected when a bad pixel is detected. This fitting process is fast and rigorous. The parameter nreplace in this model refers to the maximum number of pixels replaced per spectrum.

In model gauss5, however, the profile scale factors are fit to the entire image line (hence its ability to fit blended spectra). There are two fitting algorithms; a rigorous simultaneous fit and an approximate method. The simultaneous fit is selected when fit_type = 1. This step is relatively slow. The alternative method of fit_type = 2 sets the scale factor for each spectrum by taking the median scale, where scale = data / model profile, for the three pixels nearest the center of the profile. The median minimizes the chance of a large error due to a single bad pixel. This scale may be greatly in error in the case of extreme blending but is also quite fast; the extraction time is reduced by at least 40%. The steps of profile fitting and deviant pixel detection are alternated and the maximum number of iterations through these two steps is set by niterate. The default of 1 means that the model fitting is not repeated after detecting deviant pixels.

The option verbose can be used to print the image lines being extracted and any pixels replaced by the cleaning process.


EXAMPLES

To create a cleaned version of the image using model smooth for cleaning:

cl> newimage image newimage

To create an model image using model gauss5:

cl> newimage image newimage ex_model=yes model="gauss5"


SEE ALSO

msextract,


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