SUBJECT(grt_lev2) CONTEXT(pipes) SYNOPSIS Level 2 grating pipeline for processing grating science data DESCRIPTION This is the level 2 grating pipeline for processing both ACIS and HRC data. It's main purpose is to generate an one-dimensional counts spectrum for each grating part, order, and source by binning the event data. Fits images of the data will also be generated. The following tools and scripts are run within the `grt_lev2.ped' pipeline. See the individual documentaion for more details on each tool. o) build_stk_filters - adds GTI (Good Time Interval) command line filter to the input L1.5 event list. o) combine_hrc_stack/combine_acis_stack - uses dmmerge to combine all the L15 event files in the input stack to one sigle file. For HRC data, the following columns won't be written to the combined event file: CRSV, CRSU, AMP_SF, AV1, AV2, AV3, AU1, AU2, AU3, RAW, SUMAMPS. For ACIS data, column PHAS and CORN_PHA won't be written to the combined event file. o) hrci_filter_events/hrcs_filter_events/acis_filter_events - For hrc-i data, dmcopy is used to copy events that have STATUS=xxxxxx00xxxx0xxx00000000x0000000. For hrc-s data, dmcopy is used to copy events that have PHA=0:254 and STATUS= xxxxxx00xxxx0xxx00000000x00000xx. For acis data, dmcopy is used to copy events that have STATUS=0, and GRADE=0,2,3,4,6. o) grt_lev2_regappend - appends the original L1.5 event files' REGION extension to the dmmerg'd and dmcopy'd event file. o) grt_lev2_calib - set the calibration files for the pipeline. o) tgextract - bins grating wavelengths column in the event file into an one-dimensional counts spectrum for each grating part, diffraction order and source. The output file is called a PHA2 file. o) collect_target_pointing - creates a header parameter file of the EVENTS extension. The goal is to obtain the values of the RA_TARG, DEC_TARG header keyword. o) pixlib_setup_calib - set the correct pixlib parameters. o) dmcoords - finds the sky coordinates of the target from the values of the RA_TARG and DEC_TARG header keyword. o) hrc_make_center_img/acis_make_center_img - runs events_2_center_image to convert the event file into a fits image file that contains the central part of the data only. The output image size is 1024 x 1024 pixels. Note that for ACIS Continuous readmode data, no image file will be generated. o) hrc_make_full_img/acis_make_full_img - runs dmcopy to convert the event file into a full fits image file. The binning factor used for HRC data is 32, while the binning factor used for ACIS data is 8. o) update_revision - runs dmhedit to update the value of the REVISION keyword in the output files of this pipeline. o) caldb_updata_version - adds the CALDBVER keyword with value to the headers of the PHA2 file. o) summary_page - creates summary pages for the observation. The summary pages will be in HTML and postscript format. o) remove - removes any temporary files that we don't need. PARAMETERS name type ftype def min max units reqd stacks autoname ================================================================================================ clobber boolean no verbose integer 0 0 5 lookupTab string ))echo $ASCDS_CALIB/grt_lev2_dmmerge_lookup.txt principalTmp string ))echo $ASCDS_CALIB/principal_SI_hdr2.par inregion_file string none tg_srcid_list string all tg_part_list string header_value tg_order_list string default ancrfile string none respfile string none backfile string none rowid string bin_units string angstrom min_bin_leg string compute max_bin_leg string compute bin_size_leg string compute num_bins_leg string compute min_bin_meg string compute max_bin_meg string compute bin_size_meg string compute num_bins_meg string compute min_bin_heg string compute max_bin_heg string compute bin_size_heg string compute num_bins_heg string compute tg_d_units string degrees min_tg_d string default max_tg_d string default extract_background boolean yes min_upbkg_tg_d string default max_upbkg_tg_d string default min_downbkg_tg_d string default max_downbkg_tg_d string default DETAILED PARAMETER DESCRIPTIONS clobber type=boolean def=no Clobber output files? verbose type=integer def=0 min=0 max=5 Controls amount of verbose output about each processing step. lookupTab type=string def=))echo $ASCDS_CALIB/grt_lev2_dmmerge_lookup.txt see dmmerge principalTmp type=string def=))echo $ASCDS_CALIB/principal_SI_hdr2.par Template file that lists the name of the keywords to be retrieved. inregion_file type=string def=none see tgextract tg_srcid_list type=string def=all see tgextract tg_part_list type=string def=header_value see tgextract tg_order_list type=string def=default see tgextract ancrfile type=string def=none see tgextract respfile type=string def=none see tgextract backfile type=string def=none see tgextract rowid type=string see tgextract bin_units type=string def=angstrom see tgextract min_bin_leg type=string def=compute see tgextract max_bin_leg type=string def=compute see tgextract bin_size_leg type=string def=compute see tgextract num_bins_leg type=string def=compute see tgextract min_bin_meg type=string def=compute see tgextract max_bin_meg type=string def=compute see tgextract bin_size_meg type=string def=compute see tgextract num_bins_meg type=string def=compute see tgextract min_bin_heg type=string def=compute see tgextract max_bin_heg type=string def=compute see tgextract bin_size_heg type=string def=compute see tgextract num_bins_heg type=string def=compute see tgextract tg_d_units type=string def=degrees see tgextract min_tg_d type=string def=default see tgextract max_tg_d type=string def=default see tgextract extract_background type=boolean def=yes see tgextract min_upbkg_tg_d type=string def=default see tgextract max_upbkg_tg_d type=string def=default see tgextract min_downbkg_tg_d type=string def=default see tgextract max_downbkg_tg_d type=string def=default see tgextract INPUT FILES The following are the lists of input files and stacks of files needed to run the pipeline. o) ACIS or HRC L1.5 event files: [root]_evt1a.lis (list of level 1.5 event files, '*evt1a.fits') o) L1 files specify GTI: [root]_flt1.lis (list of GTI files, '*_flt1.fits') OUTPUT PRODUCTS The following are the archived output products produced by the pipeline. Primary Output Products o) ACIS / HRC L2 events: [root]_evt2.fits o) ACIS / HRC PHA2 file: [root]_pha2.fits The pipeline log file will also be created but not archieved. It includes not only the actual execution of the pipeline, but all the retrevial and archive steps. PIPELINE ARGUMENTS The following arguments are needed to instanciate the pipeline to be run for a particular obsid. o) root name: Root name of the observation o) input directory: Directory that contains all the required input files. o) output directory: Directory that all the output files will be written to. o) template name: Template name of the L2 grating pipeline, grt_lev2.ped. o) detector: Detector name, sunch as ACIS, HRC-S or HRC-I. o) revision: Revision number The above parameters should be specified as "-r [root name]=[value] -i [input directory]=[value] -o [output directory]=[value] -t grt_lev2.ped -a [detector]=[value] -a [revision]=[value]" to pbuilder.pl or flt_run_pipe.pl. VERSION DS6.0.0 LAST MODIFIED April 2001