The Solar-Stellar Spectrograph




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.

Version History

2008 July 24 - Documentation written.


Data Members

float orderWidth

pointer ordMap

pointer spec


Method List



get_spectrum( )


init( )





Method Descriptions


PRO cleanup

Calls ReduceTool::cleanup



PRO define

Structure definition. Specifies the contents of the IDL structure instantiated by the Spectrum class. Used by Obj_New; do not invoke directly.


FUNCTION get_spectrum

Return pointer spec

Returns a the object's spec data member, which is a pointer to an array of floats containing the spectrum.


PRO go

keyword bool weight

Calls Root::add_history

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



PRO load_ordermap

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].


PRO set_order_width

argument float width

Sets the value of the object's orderWidth data member.


PRO store_spectrum

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.


[Back to contents]

Supported by grants from the National Science Foundation.
This site is best viewed with Mozilla Firefox.