next up previous contents
Next: Quick Summary Up: ROSAT Xselect Guide Previous: Preparing for XSPEC, XRONOS   Contents

Subsections

More Advanced Analysis

Screening/Rescreening the Data

xselect includes a facility to select times based on the values of some auxiliary quantities ie those not associated with each event. Examples could be angle between the pointing direction and the Earth's limb, some housekeeping parameter, or the total counting rate. This information must reside in a FITS file whose first extension is a BINTABLE with time column called TIME. For ROSAT, the housekeeping information is stored in the seq_anc.fits (the ancilliary file), the seq_anc.fits file does not, however, store all the information in the most useful way for xselect screening and users need to run PCFILT for PSPC data, or HRIFILT for HRI data.

Using PCFILT as an example (HRIFILT is very similar):

The FTOOL PCFILT can be run prior to starting an xselect session (or spawned from within xselect). PCFILT will resample the housekeeping data and calculate many useful parameters from the raw information contained in seq_anc.fits, making the ROSAT equivalent of the ASCA makefilter file.

The output (makefilter) file should have a .rmkf extension for xselect to pick it up automatically when it is required.

Example:

        pcfilt
        Please enter Ancillary filename[] rp700111_anc.fits
        Please enter output filename[] rp700111.rmkf
        Main PCFILT Ver 1.0.0
        PCFILT ver 1.0.0 completed

The data is actually filtered within xselect as follows

xselect> select mkf
$>$ Boolean expression for filter file selection $>$[]

at this prompt give a selection expression. This expression can be in either Fortran or C syntax. For instance, if you wanted all times when OBI_NUM exceeded 1 then the expression would be ``OBI_NUM .gt. 1''. xselect will then calculate and store all time ranges for which this is true. These time ranges will be used for any extractions performed by xselect.

After running "select mkf", a "show status" command will show the filter; any data product extracted while this is in place will be filtered accordingly.

The makefilter file can be used to screen down the "standard events", ie those already screened by SASS, or to rescreen the total set of events. In the latter case, you first need to make a file of the total events, by summing the SASS selected events, and the rejected events, and generating a set of good time intervals which are applicable to this total dataset.

If you wish to bypass the SASS data screening, and do your own screening from the master set of events, you can do this for an RDF dataset by combining the rejected and good events, and calculating the full set of time intervals associated with these data

mk_allevt
mk_allevt 0.2.0:  Type 'mk_allevt -h' for instructions.
***
File: "" is illegal for output
You have the following likely looking file groups:
1       rh110267n00
2       rh701446n00
3       rh701447n00
4       rp110590n00
5       rp110231n00
Type corresponding number to select a set of files.
Or type a specific file or pathname.
Output (abas) Filename: 5

will combine the RDF rejected and good events into a single events extension in a new file (by default this will be named rp110231n00_abas.fits in this example). This new file can be analyzed in xselect as normal.

Saving screened events

If you have screened your events file, then you may wish to save the screened events for later analysis, first you must extract the events under all desired filters

xselect> extract events

xselect> save events good.events

After the second command you will be asked whether you want to read this data back in. If you answer yes then xselect uses the file which you just created rather than the original data files.

Exposure Correcting an image - pcexpmap and hriexpmap

Creates an exposure map for user specified time period and energy range for any US Rev0 or RDF format ROSAT datasets

EXAMPLE - To exposure correct a PSPC image:

pcexpmap

To use pcexpmap the detector maps created from the ROSAT All-Sky Survey data are required. These may be obtained from the /caldb/data/rosat/pspc/cpf/detmaps/ directory on heasarc.gsfc.nasa.gov. The detector maps are available in a number of energy bands, and the filenames contain the PI channel ranges used, where channel 11 is $\sim 0.11 $ keV, channel 200 is $\sim$ 2 keV etc. The detector maps currently available have the following rootnames (one map each for PSPCB and PSPCC):

det_11_19
det_20_41
det_42_131
det_132_201
det_42_201
det_42_51
det_52_69
det_52_90
det_70_90
det_8_19
det_8_41
det_91_131
det_91_201

The output from pcexpmap is a 512x512 FITS image of the whole PSPC field of view (with pixels 14.94733 arcsec per side; representing a blocking factor of 16 over the raw [0.9341875 arcsec] pixelsize) of the effective exposure time (in seconds) at that position. The effects of vignetting (for a spectrum equal to the mean spectrum of the X-ray background in the PSPC band) and spatial variations in the efficiency of the detector are included (via the detector maps), along with detector deadtime effects (applied by pcexpmap).

The program follows the suggestions of Snowden et al. (1992, ApJ, 393 819) and Plucinsky et al. (1993, ApJ, 418, 519) to exclude regions of the PSPC near the edges of the PSPC which are strongly affected by the particle background, the "bright line" regions. These regions are set to have zero exposure time.

