next up previous contents
Next: 9. TEMPORAL ANALYSIS Up: ASCA ABC Guide Previous: 7. FILTERS   Contents

Subsections


8. SPECTRAL ANALYSIS


8.1 Extracting Spectra

Once the data have been screened and the desired filters set, to extract a spectrum simply type extract spectrum at the XSELECT prompt. This command initiates the extractor, an FTOOL run by XSELECT, which extracts from the events list photons satisfying the GTI and filter constraints and bins them up as a spectrum. The extractor places the spectrum in a temporary file which can be saved using save spectrum. Although this procedure is as straightforward as it sounds, please note the following.


8.2 Spectral Files

It is not necessary to know all about ASCA spectral files in order to use them. However, it is a good idea to be familiar with their basic structure and contents.

The general principles behind the design and structure of the FITS spectral files (also known as PHA or PI files) from ASCA are described in Arnaud et al. 1992, Legacy #2, 65 and

http://heasarc.gsfc.nasa.gov/docs/heasarc/ofwg/docs/spectra/ogip_92_007/ogip_92_007.html.

This article also lists all the keywords, extension names and column names. The key components of an ASCA spectral file are described below.


8.2.1 Primary Header

Below is a short list of some of the important keywords in the primary header.

EXPOSURE Integration time (in secs) of PHA data.
BACKSCAL Scaling factor used in background subtraction.
BACKFILE Background file name (blank unless filled by user).
RESPFILE RMF file name (blank unless filled by user).
ANCRFILE ARF file name (blank unless filled by user).
POISSERR Whether Poisson errors should be applied.
CHANTYPE Whether channels are PHA or PI.
TLMIN1 Channel number of first channel.
NCHAN Number of detector channels in the data set.
QUALITY Whether quality flags are attached to the data.
GROUPING Whether data are grouped.

Note that the background scaling factor, with keyword BACKSCAL, is defined as the ratio of the area of the region used to extract the spectrum to the total detector pixel area. Thus multiplying BACKSCAL by $256^2$ or $1280^{2}$ gives the area of the spectral extraction region (in unbinned pixels) for the GIS or SIS respectively.


8.2.2 The Weighted Map (WMAP)

The weighted map, or WMAP, is an image of the count distribution in the region used to extract the spectrum. The WMAP is an image array which resides in the primary extension of the FITS spectral file. This information is used to generate the XRT ancillary response file (ARF; see §8.7) which requires the spatial information of the counts on the detector plane. Since it is a FITS image, the WMAP can actually be displayed using an image display package such as SAOimage (e.g., saoimage -fits burst_g2.pha). In XSELECT the default binning for WMAP is unity for the GIS and a factor 8 for the SIS.


8.2.3 Spectrum, Quality and Grouping Flags

The SPECTRUM extension contains columns corresponding to channel number and the counts in each channel. The SPECTRUM extension can also contain additional columns for errors (if non-Poissonian), as well as quality and grouping flags.

The quality flag, following the OGIP standard, can have the following values.

0 good
1 defined bad by software
2 defined dubious by software
5 defined bad by user
-1 reason for bad flag unknown

XSPEC will automatically ignore channels with a quality flag of 1, and on the command ignore bad will ignore channels with a quality flag of 5. Quality flags can be set or reset with the FTOOL grppha.

The grouping flag works as follows. XSPEC combines the counts in a channel with a grouping flag of 1 with all successive channels with grouping flags of -1. Grouping flags can be set or reset with the FTOOL grppha.

8.2.4 Spectrum GTI

The GTI extension contains the individual time intervals (start and stop times) used to make the spectral file.


8.3 Binning and Grouping

A key concept when dealing with spectral files is the difference between binning and grouping, both of which relate to the combining of spectral channels. An important difference, for our purposes, is that grouping is reversible but binning is not. Otherwise, the two processes are equivalent.


8.3.1 Binning

Binning refers to the recasting of counts from the original set of channels into a new, smaller set of binned channels. In general, a spectrum must be used with a background file and response file with matching channel arrays, i.e., all three files must share the same number of channels and channel boundaries. This means that when a spectrum is binned in a certain way, so must the background and response. To rebin spectral files, you can use the FTOOL rbnpha, and to rebin a response matrix, rbnrmf.

