STScI logoSTSDAS Help Pages
velocity fabry velocity

NAME · USAGE · PARAMETERS · DESCRIPTION · PLOTS · EXAMPLES
TIME_REQUIREMENTS · BUGS · SEE_ALSO

NAME

velocity -- construct velocity maps from the fabry-perot image cube

USAGE

velocity cube_image root lambda_rest

PARAMETERS

cube_image
the name of the image cube to be analyzed
root
the root name of the output images to be created
lambda_rest
the rest wavelength, in Angstroms, of the observed spectral line
dir_plot
the name of a file which will contain a pixel versus frame number directory for the mosaics of spectra if plot=yes is selected.
metacode
the name of a file to contain the plot metacode output if plot=yes is selected.
x= 0
the starting column of the cube for which output is desired. If set to 0, the first column is used.
x= 0
the last column of the cube for which output is desired. If set to zero, the last column of the input cube is used.
y= 0
the starting row of the cube for which output is desired. If set to 0, the first row is used.
y= 0
the last row of the cube for which output is desired. If set to zero, the last row of the input cube is used.
navgx = 3
the number of columns to use if averaging is in effect.
navgy = 3
the number of rows to use if averaging is in effect.
x_offset = 1
an offset in columns may have been introduced if the current cube is a subsection of a larger one for which the header parameters are otherwise correct. This parameter is the column position of the start of the subsection.
y_offset = 1
an offset in rows may have been introduced if the current cube is a subsection of a larger one for which the header parameters are otherwise correct. This parameter is the rows position of the start of the subsection.
v_limit = 1000.
the maximum allowable error in velocity (km/s) before averaging is to take effect. Should the error be larger than this value the "navgx" by "navgy" pixels will be averaged for each velocity solution.
block = no
if set to yes, and no solution was found for the current pixel, block averaging of "navgx" by "navgy" is also attempted. Otherwise no solution is found for the current pixel.
plot = no
if set to yes, a plot of the spectrum and the associated fit, if any, is written to the metacode file.
verbose = yes
if set to yes, a running status is given at each row for a selection of pixels inthe form of the derived velocity.

DESCRIPTION

Each pixel in the image cube can be associated with a wavelength defined by its position in the x,y plane, and the parameters for the band: etalon gap, x-shift, y-shift, lambda-0, and the x,y centers for the calibration ring for that band, and the dispersion coefficients A, B, and C. (Actually A is replaced by the band lambda-0).

A spectrum is constructed by extracting the congruent pixels from each band, and deriving their wavelengths. This spectrum is then sky subtracted using the sky values from the image header, and normalized using the normalization factors in the image header. The corrected spectrum is fit to a Gaussian funtion in which the parameters: continuum level, peak intensity, and central wavelength are derived. The central wavelength is compared with the parameter "lambda_rest" to calculate a velocity. Since the fit may fail to converge (a non-linear least squares solved by the differential technique), the values are all set to a BADPIX value. Should a solution be found, a second attempt is made, but adding a fourth parameter, velocity width (the sigma of the Gaussian). Should this fail to converge, the first attempt is resurrected. If either fit should succeed, the formal errors of the fit are also computed.

At the option of the user, if the error in velocity exceeds the "v_limit" parameter, the fit may be recomputed using a spectrum now derived by averaging the intensities from the "navgx" by "navgy" pixels. Or if no fit could be found, the same option to refit can be selected by setting the "block" parameter to yes. Either of these options doubles the compute time since the fit must be recalculated for that pixel. But since, in general, most pixels have little signal and produce no answer, the use of block=yes, can double the time for the entire calculation, to analyze the least useful pixels.

The user may select to fit a subsection of the image by specifying the corners of the image area of interest: x1, x2, y1, y2. If the user has extracted a subsection of the original data cube, then the pixel coordinates no longer refer to those defined by the calibration image, and the parameters "x_offset" and "y_offset" must be specified, or the computed wavelengths will be shifted.

The output from the fits are stored in 8 new pictures for the velocity, velocity dispersion (sigma), peak intensity, and continuum intensity, and their associated errors. These are pictures of type REAL, and will have image names built from the parameter "root", and having suffixes of "vel","vdi","int", and "con" for the 4 pictures just described, and their errors "eve","evd", "ein", and "eco". So a root name of ngc300 will lead to pictures of ngc300vel, ngc300vdi, and so forth.

The value chosen for BADPIX is EPSILONR - the minimum machine discernable difference from 1.0. This is very close to 0.0 on the scale of most velocities, and so does not disturb plots or displayed images, but may still be tested in an IF statement, and is differentiable from a true 0.0. Maybe BADPIX=0 would be just as good.

PLOTS

By setting the "plot" parameter to yes, plots of the spectra at each pixel are generated, along with the derived Gaussian fit. The plots are packed 25 per frame, and labeled by pixel, the derived central wavelength, the derived sigma in km/s, and the number of pixels block averaged to generate the spectrum.

The plots are written to a metacode file so that when vast quantities of plots are generated (a 100x100 image generates 10,000 spectra, and 400 pages at 25 per page), the user may select from a directory which pixels are of special interest. The GKI tools in the plot package, in particular, GKIDIR, GKIEXTRACT, and GKIMOSAIC, may be used to plot the few interesting frames.

The metacode file is assigned a name by the user, and requires typically 2000 bytes of storage per spectrum. (Note that a 100x100 image would require 20 Mbytes to store the plots!) The file assigned to "dir_plot" simply identifies the ranges of pixels plotted on each frame of 25 plots.

Note also that plot generation roughly doubles or triples the total execution time for the analysis, and so plotting is recommended for only those regions of special interest.

EXAMPLES

Analyze the cube to produce a velocity map ngc224vel, and block average the pixels to 5x5 if the error in velocity exceeds 30 km/s

cl> velocity cube224 ngc224 5006.85 v_limit=30 navgx=5 navgy=5

Plot the spectra from the region near the central 32x32 pixels of a 256x256 cube.

cl> velocity cube224 ngc224 5006.85 v_limit=30 plot=yes
>>> dir_plot=pdir meta=mcfile y1=241 y2=272 x1=241 x2=272

TIME REQUIREMENTS

Each pixel requires roughly 0.1 seconds for a cube having 10 bands. If the options block=yes, or v_limit=(small value) are employed, then this time may double. The time may double yet again if plot=yes is also selected.

BUGS

The parameters navgx and navgy should be odd numbers: 3, 5, 7 ...

SEE ALSO

GKIMOSAIC, GKIEXTRACT, GKIDIR


Source Code · Search Form · STSDAS

Maintained by the Science Software Group at STScI
This file last updated on 17 Apr 1990