MASH: Extract a Spectrum by Summing (mashing) Rows or Columns



MASH adds together rows or columns of an image to produce a spectrum. The number of the spectrum comes immediately after MASH on the command line. The basic syntax of this command is:

     MASH (extract this spectrum) (from this image)
SP= selects rows (or columns when COLS is used) that are to be added to make the spectrum. BK selects rows (or columns) which are background. The resulting spectrum is the sum of the spectrum rows (or columns) with the background rows (columns) subtracted. You may specify SP and BK more than once.

It is assumed that the spectrum is aligned with the columns or rows on the image - that each column (or row) contains light of only one wavelength. Use SPECTROID if the slit lies along columns or rows, but the spectrum is either curved or projected diagonally across the image (as is the case for single-order or multi-order cross-dispersed spectrometers, slit spectrographs with either large spectra ranges or observations taken with severe atmospheric dispersion, or multi-order echelle spectra). In the future, VISTA will be able to handle spectra for which the dispersion is not aligned along a row or column (e.g., a CCD tilted with respect to the nominal dispersion axis).

NORM divides the spectrum by the number of rows (or columns) used to produce the spectrum. COL= (or ROW= if COLS is used) selects the columns (or rows) used to make the spectrum.

REFLAT selects the background rows (columns) in the image, fitting each column (row) of the image with a polynomial. The image columns (rows) are divided by this polynomial to 're-flat' the image. MASK tells the program to ignore masked pixels in the REFLAT procedure.

SKY=n saves the sky spectrum (the normalized sum of the background rows or columns) in the designated buffer.

Examples: The examples below assume that the spectrum runs along rows. If it ran along columns, you would add the COLS keyword and substitute ROW= for the COL= keyword