In the course of normal ASCA data reduction and analysis, the binning of the spectral files matches that of the response by default. However, there are three cases when changing the binning is an issue:

  1. Saving 1024-channel BRIGHT mode spectral files. By default, when BRIGHT mode spectral files are saved in XSELECT, rbnpha is applied to linearize the binning and to rebin the channels by a factor of four (i.e., 2048 to 512 channels). If you want a BRIGHT mode spectral file with 1024 channels, then you should not apply the default binning, and, instead, run rbnpha outside XSELECT. In this case, the appropriate `compression mode' required by rbnpha is bright2linear.

  2. Rebinning the GIS RMF for non-standard bit assignments. In GIS PH mode, if 8 bits rather than the standard 10 are assigned to the PHA, then the spectral files will have 256 channels rather than the standard 1024. If this is the case, the GIS RMF should be rebinned with rbnrmf. Here, the appropriate compression mode is linear.

  3. Reducing the size of the response and spectral files. To reduce the amount of computer memory required to perform spectral fitting, it is sometimes a good idea to rebin response and spectral files in addition to - or instead of - grouping the spectral files. This is especially useful when fitting more than one spectral file simultaneously. For this, use rbnpha and rbnrmf on the spectral files and response, respectively, with an identical number of resulting channels and compression mode.


8.3.2 Grouping

Grouping is performed by the FTOOL grppha. For more details about this program refer to fhelp grppha and §8.13.

Grouping refers to the setting of flags for combining spectral channels. The flags are used internally by XSPEC. Neither XSPEC nor the grouping program (grppha) physically alters the channels or their contents in the spectral file - unlike binning. When a spectral file is read into XSPEC, the program consults the grouping column in the file and applies the grouping information it contains to the spectral file, its associated background file and to its response. The effect of grouping the spectral file, therefore, is the same as binning the spectral file, background file and response. However, since it requires only one step and is reversible, changing the grouping is often more convenient than changing the binning. Note that background files should not be grouped since XSPEC will automatically group the background to match the source data. By default, GIS PH mode spectral files are regrouped by a factor of four when saved in XSELECT.

An instance where one must use binning and not grouping is if a response matrix and spectrum have a different number of intrinsic channels. In this case, grouping will not work. Either the spectrum or response matrix must be rebinned.


8.4 Spectral Responses

The instrument response can be split up into two parts. A `redistribution' matrix, which specifies the channel probability distribution for a photon of given energy, and an effective area curve, which specifies the telescope area and window absorption. We refer to the redistribution matrix as the RMF (Redistribution Matrix File) and the effective area curve as the ARF (Ancillary Response File). The combined response is the product of the ARF and RMF and is conventionally termed the RSP (response) file.

Users obtain GIS RMFs from the HEASARC calibration database and generate SIS RMFs using the FTOOL sisrmg. Users generate ARFs appropriate to their spectra using the FTOOL ascaarf.

In XSPEC, RMFs are entered using the response command, while ARFs are entered using the arf command. Alternatively, the RMF and ARF file names can be written into the header of the spectral file using grppha.


8.5 Obtaining GIS RMFs from the Calibration Database

GIS RMFs are straightforward. Only one kind, for PH mode, is available. The latest matrices can be found at

ftp://heasarc.gsfc.nasa.gov/caldb/data/asca/gis/cpf/95mar06/gis2v4_0.rmf
ftp://heasarc.gsfc.nasa.gov/caldb/data/asca/gis/cpf/95mar06/gis3v4_0.rmf.

The above directory, and the ASCA GOF Web page, should be checked regularly for any later releases.


8.6 Generating SIS RMFs

SIS RMFs are more complicated. Each SIS camera comprises four CCD chips, each of which requires its own RMF. A different RMF is also required for different event grades, split event thresholds, echo and CTI corrections. Moreover, the SIS resolution is degrading with time due to the cumulative effect of radiation damage. Therefore it is now recommended to generate the RMF file for each observation, in PI channels.

The FTOOL sisrmg (v1.0 or later, included in FTOOLS v3.5 or later) should be used to generate the RMF file, appropriate for your data. sisrmg will read the necessary information from the spectral file. Currently, the spectral files do not contain the grade selection information in a easily machine-readable way, therefore that information needs to be supplied on the command line.

tarquin> sisrmg grades=0234 
Name of PHA input file [NONE] s0b.pha
Name of ARF input file [NONE] 
Name of RM output file [NONE] s0b.rmf

Note that sisrmg requires the PHA to PI conversion calibration file. You must check that you are accessing the latest file as a new file is often released to keep up with the changing CTI (see §4.5.2). You must force sisrmg to use the latest file either by changing the parameter file or specifying the parameter calfile on the command line.

