The method I use is to create a pixel mask that selects which pixels in the NIS image that you want to average over to create a spectrum. The sequence of IDL commands is then:
*** create pixel mask, and save into array called swtch (see below) ***
The pixel mask is an array of the same size as the NIS images, and which contains values of 0's and 1's. A value of 1 indicates that that spatial pixel will be included in the averaging perrformed by full_spec_return. As an example of how to create the array, one can do the following in IDL:
this sets the pixel mask to pick up a small 5x5 block of pixels from X=5 to 9 and y=10 to 14.
The pixel mask can also be selected graphically using the routine sub_image_select. To do this, first create an image in the emission line of interest. For example, I call this array 'mg9' below. One then does:
the pixel mask can then be chosen graphically, using either a polygon fill method, or a pixel painting method. A 3-button mouse is required, and help on how to use the routine is given in the IDL window.
The spectrum structures phot_spec and cal_spec that are created by full_spec_return contain the averaged spectra in both photon counts and calibrated intensity units. Combined, they allow the photon statistic errors on the intensities to be correctly accounted for.
The emission lines contained in the phot_spec/cal_spec spectra can be fitted with the widget-based routine spec_gauss_cds. The IDL call is
spec_gauss_cds, phot_spec, cal_spec, band=band, /postloss
where band is used to select the NIS band (either 1 or 2), and the keyword /postloss is used to select NIS post-loss line profiles rather than Gaussians.
Instructions for using SPEC_GAUSS_CDS are given separately.
A sample spectrum containing the entire NIS spectra for a quiet Sun region is available for download. Restore it into IDL with
and then call spec_gauss_cds as above.