The PROFILE (“Spatial Profile”) module computes the median spatial flux profile across all user-selected orders in the same slit. The inputs to the module are bcd.fits and the input calibration file wavsamp.tbl, which specifies the location of the selected spectral orders.
The selection of spectral orders to use in measuring the spatial profile depends upon the information in the BCD FITS header keyword FOVID, which defines a field-of-view. In SH and LH, all orders (11-20) are used by default. In SL and LL, the default order depends upon the commanded field of view (e.g. an observation in LL2 will default to orders 2 and 3). Alternately, the orders to be used by PROFILE may be chosen by means of the parameter ord: the orders are specified as comma-separated integers, without intervening spaces; for SL and LL, the orders are 1, 2, or 3; for SH and LH, the orders are 11 through 20.
This module computes a wavelength-collapsed median spatial profile of all orders in the dispersed IRS image. It takes the median of all orders at a given spatial position and produces a table of the flux distribution and the corresponding standard deviation for each of a number N_cut positions across the orders, where N_cut is a parameter (see below). The module uses the wavsamp.tblfile to specify the location of the orders.
The input wavsamp.tbl file specifies the location of the spectral orders on the array in x-y coordinates. It consists of "pseudo-rectangles" which describe the fractional pixels that comprise each wavelength in the spectrum (see Figure 5.11). These pseudo-rectangles are specified by their four vertices. Each line of the wavsamp.tbl file consists of an order number, coordinates of the center of the pseudo-rectangle (x center, y center), wavelength, tilt angle, and four vertices (x0, y0, x1, y1, x2, y2, x3, y3). Table 5.1 shows an example of wavsamp.tbl.
The PROFILE module divides each pseudo-rectangle in each order into N_cut parts and integrates (sums) the signal within each part. The parameter N_cut has default values of 1,000 for SL and LL, and 200 for SH and LH. It is not recommended to adjust N_cut from these defaults. The integral (sum) of the nth part (n running from 1 to N_cut) is divided by its area to yield a flux. Then the median of the fluxes of all corresponding nth parts in all pseudo-rectangles (all wavelengths) is calculated, to yield the median flux at that particular nth spatial position. The module uses a running window of 7 parts along the pseudo-rectangles, centered on the nth part, to compute the median at the nth position. The standard deviations are calculated from the fluxes at each part.
NOTE: The profile is calculated as a function of left-to-right percentage along the spatial direction of the slit.
The output of PROFILE is a table describing the median signal and standard deviation in each of the N_cut parts or sub-rectangles. The default name of this file is profile.tbl. Figure 5.12 shows an example of the profile calculated from a SL observation of a faint source on a complex background. An excerpt from a profile.tbl table for the same module is shown in Table 5.2.
Table 5.1: Sample wavsamp.tbl file.
\wavsamp version 5.0 (Thu May 9 10:19:35 PDT 2002)
\processing time 17:05:26 PST 03/12/2003
\comment WAVSAMP SL, generated from b0_ordfind.tbl 03/12/03
Figure 5.11 One spectral order defined by the wavsamp.tbl file is illustrated, with a single pseudo-rectangle highlighted. Order curvature is highly exaggerated here for illustration.
Figure 5.12 An example of the plotted output of the PROFILE module.