The ARF input file can be ignored in most cases, unless an RMF file that exactly matches an existing ARF file in terms of the energy grid is required.


8.7 Generating ARFs with ASCAARF

The Ancillary Response File (or ARF) contains all the information about

  1. the XRT effective area for the given extraction region taking into account the point spread function (PSF), assuming a particular source distribution relative to the optical axis,

  2. the transmission of the detector window, and

  3. optionally, detector efficiency.

All these effects have been built into a convenient FTOOL called ascaarf which will generate the appropriate ARF for a given spectral file by using information in the spectral file itself - specifically, the WMAP which contains a map of where in the extraction region the counts in the spectrum came from.

ascaarf needs XRT response functions to calculate ARFs, as well as the source distribution. In the standard method, the precalculated XRT response files (effective area and point spread function) are used, and users should specify the type of source distribution. In the Ray-tracing method, which is a new feature since ascaarf v3.00, users should specify a set of ray-raced images for a particular source distribution.

8.7.1 Standard Method - Using Standard XRT Calibration Files

The energies at which the ARF is calculated are obtained from the corresponding RMF file, hence the arguments of the program are as follows (the XRT calibration files8.1 are usually specified as hidden parameters):

  1. Input spectral file.

  2. Input RMF file.

  3. Output ARF file.

The user also needs to tell the program whether the source is point-like, and, if so, whether it is in the center of the WMAP; if the source is not centered in the WMAP, then the user is prompted for the unbinned DETX and DETY coordinates of the source. For the case of a point source, ascaarf calculates the effective area at the source position and multiplies this by the (energy-dependent) fraction of events expected to fall within the selected region. For an extended source, ascaarf calculates a weighted-average effective area with the weighting factor being the number of events at each pixel position. In this case no attempt is made to correct for the spatial response and in particular no correction is made for events being scattered out of the selected region. For extended sources, creating ARFs through ray-tracing will be more precise (see below; see also §10.6).

