The Solar-Stellar Spectrograph

[ Home | About | Tech Info & Data | Publications | References ]      [ Site by Jeffrey Hall | Research funded by NSF ]



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

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.


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

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.


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.
[ Back to my home page | Email me: jch [at] lowell [dot] edu ]
The SSS is publicly funded. Unless explicitly noted otherwise, everything on this site is in the public domain.
If you use or quote our results or images, we appreciate an acknowledgment.
This site is best viewed with Mozilla Firefox.