The purpose of screening is to create, for each instrument, events lists that contain good data, suitable for scientific analysis.
There are three methods of applying screening criteria, and three starting points which differ in the amount of pre-screening performed by the ASCA Data Facility. These will all be described below.
After screening, users are ready to filter the parts of the data they wish to analyze and subsequently extract spectra, light curves, and images.
Screening is a routine process and done by using XSELECT as the main workhorse to apply screening criteria to the FITS data files. Screening is made even easier with the scripts ascascreen and tkascascreen which drive XSELECT with convenient user-interfaces. The three methods of screening can be summarized as follows.
xsel:ASCA-GIS2-PH > select mkf "ACS==0 && COR>4 && ELV>5" > Enter the filter file directory >[.]
Screening criteria may be written in Fortran style (e.g., ELV.gt.5) or in C style (ELV5). The select mkf command prompts the user to enter the directory where the mkf file or files is/are located. Alternatively the mkf directory can be specified on the command line by assigning it to the parameter mkf_dir (for example, mkf_dir=../aux/).
The first stage of screening involves determining which data files correspond to the instrument, mode and bit rates you want to analyze and then applying screening criteria. For this, ascascreen makes using XSELECT easier. However, XSELECT must still be used for the final stage of defining and applying filters and extracting products.
As mentioned in §2.4, ASCA data are made available to users, on tapes and in the Archive, in three different levels of processing. These are UNSCREENED, SCREENED and RAW (but the latter are discontinued in REV1 and later revisions; see §2.4). From the point of view of screening, these levels represent three different starting points. The most common will be to read the unscreened files into XSELECT into XSPEC in order to apply screening criteria suited to the user's particular data set. On the other hand for a quick-look analysis the user can read the screened files into XSELECT and proceed immediately to filter and extract images, light curves and spectra.
If for some reason, the user cannot obtain the unscreened, *.unf files from REV1 (or later) processing, XSELECT and ascascreen will still accept RAW files.
Whether to use XSELECT, ascascreen, tkascascreen, unscreened files or screened files, is a matter of taste, convenience and what you want to do with your data. Here is a (non-exhaustive) list of data reduction scenarios matched to suggested screening strategies:
It is generally a good idea to keep your mkf files, screened events lists and data products in separate directories.
The automatic screening script ascascreen simply carries out, with a minimum of user interaction, what the ASCA GOF consider to be standard screening criteria. Rather than executing the command XSELECT followed by a set of XSELECT commands, the script prompts the user for inputs which are then used by the script to produce an XSELECT command file (a file with a .xco extension) which is then run by XSELECT. The command file is not discarded and can be used again - edited, if you like - for a truly automatic XSELECT session. It can also serve as a reminder of the sequence of XSELECT commands if you're using XSELECT xselect interactively.
The ascascreen script comes automatically with the FTOOLS package, and can be found in the directory $FTOOLS/bin.perl (for example, $FTOOLS may be /ftools/ALPHA/release) which is produced by the installation process.
Please note that ascascreen is written in Perl and therefore requires that Perl be installed for it to run. If you do not have Perl, type ascascreen at your system prompt to see a set of instructions on how to obtain Perl.
Finally, it is assumed that the user has read chapter 5 and fully understood the various selection criteria that are used in analysing ASCA data.
First create a directory for your screened products beneath the one containing the screened events files. Then type ascascreen which will cause the following series of directions and questions to appear.
Note that for GIS data:
For SIS data:
Index NEVENTS ONTIME RAWXBINS RISEBINS TIMEBINS PHA_BINS POS_DET 0 123721 66181.8 256 32 1 1024 FLF
for the GIS and
Index NEVENTS ONTIME S0CCDMOD S0CCDLST S0_ARENA 0 872848 73264.8 4 0123 0
for the SIS. The quantities listed (apart from NEVENTS and ONTIME) correspond, for the GIS, to the PH mode bit assignments and for the SIS to various mode-dependent settings. Data for which these crucial modal parameters are different and should not in general be analyzed together. The user is thus forced to chose a data set by specifying the index (the first column). In this example only one index is present, so no choice is available.
Next, the user is prompted for actual mkf parameter selections.
Note that for SIS data, ascascreen applies two additional criteria which, because they are usually fixed, are not prompted for. These are (1) time after passing through the SAA (T_SAA) and (2) the time after passing through day-night terminator (T_DY_NT). These selection criteria are fully described in § 5.4.6 and §5.4.7 respectively. Note, however the bug in FTOOLS v3.6, described in §5.4.8.
Taking GIS data as an example, ascascreen produces the following files (a1060_g2 was used as the root of the product file names in this example):
An analogous set of files is produced with SIS data.
ascascreen stops after creating a screened events list. What you do next depends on which of the following three scenarios applies in your case.
As mentioned above, ascascreen creates an XSELECT command file which is used to drive XSELECT. By typing ascascreen -q, users can stop ascascreen at the point just before XSELECT is invoked and the command file executed, thereby returning to the system prompt. The advantage of such a procedure is that it enables the user to change the screening process without having to run XSELECT from scratch: users can simply modify the command file and or the mkf selection file and then use the modified file to run XSELECT automatically.
For example, if you want to create a screened events list from 4-CCD mode data which includes events from only one chip (SIS0, chip 1, say), run ascascreen with the -q option and then use a text editor to add the following line to the XSELECT command file produced by ascascreen (sis0.xco, say):
select events ccdid.eq.1
Then type XSELECT , give a session name, and then enter the command
tkascascreen is a GUI version of ascascreen which does exactly the same things as ascascreen. It is very easy to use, but to understand the questions, please refer to the instructions for running ascascreen.
There is one minor difference: the session name which the user should supply on the first screen is the prefix added to the names of the output files.
This section explains how to use XSELECT manually to achieve the same results as ascascreen. To get better acquainted with XSELECT, we also suggest the following.
Again, it is a generally a good idea to keep your mkf files, events files and data products in separate directories.
To start up XSELECT, type XSELECT at your system prompt. In this example, we'll be reducing GIS data from the PV observation of Abell 1060. Since the data are public, you can get the same data and mkf files yourself via FTP from the corresponding unscreened and aux directories. After giving the session a name, the mkf and data directories should be set:
tarquin>XSELECT ** XSELECT V1.3 ** >Enter session name>[xsel] A1060 Notes: XSELECT set up for ASCA Keywords for time and pha are TIME PI Units of time are s Default timing binsize = 128.00 Keywords for images are DETX DETY Keywords for the WMAP are DETX DETY A1060:ASCA> set mkfdir .. A1060:ASCA> set datadir .. Setting data directory to /usr/day/asca/data/a1060/ A1060:ASCA>
Notice that XSELECT displays its initial default settings. The mission is ASCA; light curves, spectra and images will be extracted from the TIME, PI and DETX/DETY columns, respectively. At this point, we specify which instrument we want to analyze and which data mode:
A1060:ASCA> set instrument gis2 Setting: IMAGE binning = 1 WMAP binning = 1 Energy Column = PI Energy rebinning = 1 A1060:ASCA-GIS2> set datamode ph
As before, another set of default settings is displayed: extracted images will not rebinned, nor will the WMAP (§8.2.2) and spectra.
The next, crucial step is to identify which of the data files in the data directory correspond to GIS2 PH mode. This is one of the important functions of XSELECT. For *.unf files it is trivial but any users who are still using RAW data files are spared from having to `deconstruct' the filenames. It is done by making what is called an obscat:
A1060:ASCA-GIS2> make obscat > Default filter for the catalogue (NONE for none, DEF for default) >[DEF] Using default selection expression: ONTIME>100&&NEVENTS>0&&HV_RED=='OFF'&&HVH_LVL==3&&HVL_LVL==4 ******************** Observation Catalogue ******************** Data Directory is: /usr/day/asca/data/a1060/ HK Directory is: /usr/day/asca/data/a1060/ OBJECT DATAMODE BIT_RATE DATE-OBS TIME-OBS ONTIME NEVENTS PHA_BINS 1 A1060 PH MEDIUM 28/06/93 23:46:14 .146E+04 2225 1024 2 A1060 PH MEDIUM 29/06/93 00:20:06 .114E+04 2060 1024 3 A1060 PH HIGH 29/06/93 00:49:00 .136E+04 3254 1024 . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 A1060 PH MEDIUM 29/06/93 23:57:42 .262E+04 3458 1024 40 A1060 PH HIGH 30/06/93 00:41:32 .106E+04 2595 1024 41 A1060 PH HIGH 30/06/93 01:04:46 .392E+03 918 1024 A1060:ASCA-GIS2>
The `filter for the catalogue' offers the user the opportunity to pre-select files based on certain header keywords, some of which are displayed in the obscat itself. The default is fine for most purposes.
Each line in the obscat, not all of which are shown here, corresponds to an individual data file. Specifying which ones to merge and screen is done with the choose command. However, before choosing, users might want to edit the obscat by selecting, for example, all the HIGH bit-rate files. Generally, such selections are performed with the select command. In this case, the first argument is obscat and the second argument is a selection criterion, as in the following example.
A1060:ASCA-GIS2 > select obscat BIT_RATE.eq.'HIGH'
Notice that the selection criterion is specified in Fortran style. It is also possible to use C style. The parameter selected on, BIT_RATE is a column in the obscat (a FITS file, incidentally). Since its values are character strings, HIGH is enclosed in quotation marks: numerical values, such those in the ONTIME column do not require quotation marks. To see the new, selected obscat, type show obscat.
We can now choose which files to work on. To choose all of them, type choose 1-** (** stands for the number of the last file):
A1060:ASCA-GIS2 > choose 1-** Setting datamode to PH Got the minimum time resolution of the chosen data: 0.62500E-01, Getting Min and Max for Energy Column... Got min and max for PI: 0 1023 Number of files read in: 25 Files currently in use: 1 ft930628_2345_1426G200770H.fits 2 ft930628_2345_1426G201770H.fits 3 ft930628_2345_1426G201970H.fits . . . . . . 23 ft930629_1426_0123G206370H.fits 24 ft930629_1426_0123G206970H.fits 25 ft930629_1426_0123G207170H.fits
As can be seen, the screen output shows the data files we've chosen.
We are now ready to apply selection criteria which are described in detail in chapter 5. For the GIS, these fall into three categories: (1) mkf-based criteria, (2) removing the high background ring and calibration source, and (3) applying RTI-based background rejection. Each of these uses a different XSELECT command.
To apply mkf-based selection, type select mkf followed by the selection criteria which can be entered separately, one per command, or strung together. The latter is better because each select mkf command creates a set of good-time intervals (GTI) which are combined with a logical `AND' operation to the current set. For large files, this can be CPU-intensive:
A1060:ASCA-GIS2-PH> select mkf >Boolean expression for filter file selection > elv.gt.5.and.cor.gt.6.and.g2_l1.gt.0.and.saa.eq.0
The high background ring and calibration source are removed by applying a region filter. You can either extract an image and define the filter yourself, use a pre-existing one left over from a previous GIS2 ascascreen session or simply copy the following lines into an ASCII file to create an SAOimage file (which we'll call ring.reg):
See also §5.5.2. The filter is entered with the following command:
A1060:ASCA-GIS2-PH> filter region ring.reg
Applying RTI-based background rejection, unlike using a region filter or mkf file, is mission-specific. Accordingly, the procedure gets its own XSELECT command, gisclean:
A1060:ASCA-GIS2-PH> gisclean Using table:/tmp_mnt/FTP/software/ascasrv/ftools/DEC/ftools/refdata/rti_gis_1024_040693.fits Now processing /usr/day/asca/data/a1060/ft930628_2345_1426G201770H.fits Infile # of rows Outfile # of rows # filtered ---------------- ----------------- ---------- 5915 5339 576 . . . . . . . . . Now processing /usr/day/asca/data/a1060/ft930629_1426_0123G207170H.fits Infile # of rows Outfile # of rows # filtered ---------------- ----------------- ---------- 918 841 77For each data file, XSELECT displays the number of rows (each event occupies one row) which are accepted and rejected using RTI.
We can now create the screened events list by simply typing extract events. This command initiates the extractor, a program called by XSELECT which applies whatever GTIs and filters are in place to the current set of data files. Depending on what is extracted (events, a spectrum, image or light curve), the extractor creates a temporary file which is deleted upon exiting XSELECT, unless saved.
A1060:ASCA-GIS2-PH> extract events Extractor 1.0r XPI 2.1u Doing file: /usr/day/asca/data/a1060/redux/A1060_work1001.xsl 100% completed Total Good Bad: Region Time Phase PHA 5339 2623 1498 1218 0 0 Writing events file . . . Doing file: /usr/day/asca/data/a1060/redux/A1060_work1024.xsl 100% completed Total Good Bad: Region Time Phase PHA 841 604 237 0 0 0 Writing events file 100% completed ===================================================================== Grand Total Good Bad: Region Time Phase PHA 73565 47039 21402 5124 0 0
The extractor displays on the screen a summary of which events have been extracted and which discarded. There are three categories for discarded events: Region, Time, Phase and PHA which correspond to the various kinds of filter. Events screened out using the mkf file are tallied in the TIME column. The events list, made up of the screened events in the data files, is saved by:
A1060:ASCA-GIS2-PH> save events a1060_g2.evt Wrote events list to file a1060_g2.evt >Continue to use the filtered events list?>[yes] Changing Data directory from: /usr/day/asca/data/a1060/ to the current working directory.
Note that XSELECT, by default, assumes that the user wants to work with the new, screened events list which is in the current directory rather than the data directory above it - hence the screen message about changing the working directory.
At this point you can continue the reduction process. The next steps are filtering, and extracting spectra, light curves or images - described in chapters 8, 9 and 10 respectively.
Alternatively, you can quit XSELECT, do something else, and then resume. Type XSELECT at your system prompt. You'll first be prompted to specify the session name (used to identify temporary files). Next, you have to tell the program where the data (in this case, the screened events list) and the mkf files are. Use the commands set datadir and set mkfdir respectively. Finally, read in the events list with the read events command and proceed to filter and extract.
It is possible to plot all the mkf parameters from XSELECT using the commands mkfbin and then plot mkf. In the following example, SIS events above threshold (S0_PIXL1 and S1_PIXL3) are plotted against the Bright Earth angle (BR_EARTH). A full list of the mkf parameters can be obtained from XSELECT using the show par mkf command.
xsel:ASCA-SIS1> mkfbin > Enter parameters in filter file > BR_EARTH S0_PIXL1 S1_PIXL3 > Give print-out time interval > 32 xsel:ASCA-SIS1 > plot mkf
The available parameters are:
> Enter independent variable ( 0 for TIME ) > 1 > Enter dependent variable(e.g., 1-6) > 2-3 PLT>
Standard QDP commands can be used from here on.
Note that the GSFC-supplied mkf files have a bin size of 32s. Using a finer `print-out time interval' than this in the mkfbin command will result in incorrect plots.
Plotting such mkf parameters as:
is highly instructive, particularly when the default screening criteria lead to a smaller than expected amount of accepted data.