Two important hidden parameters for ascaarf, and their default values, are fudge = yes and arffil = yes. The fudge parameter applies a Gaussian at 2.2 keV for the SIS and 1.9 keV for the GIS in order to account empirically for sharp residual features in the XRT response. The arffil parameter applies corrections (of order less than 5%) based on the fitting residuals to Crab GIS data. The average for GIS2 and GIS3 are used in the case of the SIS. At the time of going to press (March 1997), a calibration effort is underway to understand the physical origin of both these features and it is expected that ascaarf and the SIS and GIS response matrices will be modified and updated. Therefore the user should regularly check the `Calibration Uncertainties' Web page (§1.7) for recent developments.

Below are listed some more general points about ascaarf.

  1. The azimuthal dependence of the XRT response is less certain than the azimuthally averaged response so that more accurate results will obtained for circular extraction regions (see also §10.6).

  2. If, after generating an ARF, you rebin the spectral file and RMF, you do not need to generate a new, rebinned ARF.

  3. For the GIS, ascaarf has to convolve the XRT response with the GIS PSF. This calculation is rather CPU-intensive and can result in the program taking tens of minutes to create an ARF.

  4. ascaarf does not work well for point sources extracted in SKY coordinates or for any observation whose pointing position changes.

  5. Dead time correction is not included in ascaarf. It can, however, be corrected for the GIS spectral file using the FTOOL deadtime (see §8.11).

  6. When GIS RTI information is not available due to non-standard bit-assignment (§2.6.4), ascaarf creates a corresponding ARF automatically, taking account of the effect of not applying the RTI screening 8.2.

8.7.2 Ray-tracing Method

In this method, first, you have to create a set of ray-traced images using the ascaray ftool. You should run ray-tracing for each of the energy bins which should cover the entire RMF energy range with minute enough resolution. The make_ascaray_images script will run ascaray sequentially to create a set of ray-traced images to be used with ascaarf.

For the usage of make_ascaray_images and how to create ARFs for extended sources using ascaarf, please find

http://heasarc.gsfc.nasa.gov/docs/asca/make_ascaray_images/.

In principle, the ray-tracing method can be used for any types of source distribution (including point-sources), and create precise ARFs as long as there are no spectral variations within the distribution8.3. However, this method is most effective when the source distribution is known to be completely flat over the detector field of view, in which case we can create accurate ARFs and carry out precise spectral analysis. See the URL address above for an examples of the Cosmic X-ray Background analysis.

We have created sets of ray-traced images using make_ascaray_images for uniformly extended sources with the radius of 1 degree, 2 degrees, and 3 degrees. These images are found at

ftp://heasarc.gsfc.nasa.gov/asca/make_ascaray_images/.

Users may use these ready-made ray-tracing results with ascaarf to create ARFs for uniformly extended sources with 1, 2 or 3 degree radius, or run make_ascaray_images by themselves for different source distributions.


8.8 Background Subtraction

At present, for spectra, there are two background subtraction techniques. These are (1) subtract suitable portions of the blank-sky observations that the GOF has made available, or (2) subtract a source-free part of the same observation. As the mission matures, it is likely that other, perhaps better, techniques will emerge, possibly involving fully prescriptive background models.

For more information about the GIS background and how to subtract it, please consult the articles by Kubo et al (ASCANews #2, 14) and Ikebe et al. (ASCANews #3, 13). The internal background of the SIS is described by Keith Gendreau in ASCANews #2, 5.

Whatever method is used, the relative normalization between the on-source and background spectra is taken care of by the EXPOSURE and BACKSCAL keywords. The value of the latter keyword is set in every spectral file when it is created (whether from a source or background region) to be proportional to the geometrical detector area of the extraction region (see §8.2.1 for precise definition).


8.8.1 Blank-Sky Observations

8.8.1.1 SIS Blank Sky Files

The blank-sky events lists for background subtraction are available at

ftp://heasarc.gsfc.nasa.gov/caldb/data/asca/sis/bcf/bgd/94nov/

for the SIS.

These background files have been created from several superposed PV phase observations and are sorted by cut-off rigidity. They should only be used to create products in detector coordinates. The files themselves are described in detail in the README files that accompany them. As FITS events files, they can be read into XSELECT with the read events command.

An important point to remember for the SIS is that these early blank-sky observations were made with the SIS in 4-CCD mode but the vast majority of point-source Guest Observer observations are made in 1- or 2-CCD mode. Since the SIS internal background depends on clocking-mode, this could lead to problems, especially at high energies (see §8.8.3). Also, the SIS sensitivity is declining with time in a manner which depends on the clocking-mode (primarily due to RDD effects - see §4.8) so the blank-sky background may not work well for the more recent observations.

8.8.1.2 GIS Blank Sky Files

Blank-sky events for accurate background subtractions are now available for the GIS. These files have been generated using high latitude observations taken between June 1993 and December 1995. The total exposure time is approximately 2.1 Msec (the previous blank-sky dataset had 0.35 Msec; see below). These observations have also had all point-like sources brighter than 2 $\times10^{-13}$ erg/s/cm$^2$ in the 2-10 keV range removed. The files are located at

ftp://heasarc.gsfc.nasa.gov/caldb/data/asca/gis/bcf/bgd/no_sources.

Standard data screening including the RTI filtering (§5.3.2) is already carried out in these event files.

Because of the masking of the point sources, you must compute the effective exposure time for each pixel using the mkgisbgd FTOOL, otherwise you will get wrong results. Please read

http://heasarc.gsfc.nasa.gov/docs/asca/docs/asca/mkgisbgd/mkgisbgd.html

for more information on how to use these files.

The previous version of GIS blank sky dataset, which is collected during the PV phase and includes dim point sources, is still available at

ftp://heasarc.gsfc.nasa.gov/caldb/data/asca/gis/bcf/bgd/94may/.

This old dataset may be still useful, since you can read them directly in XSELECT to extract spectra. Please note that the old dataset has not been subjected to RTI-based background rejection (see §5.3.2), This means that, if your source spectrum has RTI-based background rejection, then you should use the XSELECT command gisclean on the file before extracting a background spectrum.


8.8.2 GIS Night Earth Observations

In addition to the blank-sky observations, the ASCA GOF has also made available GIS events files corresponding to observations of the night Earth. Since the night Earth is X-ray dark, the files represent, to a good approximation, the purely instrumental background of the GIS.

There is a new release of Night-Earth observations, covering the period from 1993 June to 1999 August (total $\sim $ 13 Msec exposure and $\sim $ 1.6 million events per sensor):

ftp://heasarc.gsfc.nasa.gov/caldb/data/asca/gis/bcf/bgd/night_earth_1999/.

The files have been processed using the identical screening that applied to the standard processed data. If needed, and depending on the analysis, it is possible to apply additional cuts on these files.

As FITS events files, they can be read into XSELECT with the read events command. Please access

http://heasarc.gsfc.nasa.gov/docs/asca/gis_night_earth/gis_night_earth.html

for more information on these Night Earth Observations. In particular, please note that there is a long term increase of the Night Earth event counting rates (= GIS intrinsic background), which you may have to take into account for background sensitive observations.


8.8.3 How to Subtract Background

The best background subtraction depends on matching as closely as possible the background in your source region. There are four main aspects to this which, to some extent, vary in relative importance depending on the nature of your observation.

  1. Extraction region.

  2. Screening criteria.

  3. Instrument mode.

  4. Galactic position.

Note that the first two are actually mutually exclusive: you can only extract background from the same region as the source by using a different, blank-sky observation; and you can only use an identical set of screening criteria by using the same observation for background and source.


8.8.3.1 Background: Extraction Region

Largely because of the vignetting of the XRT, the responses of the GIS and SIS depend on position in the field of view. For this reason, background events should technically be extracted from the same part of the field of view as the source events. In XSELECT this is easy:

  1. Read in the appropriate blank-sky background file with the command read events.

  2. For GIS files, issue the command gisclean to subject the events to RTI-based background subtraction.

  3. For SIS files, make sure that the background spectrum will be extracted from the same energy column as the source spectrum, i.e., PHA or PI. If necessary, to change the extraction column, type set phaname followed by pha or pi. In any case, you should now always be using PI.

  4. Then, extract a background spectrum with the same region filter file used for the source spectrum, making sure that the spatial binning and coordinate system are the same (use the command show status to check).

  5. Finally, save the background file with the command save spectrum. If GIS, do not apply the default grouping (XSPEC will get the grouping from the source file instead).

WARNING! If you background region goes outside the chips of the SIS, or outside the GIS detector area, your spectral files will contain the wrong values of BACKSCAL, the background scaling factor, and therefore your background subtraction will be wrong. You must explicitly exclude the off-detector regions.


8.8.3.2 Background: Screening Criteria

It is very important that the screening criteria used for the source and the background should be as similar as possible. The first release of background files is not accompanied by the mkf files, so the full range of selection criteria cannot be applied. Since the background files have been screened in a standard way and are sorted by cut-off rigidity, they should be acceptable for most cases. However, if you have a point source, we recommend that, as well as using the background files, you also extract background events from a source-free part of your source field. In the case of the SIS, this should be from the same chip; for the GIS, from a region at the same distance from the optical axis (within 14 arcmin from the optical axis, the GIS background does not vary much).

To find a source-free region, it is a good idea to make soft and hard images in case a contaminating source is not obvious in the image extracted from the full pass band. Of course, this background subtraction method contravenes the previous recommendation, but usually closely matching screening criteria are much more important for good background subtraction. Please use both methods and compare the results.


8.8.3.3 Background: Instrument Mode

As mentioned in chapter 4 and §8.8.1, the internal background of the SIS depends on clocking mode, i.e., whether 1-CCD, 2-CCD 4-CCD or parallel sum (FAST) mode was used. Since the total background is dominated by the cosmic background, this effect is small - except at energies above 7 keV. The rate of hot and flickering pixels also depends on mode, and it is possible that if, for example, the 4-CCD background files are used with a 1-CCD mode source file, then spurious effects could appear. Also, as already mentioned, the effect of RDD (§4.8) is reducing the SIS sensitivity with time in a manner which depends on clocking mode so the blank-sky background may not work so well for more recent observations. Better results will often come from using background from a source-free region of the same chip from the current or even from a different observation.


8.8.3.4 Background: Galactic Position

The fields used to make the blank sky background files all have high Galactic latitudes. For observations which are within 3 or 4 degrees of the Galactic plane, the Galactic X-ray background can become important. It may be necessary, in those cases to use a background spectrum extracted from a source-free region of the field of view and compare with the results obtained with the high-galactic background. Within 10 arcmin radius, the GIS background is relatively flat and its two main components (Cosmic X-ray background and Non-X-ray background) can be considered together.Beyond this limit, this assumption is no longer true (the CXB and NXB behave in fact very differently as a function of radius) and results are to be considered with extreme caution (see §10 and section on extended sources).

8.8.4 Using Blank-Sky Data for BRIGHT2 Mode Spectra

The blank-sky data for the SIS are in BRIGHT mode. They may also be used for BRIGHT2 mode source spectra. In this case, do not group or rebin when saving the spectra in XSELECT. Instead, run rbnpha on the saved spectra, using the BRIGHT2LINEAR option.


8.9 Analyzing SIS Spectra from Two or More Chips

When analyzing SIS spectra, if the photons from the source are spread over two or more chips and if you chose an extraction region over these chips, you have to consider that the chips have different responses (RMFs).

  1. Create a set of region files. One is for the entire source region (typically circular), excluding the inter-chip gap using the `box' shaping and hitting e in SAOimage. The other regions are sub-sets of the above, each lying entirely within a single chip (combine the same circle and a box, using s for both). There may be 2 or 4 such sub-regions.

  2. Extract spectra for each of the sub-regions. Run sisrmg on each. Also get the total number of counts in each spectrum (using e.g. the TOTCTS keyword).

  3. Use addrmf to combine the RMF files, weighting each file by the total number of counts in the corresponding spectrum.

  4. Extract the spectrum from the entire source region. Use this and the combined RMF to generate the ARF. Now you are ready for spectral fitting.

