next up previous contents
Next: Extract the Background Spectrum Up: Extract and Fit the Previous: Extract and Fit the   Contents


Extract the Source Spectrum

Throughout the following, some parameters are instrument-dependent! The parameter spectralbinsize should be set to 15 if you are using the MOS; if you are using the PN, it should be 5. The parameter specchannelmax should be set to 11999 for the MOS, or 20479 for the PN. Also, remember that the most stringent filter, FLAG==0, must be applied to get a high-quality spectrum.

To extract the source spectrum using the GUI:

1)
Click on heraXmmselect and open the filtered file, mos1_filt_time.fits.
2)
Make an image (see §7.3.1). It will be displayed automatically in POW.
3)
Click on the object whose spectrum you wish to extract. This will produce a circle (extraction region), centered on the object. The circle's radius can be changed by clicking on it.
4)
Adjust the size and position of the circle until you are satisfied with the extraction region.
5)
Click on ``2D Region'' in the heraXmmselect GUI. This transfers the region information into the ``Selection Expression'' text area, for example, ((X,Y) IN CIRCLE(25705.5,18820.5,400)); the CIRCLE parameters are the X, Y coordinates of the center, and the radius is in units of 0.05 arcsec, so our extraction circle has a radius of 20''. In the ``Selection Expression'' box, enter && (FLAG==0).
6)
Click the diamond next the PI column on the heraXmmselect GUI.
7)
Click on ``OGIP Spectrum''.
8)
In the ``General'' page, check keepfilteroutput and withfilteredset. In the filteredset box, enter the name of the event file output, in this case, mos1_filt_time_source.fits.
9)
Select the ``Spectrum'' tab of the evslect GUI to set the file name and binning parameters for the spectrum. Confirm that withspectrumset is checked. Set spectrumset to the desired output name, in this case, mos1_source_pi.fits. Confirm that spectralbinsize is set to the correct value: 15 for the MOS, 5 for the PN. Confirm that withspecranges is checked. Set specchannelmin to 0. Set specchannelmax to 11999 for the MOS, or 20479 for the PN.
10)
Click ``Run''.

A plot of the counts per channel will be displayed automatically in fv. (The flux per energy cannot be calculated until the response matrix and ancillary files are made, see §7.4.5.)

To extract the source spectrum using the Command Window:

1)
Make an image of the filtered file, mos1_filt_time.fits, as described in §7.3.1). It will be displayed automatically in POW.
2)
Click on the object whose spectrum you wish to extract. This will produce a circle (extraction region), centered on the object. The circle's radius can be changed by clicking on it.
3)
Adjust the size and position of the circle until you are satisfied with the extraction region.
4)
Double-click on the chosen region. This will bring up a window showing the (X, Y) center coordinates and radius of the circle. For example, lets say the center is at (25705.5,18820.5) and the radius is 400.
5)
In the Command Window, type the following. Remember that for PN data, for PN data, spectralbinsize must be set to 5.
evselect table='mos1_filt_time.fits' energycolumn='PI' withfilteredset=yes
$   $ filteredset='mos1_filt_time_source.fits' keepfilteroutput=yes filtertype='expression'
$   $ expression='((X,Y) in CIRCLE(25705.5,18820.5,400))&&(FLAG==0)'
$   $ withspectrumset=yes spectrumset='mos1_source_pi.fits' spectralbinsize=15
$   $ withspecranges=yes specchannelmin=0 specchannelmax=11999

where

table - the event file
energycolumn - energy column
withfilteredset - make a filtered event file
keepfilteroutput - keep the filtered file
filteredset - name of output file
filtertype - type of filter
expression - expression to filter by
withspectrumset - make a spectrum
spectrumset - name of output spectrum
spectralbinsize - size of bin, in eV
withspecranges - covering a certain spectral range
specchannelmin - minimum of spectral range
specchannelmax - maximum of spectral range

The spectrum, in counts per channel, can be viewed with fv.

Next, the task backscale finds the area of the source region, taking into account any bad pixels or chip gaps, and writes the area into the BACKSCAL keyword of the spectrum table.

To find the spectrum's source area using the GUI:

1)
Call backscale in the Available Tools panel and enter the spectrum, mos1_source_pi.fits as the input data set.
2)
Directly beneath, enter the file containing the bad pixel extensions, i.e., the event file from which it was extracted, mos1_filt_time.fits. Confirm that the option to correct for bad pixels in the source box is set to ``yes''.
3)
Click ``Run''.

To find the spectrum's source area using the Command Window, type:

backscale spectrumset=mos1_source_pi.fits
withbadpixcorr=yes badpixlocation=mos1_filt_time.fits


next up previous contents
Next: Extract the Background Spectrum Up: Extract and Fit the Previous: Extract and Fit the   Contents
Lynne Valencic 2011-07-26