STScI Logo

eqwidth



.help eqwidth Feb05 rvsao
.ih
NAME
eqwidth -- bandpass spectrophotometry of spectra
.ih
USAGE
eqwidth input output bands
.ih
PARAMETERS
.ls input
Input list of spectra to be measured.  These may be one dimensional
spectra in individual or "multispec" format or calibrated spatial spectra such
as long slit or Fabry-Perot images.  The dispersion axis and summing
parameters are specified by package parameters for the spatial spectra.
.le
.ls output
Output file for the results.  This may be a filename or "STDOUT" to
write to the terminal.
.le
.ls bands
Bandpass file consisting of lines with one, two, or three bandpasses per
line.  A bandpass is specified by an identification string (quoted if it is
null or contains whitespace), the central wavelength, the width of the
bandpass in wavelength, and a filter filename with the special value "none"
if there is no filter (a flat unit response).  This format is described
further in the description section.
.le
.ls apertures = ""
List of apertures to select from the input spectra.  For one dimensional
spectra this is the aperture number and for spatial spectra it is
the column or line.  If the null string is specified all apertures are
selected.  The aperture list syntax is a range list which includes
intervals and steps (see \fBranges\fR).
.le
.ls normalize = yes
Normalize the bandpass fluxes by the bandpass response?  If no then
the results will depend on the bandpass widths and filter function
values.  If yes then fluxes will be comparable to an average pixel
value.  When computing indices and equivalent widths the flux must
either be normalized or the bandpasses and filter response functions
must be the same.
.le
.ls fitcont = no
Fit continuum instead of computing at specific points (yes or no)
.le
.ls mag = no, magzero = 0.
Output the bandpass fluxes as magnitudes with specified magnitude zero point?
.le
.ls bindim = 0
Number of rows in unbinned (bin by one) spectrum.  Bin by 4 if less than
half this; bin by 2 if less than this; else bin by 1.
.le
.ls netflux = no
Compute net flux from emission region instead of eqwidth by subtracting
the mean continuum per pixel times the number of pixels in the region.
.le
.ls byexp = no
Convert to counts per second (exposure normalization)
.le
.ls bypix = no
Convert to counts per row (spatial normalization across the dispersion)
.le
.ls torest = no
Shift from observed velocity to zero velocity if yes
.le
.ls device = "stdgraph"
Display device
.le
.ls obj_plot = no
Plot the raw object data
.le
.ls obj_int = no
Interact with plot of raw object data
.le
.ls cont_plot = no
Plot the continuum fit to the data
.le
.ls contsub_plot = no
Plot the continuum-subtracted data
.le
.ls contsub_int = no
Interact with plot of continuum-subtracted data
.le
.ls nsmooth = 0
Number of times to 1-2-1 smooth plotted spectra
.le
.ls nsum = 1
Number of pixels to sum across dispersion
.le
.ls verbose = yes
Include a verbose header giving a banner, the parameters used,
the bandpasses, and column headings?
.le
.ls debug = no
Print debugging info?
.le
.ls cursor = ""
Graphics cursor input
.le
.ih
DESCRIPTION
\fBeqwidth\fR performs bandpass spectrophotometry with one or more bandpasses
on one or more spectra.  A list of input spectra is specified.  The spectra
may be of any type acceptible in the \fBnoao.onedspec\fR package including
multispec format with nonlinear dispersion, long slit spectra, and even
3D cubes with one dispersion axis.  The \fIapertures\fR parameter allows
selecting a subset of the spectra by aperture number.

The bandpasses are specified in a text file.  A bandpass consists of four
fields; an identification name, the wavelength of the bandpass center, a
bandpass width, and a filename for a filter.  The identification is a
string which must be quoted if a null name or a name with whitespace is
desired.  The identification could be given as the central wavelength if
nothing else is appropriate.  The filter field is a filename for a text
file containing the filter values.  A filter file consists of a wavelength
ordered list of wavelength and relative response.  Extrapolation uses the
end point values and interpolation is linear.  The special name "none" is
used if there is no filter.  This is equivalent to unit response at all
wavelengths.

In the bandpass file there may be one, two, or three bandpasses on
a line.  Below are some examples of the three cases:

.nf
   alpha 5000 10 myalpha.dat
   beta1 4000 100 none	     beta2 4100 100 none
   line  4500 100 none	     red   4000 200 none blue 5000 200 none
.fi

The flux in each bandpass is measured by summing each pixel in the interval
multiplied by the interpolated filter response at that pixel.  At the edges
of the bandpass the fraction of the pixel in the bandpass is used.  If the
bandpass goes outside the range of the data an INDEF value will be reported.
If the \fInormalize\fR option is yes then the total flux is divided by
the sum of the filter response values.  If the \fImag\fR option is
yes the flux will be converted to a magnitude (provided it is positive)
using the formula