Note that this method is not mathematically exact, but considered a fairly good approximation. The exact way is to make an ARF for each chip (though this may not be so simple), multiply the ARF and RMF for each chip, and average RSPs of different chips with equal weights. Since ARF for each chip can be approximated with the total ARF times (number of counts on that chip)/(total number of counts), the above method should work for most cases.

If you want to follow the exact way by creating ARFs for each chip, you may use the addascaspec script to combine spectral files and responses for different chips (§8.10).


8.10 Combining Spectral Files

It may be helpful to add together spectral files from the two GIS or from the two SIS, rather than fit the spectral files with the same model simultaneously. The advantage is that, with the better signal-to-noise, it is easier to see spectral features in the combined spectrum than in the individual spectra. By the same reason, you may want to combine two or more spectral files taken with the same detector at different time periods. The addascaspec script may be used for this purpose. This script, written in Perl, runs several ftools such as mathpha, addarf, addrmf and marfrmf sequentially to perform the task.


8.10.1 For GIS

  1. Extract source and background spectra for GIS2 and GIS3. Let's assume here that the source spectra are gis2.spec and gis3.spec, and the background spectra are gis2_bgd.spec and gis3_bgd.spec.8.4

  2. Make ARFs for the GIS2 and GIS3 source spectral files using ascaarf with an RMF. Let's assume the RMF is gis2v4_0.rmf, and the ARFs are gis2.arf and gis3.arf respectively.

  3. Make a ``listfile'' for an addascaspec input. This file should have the following entries:

    gis2.spec gis3.spec
    gis2_bgd.spec gis3_bgd.spec
    gis2.arf gis3.arf
    

    Note that GIS2 and GIS3 RMFs, though having different names, are identical. Hence, the same RMF can be used for the GIS2 and GIS3 combined spectra, and only the ARFs have to be averaged.

  4. Run addascaspec.

      addascaspec listfile gis23.spec gis23.arf gis23_bgd.spec
    

    This command creates the GIS2 and 3 combined spectral file (gis23.spec), background file (gis23_bgd.spec), and ARF (gis23.arf).

  5. Use these files with gis2v4_0.rmf in XSPEC. XSPEC may give warning messages, such that instruments are not consistent for spectral files and response files. This does not do any harm, but you may want to change the INSTRUME header keywords in these files with the grppha chkey command, or the FTOOL fparkey.