In brief, the attitude and GTI files are used to construct a matrix of the time the instrument spent at each pointing position (X,Y relative to the nominal pointing position defined by the optical axis) and roll angle. (The X,Y are in units of 14.94733 arcsec for historical reasons, the ROLL steps are in units of 0.2076 degrees.) The event-rates file is then used to calculate the live-time fraction at each of these positions. Finally the output exposure map is constructed by moving the detector map to each off-axis position, rotated to each roll angle, and adding the detector map with the appropriate weighting factor to the exposure map under construction.

In the following example, the user removes afterpulse events, creates and image and exposure map, and corrects the image using farith.

Example:

        burst
        Name of FITS file and [ext][] rp100000n00_bas.fits[2]
        Name of output FITS file[burst.out]
        Maximum time between events in seconds[0.003]
        Whether to keep first event in burst[yes]

Within xselect, extract an image

xselect> set xybinsize 30

to match the resolution of the detector maps

xselect> extract image phalcut=52 phahcut=90

extract our image in the $\sim 0.52 -- 0.9$ keV band

xselect> save image image_52_90.fits

        pcexpmap
        Enter Event rate filename[]rp100000n00_anc.fits
        Enter Attitude filename[] rp100000n00_anc.fits
        Enter GTI filename[] rp100000n00_bas.fits
        Enter Detector map file[] det_52_90_b.fits
        Enter output filename[] expmap_52_90.fits
        Enter Instrument/Detector name[PSPCB]
         MAIN : PCEXPMAP Ver 2.0.1
         ... Number of unique detector positions         378
         ... Number of entries when Detector ON         9634
         ... Number of entries when Detector OFF           0 (A1LL c/rate<10)
         ... Total ONTIME        9634.00000 s
         ... Total LIVETIME      9314.57227 s
         ... Average MV c/rate    111.51972 count/s
         PCEXPMAP Ver 2.0.1 completed


       farith
       Name of Ist FITS file and [ext#][] image_52_90.fits
       Name of 2nd FITS file and [ext#][]expmap_52_90.fits
       Name of OUTFIL FITS file[] corrected_52_90.fits
       Name of operation[Enter Operation ADD,SUB,DIV,MUL(or +,-,/,*)]/

Please see the online help files for pcexpmap and hriexpmap for more details.

Notes & Warnings:

Comparing the radial profile data to the psf

First the radil profile should be extracted from the events file using extrpsf

extrpsf

This caltools package task extracts a Radial Point-Spread Function (RPSF) dataset from an event file. An RPSF dataset consists of the number of counts per unit area as a function of radius (using series of concentric annulus). This is calculated using the X & Y (ie RA & dec) columns in the event file centered on a point defined by the user (in either RA & dec or pixel coordinates) for a user-defined number of annuli and outer-radius. If desired, the user can also specify the radius (within the outer radius) beyond which will be used to estimate the number of counts per unit area corresponding to the background. The user can also specify any of several prescriptions to be used to calculate the statistical errors associated with the RPSF data. The output psf file is FITS format, and can be directly compared to the theoretical psf model for the hri or pspc data as described below.

Notes & Warnings:

Then the data should be compared to the model, using the script calcrpsf

calcrpsf

This routine is a multi-task wrapper for Radial Point Spread Function (RPSF) which allows several common steps to be performed by a single script. This task interfaces with radial profiles produced using either extrpsf or pros (after conversion of the pros files to FITS format via STWFITS and ST2RPSF).

calcrpsf spawns:

The user is prompted as to which of these tasks are desired, the ftool rpsf2eef is also available, which converts a radial PSF (RPSF) dataset to a radial encircled energy function (REEF) dataset. The REEF file can be converted to qdp using rpsfqdp, in the same way the RPSF file can.

        calcrpsf
        ** CALCRPSF 1.3.0
        Input filename[temp] radial_profile.fits
        Output filename[calcrpsf.out]
        Run st2rspf ?[no]
        Run rbnrpsf ?[yes]
        Generate a theoretical RPSF dataset ?[no] yes
        Run rpsfqdp ?[no] yes

        Please enter Telescope name[ROSAT]
        Please enter Instrument name[PSPCB]
        Please enter Minimum PI channel for image[] 12
        Please enter Maximum PI channel for image[] 200
        Please enter background count rate (ct/pixel)[] 5e-4
Please enter PHA filename :[] NONE
Please enter Off Axis histogram filename :[%] NONE
Please enter RMF filename :[/caldb/data/rosat/pspc/cpf/matrices/pspcb_gain2_256.
rmf]
Please enter off_axis angle (arcmin) :[0.5]
 ** pcrpsf 3.0.1
 ** pcrpsf 3.0.1 completed successfully


 *** spawning RPSFQDP to convert RPSF dataset to QDP:
rpsfqdp chatter=5 datafile="rpsfpred.tmp" outfile=xxx.calcrpsf
 ** rpsfqdp 3.0.1
 ** rpsfqdp 3.0.1 completed successfully

** CALCRPSF 1.3.1   Finished

The resulting file can now be plotted with QDP (if you skip rpsfqdp then the resulting file can be plotted using fplot).

Notes & Warnings:

Performing mathematical operations on PHA files

The ftool mathpha can be used to perform mathematical operations on PHA files. The calculation can optionally be carried out units of COUNTS or RATE, the user is advised to carefully read the help which is available before using this task.

Example:

        mathpha
        ** MATHPHA 3.0.3
        Expression to be evaluated[] spectrum1.pha / spectrum2.pha
        Units algebraic expression to be performed in (C,R,F or ?)[C] ?


        ... This parameter indicates the physical units in
        which the algebraic expression is to be evaluated,
        and the units in which the output file will be written.
        The allowed values are C (ie COUNTS), or R (ie RATE),
        implying that the algebra will be performed in COUNTS
        or COUNTS PER SECOND space respectively. The algebra
        will be in this space irrespective of whether the input
        files contain data stored in counts or in counts per
        second (ie, if units=C, input PHA histograms stored in
        counts per sec will be converted to counts prior to any
        mathematical operations being performed). Similarly, this
        flag gives the implied units of any numerical constants
        within the input expression. A third option value is also
        allowed, units=F (ie FILE) whereby the algebra is performed
        in which ever units most of the files are stored in (COUNTS
        in the event of a tie).

        Units algebraic expression to be performed in (C,R,F or ?)[?] C
        O/p PHA filename[] spectral.ratio
        Exposure time flag/value ({value},{file},CALC,NULL or ?)[] ?

          This parameter controls the value written as the exposure time in the
          output file. The allowed values are:

             {a numerical value}
        - where the entered value (assuming it can be parsed as a real), is
        written to the output dataset. The value will be assumed to be in
        units of seconds. At the current time, numerals of the form  1E04
        or 1E-04 are NOT supported.
    {an input filename}
        - whereby the exposure time read from the specified input file is
        written to the output dataset
    CALC
        - where the exposure time is calculated from the input expression
        by substituting each filename with its exposure time, and performing
        the specified calculation.
    NULL
        - where an exposure of 1 second is written to the output dataset

        Exposure time flag/value ({value},{file},CALC,NULL or ?)[] NULL
        Number of comment strings to be added (up to 4)[1]
        Comment 1[] This is a ratio of spectrum1.pha/spectrum2.pha
        ...... processing file: spectrum1.pha
        ...... processing file: spectrum2.pha
        ... performing algebra in units of COUNTS
        ** FILOP 2.0.0   WARNING:
        ... Poissonian errors with N<20 assumed  for:
        ...... channels     1.-    7.
        ...... channels   201.-  201.
        ...... channels   205.-  208.
        ...... channels   210.-  213.
        ...... channels   216.-  256.
        ** FILOP 2.0.0   WARNING:
        ... Divide-by-zero encountered for:
        ...... channels     1.-    7.
        ...... channels   252.-  252.
        ...... channels   256.-  208.
        ... These channels have been set bad, and  value DIVZERO inserted
        ... written the PHA data Extension
        ** MATHPHA 3.0.3   Finished

This made a ratio of two spectra, the user can plot the output file using FPLOT (use FSTRUCT and FLCOL to examine the file first, so you know what column names to give to FPLOT).

Creating particle background spectra

Particle background spectra are required for use in background subtraction of extended sources, or in any case where the background must be estimated using a significantly different part of the PSPC detector than the region where the source data were taken. The sky X-rays have a different radial dependance than the particle background, so simply correcting the background spectrum for the different vignetting effect is inadequate

pcparpha generates a 256-channel PHA spectrum of the particle background in the ROSAT PSPC from the parameterization of Plucinsky etal (1993 ApJ 418, 519)

Example:

        pcparpha
        ** PCPARPHA 2.0.1
        O/p PHA filename[particle_spectrum.pha]
        EVR filename[rp100000.evr]
        GTI filename[rp100000.fits]                        (the events file)
        WMAP/Off-axis histogram filename[target.pha]
        No. pixels in source region (or '%' or '?')[%] ?
         ... This parameter is the number of pixels for which the
             particle background spectrum is to be calculated.
             This information should also be in the Off-axis histogram
             dataset. Enter "%" to use the stored values or enter
             an integer to override the stored values. In the
             latter case, you will be prompted for the pixel size next.
        No. pixels in source region (or '%' or '?')[?] %
        .... No. theta bins to process:           20
        ... No. EVR events to process:          323
                                         theta      weight (%)
        ...... finished theta bin   1 (1.5000    ,  0.000000)
        ... written the PHA data Extension
        ** PCPARPHA 2.0.1   Finished


next up previous contents
Next: Quick Summary Up: ROSAT Xselect Guide Previous: Preparing for XSPEC, XRONOS   Contents
Michael Arida 2001-09-20