.nf
    magnitude = magzero - 2.5 * log10 (flux)
.fi

where \fImagzero\fR is a parameter for the zero point magnitude and log10
is the base 10 logarithm.  Note that there is no attempt to deal with the
pixel flux units.  This is the responsiblity of the user.

If there is only one bandpass (on one line of the band file) then only
the band flux or magnitude is reported.  If there are two bandpasses
the fluxes or magnitudes for the two bands are reported as well as a
band index, the flux ratio or magnitude difference (depending on the \fImag\fR)
flag, and an equivalent width using the second band as the continuum.
If there are three bandpasses then a continuum bandpass flux is computed
as the interpolation between the bandpass centers to the center of the
first bandpass.  The special bandpass identification "cont" will
be reported.

The equivalent width is obtained from the two bandpasses by the
formala

.nf
    eq. width = (1 - flux1 / flux2) * width1
.fi

where flux1 and flux2 are the two bandpass fluxes and width1 is the
width of the first bandpass.  Note that for this to be meaningful
the bandpasses should be normalized or have the same width/response.

The results of measuring each bandpass in each spectrum are written
to the specified output file.  This file may be given as "STDOUT" to
write the results to the terminal.  The output file contains lines
with the spectrum name and aperture, the band identifications and
fluxes or magnitudes, and the band index and equivalent width (if
appropriate).  The \fIverbose\fR option allows creating a more
documented output by including a commented header with the task
name and parameters, the bandpass definitions, and column labels.
The examples below show the form of the output.
.ih
EXAMPLES
The following examples use artificial data and arbitrary bands.

1.  Show example results with one, two, and three bandpass entries in
the bandpass file.

.nf
    cl> type bands
    test 6125 50 none red 6025 100 none blue 6225 100 none
    test 6125 50 none red 6025 100 none
    test 6125 50 none blue 6225 100 none
    test 6125 50 none
    cl> eqwidth oned STDOUT bands

    # EQWIDTH: NOAO/IRAF IRAFX valdes@puppis Mon 15:31:45 01-Nov-93
    #   bands = bands, norm = yes, mag = no
    #       band     filter wavelength      width
    #       test       none      6125.        50.
    #        red       none      6025.       100.
    #       blue       none      6225.       100.
    #       test       none      6125.        50.
    #        red       none      6025.       100.
    #       test       none      6125.        50.
    #       blue       none      6225.       100.
    #       test       none      6125.        50.
    #
    #       spectrum    band    flux    band    flux   index eqwidth
	     oned(1)    test   44.33    cont   97.97    0.45   27.37
	     oned(1)    test   44.33     red   95.89    0.46   26.89
	     oned(1)    test   44.33    blue  100.04    0.44   27.84
	     oned(1)    test   44.33
.fi

2.  This example shows measurments on a long slit spectrum with an
aperture selection and magnitude output.

.nf
    cl> type leqwidth.dat
    band1 4500 40 none
    band2 4600 40 none
    band3 4700 40 none
    cl> nsum=5
    cl> eqwidth ls STDOUT leqwidth.dat apertures=40-60x5 mag+ magzero=10.1

    # EQWIDTH: NOAO/IRAF IRAFX valdes@puppis Mon 15:37:18 01-Nov-93
    #   bands = leqwidth.dat, norm = yes, mag = yes, magzero = 10.10
    #       band     filter wavelength      width
    #      band1       none      4500.        40.
    #      band2       none      4600.        40.
    #      band3       none      4700.        40.
    #
    #       spectrum    band     mag
     ls[38:42,*](40)   band1    3.14
     ls[38:42,*](40)   band2    3.19
     ls[38:42,*](40)   band3    3.15
     ls[43:47,*](45)   band1    3.13
     ls[43:47,*](45)   band2    3.15
     ls[43:47,*](45)   band3    3.14
     ls[48:52,*](50)   band1    2.34
     ls[48:52,*](50)   band2    2.43
     ls[48:52,*](50)   band3    2.43
     ls[53:57,*](55)   band1    3.10
     ls[53:57,*](55)   band2    3.15
     ls[53:57,*](55)   band3    3.12
     ls[58:62,*](60)   band1    3.14
     ls[58:62,*](60)   band2    3.19
     ls[58:62,*](60)   band3    3.15
.fi
.ih
REVISIONS
.ls EQWIDTH V2.3.0
New in this release, almost all code is from noao.onedspec.sbands
.le
.ih
SEE ALSO
splot
.endhelp

Source Code · Search Form · STSDAS