Follow the same procedure to combine two or more GIS spectral files taken at different periods.


8.10.2 For SIS

In the case of 1-CCD mode:

  1. Extract SIS0 and SIS1 spectra (e.g., sis0.spec and sis1.spec), and corresponding background spectra (sis0_bgd.spec and sis1_bgd.spec).
  2. Create the SIS0 and SIS1 RMFs using sisrmg (sis0.rmf and sis1.rmf).

  3. Create SIS0 and SIS1 ARF using ascaarf (sis0.arf and sis1.arf).

  4. Make a ``listfile'' for an addascaspec input. This file should have the following entries:

    sis0.spec sis1.spec
    sis0_bgd.spec sis1_bgd.spec
    sis0.arf sis0.arf
    sis0.rmf sis0.rmf
    

  5. Run addascaspec.

      addascaspec listfile sis01.spec sis01.rsp sis01_bgd.spec
    

    This command creates the SIS0 and 1 combined spectral file (sis01.spec), background file (sis01_bgd.spec), and RSP (= RMF and ARF combined) (sis01.rsp).

  6. Use these files in XSPEC.

In the case of 2-CCD or 4-CCD modes, first combine the chips by calculating the spectral files, ARFs and RMFs for SIS0 and SIS1 each (§8.9). Then follow the procedure above for 1-CCD mode to combine sensors.

