The Normalizer class is a data reduction class that normalizes the continuum of extracted spectra orders to unity. As with all the reducer objects, Normalizer implements methods that set up the various relevant quantities, and a go method that does the actual work. The code samples presented in the documentation below presuppose familiarity with IDL programming and syntax.
2008 July 28 - Documentation written.
Destructor. Calls ReduceTool::cleanup and then frees its own data member pointers. Never call this procedure directly; it is invoked by IDL's Obj_Destroy function.
Structure definition. Specifies the contents of the IDL structure instantiated by the Normalizer class. Used by Obj_New; do not invoke directly.
Identifies continuum points in a spectral order. Modified from a routine by Marc Buie.
Return pointer blaze
Returns a the object's blaze data member.
Return pointer contPts
Returns a the object's contPts data member.
Return pointer blaze
Returns a the object's deblaze data member.
Return pointer normfit
Returns a the object's normfit data member.
Return pointer normSpec
Returns a the object's normSpec data member.
Normalizes the spectrum. The method normalizes each order individually, and the procedure is as follows.
First, the routine loads the pixel locations of points to be used for normalization in the order being normalized. It then searches a seven pixel wide boxcar around each point for the maximum data value in the spectrum. The data value used for normalization is then the mean of the three pixels around the maximum. This procedure allows the method to handle wavelength shifts in the spectrum (via the 7-pixel search), as well as beat down noise in the fit (via the 3-pixel smoothing).
The HK order is then fit by a straight line between two pseudocontinuum points on either side of the H and K lines. The echelle orders are fit by a cubic spline.
keyword bool verbose
Return bool TRUE, FALSE
Constructor. If the keyword verbose is set, the verbose data member (inherited from Tool) is set to TRUE. Never call this function directly; it is invoked by IDL's Obj_New function.
argument int loadFile
Sets up the pointer array that specifies the type of continuum fitting to be applied to the data frame and loads the set of points to be fitted.
The loadFile argument should contain the name of the file containing the list of points along each order to be used in normalizing the order. For an echelle frame with N orders, this file will have N+2 lines. The first line contains the number of orders, the second line has a space-separated list giving the number of fit points in each order, and lines 3 through N+2 give the pixel numbers in each order used in calculating a cubic spline fit to the continuum.
argument string f
argument int ordLength
argument int numOrders
Loads the contents of the file f.flatfit into the object's blaze data member. The flatfit file is created by the Flat class from a flat field frame, and it contains an array of floats with the cubic spline fit to the flat field orders.
argument int order
argument int points
Stores the set of points into array order of the pointer array contPts. The points indicate the pixels along the order that will be used for continuum fitting.
argument bool[ ] deblaze
Stores the array deblaze in the object's pointer array deblaze. This array should have a number of elements equal to the number of orders in the echelle frame. Each element is a boolean indicating whether the order in question should be divided by the blaze (if TRUE) or not (if FALSE).
argument int[ ] types
Stores the array types in the object's pointer array normTypes.
argument string file
Writes the normalized data to the file f.nrm.