The Spectrum class is a data reduction class that extracts spectra from predefined order apertures. It does not care what else has been done to the frame (debiasing, flat fielding, scattered light removal) -- it simply obtains a profile weighted intensity for every pixel along any number of echelle orders on the frame. As with all the reducer objects, Spectrum 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 24 - 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 Spectrum class. Used by Obj_New; do not invoke directly.
Return pointer spec
Returns a the object's spec data member, which is a pointer to an array of floats containing the spectrum.
keyword bool weight
Extracts the spectrum. It first defines the apertures using the data in the ordMap data member. It then extracts the spectrum in one of two ways. If go is called with the weight keyword set, profile-weighted extraction is used. (I.e., the data value in each pixel of the order profile is weighted by its normalized contribution to the entire profile, thus giving higher weight to pixels with higher data values and therefore higher SNR.) If the weight keyword is left clear, a simple boxcar weight is applied (1.0 to all full pixels in the profile, and the fractional weights of the end pixels, which together equal 1.0 as well). The spectrum is stored in the spec data member.
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 string f
argument int ordLength
argument int numOrders
Loads the contents of the file f.ordmap into the object's ordMap data member. This is an array of floats containing the centroids of each pixel in each order, the principal output of the Ordermap class. For SSS data, it has dimensions [512,20].
argument float width
Sets the value of the object's orderWidth data member.
argument string f
keyword bool noAppend
Writes the spec data member to the file f.spec. If bNoAppend is set, the spectrum will be written to an empty file; otherwise, it is appended.