Alternatively, you may create spectral files, RMFs and ARFs for individual chips, then combine them at once with addascaspec8.9).


8.10.3 Computing the Correct Background Normalization for Combined Spectra

If the background and the source spectra are made from different detector regions, the BACKSCAL keywords of the background spectra have to be calculated to specify the correct background normalization. Due account must be taken of the correct weights for the region sizes and exposure times, but this is automatically taken into account by addascaspec. If you are interested, full details of how to calculate the BACKSCAL value when combining two or more energy spectra are given in the document `Background Normalization' at

http://heasarc.gsfc.nasa.gov/docs/asca/abc_backscal.html.


8.11 GIS Deadtime Correction

GIS PH mode has a typical deadtime of about 8 msec per event. For bright sources, GIS deadtime will be significant and deadtime correction is necessary to obtain the correct incident flux through spectral analysis.

GIS deadtime can be calculated using the GIS monitor count rates. The mkf files created in the standard processing have two columns, G2_DEADT and G3_DEADT, in which the deadtime fraction values thus calculated are stored.

Using these deadtime fraction values, with the FTOOL deadtime, the deadtime correction can be done as follows. In this example the GIS spectrum is called g2.spec. As is usual for an ASCA spectral file, the first extension contains the energy spectrum and the second extension contains the GTIs. At the system prompt type

deadtime g2.spec ft941222_1327_0210.mkf exposure=EXPOSURE deadcol=G2_DEADT

The EXPOSURE keyword in the spectral extension is overwritten with the correct exposure time taking deadtime into account. It is a good idea, when using deadtime, to verify that the value of EXPOSURE decreases due to the deadtime correction. (The FTOOLS grppha or fkeyprint can conveniently display the value of the EXPOSURE keyword).


8.12 How to Cope with SIS Pile-up Problem

For bright enough point sources ($\gg$ 10 cts/s/sensor), SIS spectra are likely to be affected by the photon pile-up, that is, two or more photons are detected on the same pixel or adjacent pixels within a single read-out, and taken as a single SIS event (see also §4.10.1). Pile-up will alter the spectral shape, and in principle this is an irreversible process. However, when and where pile-up is not extremely significant, the intrinsic spectrum prior to being affected by the pile-up may be guessed from the observed piled-up spectrum itself. corpileup ftools is written for that purpose.

corpileup reads a cleaned SIS event file, determines the point source center and the radius within which pile-up is too significant to be corrected, and creates a spectral file with the pile-up correction from the region outside.

The corpileup output spectral file is ready to be used in XSPEC, but responses have to be created independently. Therefore, the following procedure should be taken to carry out SIS spectral analysis with pile-up correction:

  1. Create a screened SIS 1CCD Bright or Bright2 mode event file. corpileup can handle only 1CCD mode data. If necessary, the event file may have been applied the region selection (such that to select only within some radius).

  2. Run corpileup to create a pile-up corrected spectrum, which should be used in XSPEC. Also, corpileup outputs several intermediate files, among which ``img1'' will tell you the region in the RAW coordinates from which the spectral file is created (PSF core where counting rates exceed 0.023 cnt/pixel/exposure is discarded).

  3. Extract a spectral file using xselect for the same region as ``img1''. Using this spectral file8.5, which is affected by the pile-up, create RMF with sisrmg and ARF with ascaarf.

For more details, as well as the algorithm of pile-up correction, please refer to the corpileup help file.


8.13 Getting Started with XSPEC

XSPEC is a powerful and versatile spectral-fitting program. It is fully documented, with an extensive manual and on-line help which can be obtained at the URL

http://heasarc.gsfc.nasa.gov/docs/xanadu/xspec/manual/manual.html.

The following, which covers XSPEC basics, is a very brief guide to get you started.


8.13.1 Entering Data into XSPEC

Having typed XSPEC to start the program, there are two ways of entering data: with XSPEC commands, or with the header keywords in the spectral file. A third method, using a command file, is really a more convenient version of the first.

To illustrate these methods, we assume we have produced and obtained the following files for our SIS0-chip1 data:

mkn841_s0c1.pi source spectral file
back_s0c1.pi background file
mkn841_s0c1.arf ARF
s0c1g0234p40e1_512v0_8i.rmf RMF

Each of these files has a different XSPEC command which enters it into the program. These are:

XSPEC>data  mkn841_s0c1.pi 
XSPEC>backgrnd  back_s0c1.pi 
XSPEC>arf  mkn841_s0c1.arf
XSPEC>response  s0c1g0234p40e1_512v0_8i.rmf

These lines can be copied with a text editor into an ASCII command file data_s0c1.xcm, say, and run with the XSPEC command @data_s0c1.

Alternatively, you can write the names of the background file, ARF and RMF into the header of the spectral file with the FTOOL grppha. Keyword values are changed with the grppha command chkey. In our example, the following grppha commands would be used:

chkey BACKFILE  back_s0c1.pi 
chkey ANCRFILE  mkn841_s0c1.arf 
chkey RESPFILE  s0c1g0234p40e1_512v0_8i.rmf

Note that grppha will overwrite an existing file (rather than create a new one) only if an exclamation mark is put before the input file name, as in:

tarquin> grppha mkn841_s0c1.pi 
Please enter output filename[]!mkn841_s0c1.pi

More than one data file can be entered into XSPEC. For more information about the data command, consult the XSPEC manual or type help commands data at the XSPEC$>$ prompt.


8.13.2 Ignoring Channels and Energy Ranges

It is nearly always good policy to exclude from a fit channels at the lower and upper ends of the pass band, where the instrument efficiency is low, the background predominant and the calibration less certain. The XSPEC command ignore causes channels to be excluded: ignore 1-40, for example, excludes channels 1-40, while ignore bad will exclude channels with a quality flag of 5. Note that the ignore command operates on regrouped channels, not on the original channels. Its inverse is the notice command.

Users can set quality flags themselves with grppha. Typing help quality at the GRPPHA$>$ prompt explains how to do so.

Versions of XSPEC later than 9.0 allow the user to ignore or notice channels by specifying energy ranges directly. Thus

ignore 1-4:0.0-0.7

will ignore all channels in files 1-4 between 0.0 and 0.7 keV.


8.13.3 Defining Models

In XSPEC, models are built up from a suite of model components which are either `additive' (supplying model photons) or `multiplicative' (modifying the flux of model photons). To see a list of the models available in XSPEC, type model ?.

Models are defined with the model command. For example, the spectrum of a high-redshift quasar with both Galactic and intrinsic absorption might be defined by the command model wabs * zwabs (zpowerl). For help on the model command, type help commands model and for an explanation of an individual component, type, e.g., help model zwabs. Once the model command is entered, the user is prompted for the initial values of the corresponding parameters (a carriage return enters the default).

Parameters are fixed with the freeze command and unfixed with the thaw command. To change a parameter value, use the newpar command.

For more information about XSPEC models, please consult the XSPEC manual and on-line help. In particular note that major changes to model syntax were introduced in XSPEC v10.0.


8.13.4 Fitting Models

After defining a model and assigning initial parameter values, fitting is initiated by typing the command fit. If a minimum is not found after 10 iterations, the user is given the option of continuing or stopping - perhaps to reset parameters or to try a different model. When the fit converges, a summary is displayed on the screen giving the best-fitting parameter values and chi-squared.

The fit command has several options which you learn about by typing help commands fit at the XSPEC$>$ prompt.


8.13.5 Deriving Errors

Although some errors are displayed at the culmination of a successful fit, these errors are approximate and should not be quoted in scientific papers. Instead, you should use the error command which initiates a further search of chi-squared space to find the width of the minimum in terms of parameter confidence ranges. For example, error 3 will find the 90 per cent confidence range for the third parameter, i.e., the values which cause chi-squared to depart from its minimum by an increment of 2.7. For more options, type help commands error.


8.13.6 Plotting Results

Plotting the results of a fit in XSPEC is a three-stage process:

  1. Choose the plot device with the cpd command. The choices can be seen by typing cpd ?. For most workstations, the device is /xw.

  2. Set the X-axis to be energy, wavelength or channels. Type either setplot energy, setplot wave or setplot channels.

  3. Plot the fit, residuals etc. There are two plot commands, plot, which simply displays the plot with the plot device, and iplot, which displays the plot as well as allowing the user to modify it. Several things may be plotted. For example, plot data residuals causes the data (with fit) to be plotted in a large upper panel, with the residuals in a smaller, lower panel. To view the options, type plot ?.

To make a PostScript file of your plot, use iplot rather than plot and type, for example, hard two_temp_fit.ps/ps at the PLT$>$ prompt to create the PostScript file two_temp_fit.ps.


next up previous contents
Next: 9. TEMPORAL ANALYSIS Up: ASCA ABC Guide Previous: 7. FILTERS   Contents
Michael Arida 2002-10-22