Last modified: 7 November 2022

URL: https://cxc.cfa.harvard.edu/ciao/why/caldb_greff.html

HETG Grating Efficiency


The HETG grating efficiency file (GREFF) was updated in CALDB 4.4.6.1 (02 December 2011). The new file (N0007) will be used by default when creating HETG response files (ARFs). The CIAO tools and scripts which use this file are:

How to use a different HETG GREFF file in CIAO

If version N0006 is needed to avoid negatively impacting an analysis in progress or to perform a comparison between the GREFF files, the ardlib.par parameter file can be used to set a specific version of the HRMA file.

The following example shows how to set the HETG GREFF version N0006. There are four parameters for the GREFF in ardlib.par (one for each of the 4 mirror shells):

unix% plist ardlib

Parameters for /soft/ciao/param/ardlib.par
...
#---------------------------------------------------------------------------
# AXAF HETG
#---------------------------------------------------------------------------
AXAF_HETG_1000_FILE = CALDB            Enter HETG 1000 efficiency file
AXAF_HETG_0100_FILE = CALDB            Enter HETG 0100 efficiency file
AXAF_HETG_0010_FILE = CALDB            Enter HETG 0010 efficiency file
AXAF_HETG_0001_FILE = CALDB            Enter HETG 0001 efficiency file
...

First we need to determine which extension of the GREFF file is appropriate for each ARDLIB parameter. A "foreach" command is used to loop through all the file extensions. The syntax is correct for the csh or tcsh shell. If you are using another shell, e.g. bash, change the loop syntax accordingly.

unix% dmlist $CALDB/data/chandra/default/greff/hetgD1996-11-01greffpr001N0006.fits blocks

--------------------------------------------------------------------------------
Dataset: /soft/ciao/CALDB/data/chandra/default/greff/hetgD1996-11-01greffpr001N0006.fits
--------------------------------------------------------------------------------

     Block Name                          Type         Dimensions
--------------------------------------------------------------------------------
Block    1: PRIMARY                        Null
Block    2: AXAF_GREFF1                    Table         3 cols x 1408     rows
Block    3: AXAF_GREFF2                    Table         3 cols x 1408     rows
Block    4: AXAF_GREFF3                    Table         3 cols x 1408     rows
Block    5: AXAF_GREFF4                    Table         3 cols x 1408     rows

unix% foreach f (1 2 3 4)
foreach? echo "AXAF_GREFF$f"
foreach? dmkeypar "$CALDB/data/chandra/default/greff/hetgD1996-11-01greffpr001N0006.fits[AXAF_GREFF$f]" SHELL echo+
foreach? echo ""
foreach? end
AXAF_GREFF1
1000

AXAF_GREFF2
0100

AXAF_GREFF3
0010

AXAF_GREFF4
0001

It is also possible to run each dmkeypar command individually, e.g.

unix% dmkeypar "$CALDB/data/chandra/default/greff/hetgD1996-11-01greffpr001N0006.fits[AXAF_GREFF1]" SHELL echo+
1000

Now match the extension in the file to the correct ARDLIB parameter:

unix% pset ardlib AXAF_HETG_1000_FILE="$CALDB/data/chandra/default/greff/hetgD1996-11-01greffpr001N0006.fits[AXAF_GREFF1]"

unix% pset ardlib AXAF_HETG_0100_FILE="$CALDB/data/chandra/default/greff/hetgD1996-11-01greffpr001N0006.fits[AXAF_GREFF2]"

unix% pset ardlib AXAF_HETG_0010_FILE="$CALDB/data/chandra/default/greff/hetgD1996-11-01greffpr001N0006.fits[AXAF_GREFF3]"

unix% pset ardlib AXAF_HETG_0001_FILE="$CALDB/data/chandra/default/greff/hetgD1996-11-01greffpr001N0006.fits[AXAF_GREFF4]"

Check the results by plist-ing the parameter file:

unix% plist ardlib

Parameters for /home/username/cxcds_param4/ardlib.par

...

#---------------------------------------------------------------------------
# AXAF HETG
#---------------------------------------------------------------------------
AXAF_HETG_1000_FILE = /soft/ciao/CALDB/data/chandra/default/greff/hetgD1996-11-01greffpr001N0006.fits[AXAF_GREFF1] Enter HETG 1000 efficiency file
AXAF_HETG_0100_FILE = /soft/ciao/CALDB/data/chandra/default/greff/hetgD1996-11-01greffpr001N0006.fits[AXAF_GREFF2] Enter HETG 0100 efficiency file
AXAF_HETG_0010_FILE = /soft/ciao/CALDB/data/chandra/default/greff/hetgD1996-11-01greffpr001N0006.fits[AXAF_GREFF3] Enter HETG 0010 efficiency file
AXAF_HETG_0001_FILE = /soft/ciao/CALDB/data/chandra/default/greff/hetgD1996-11-01greffpr001N0006.fits[AXAF_GREFF4] Enter HETG 0001 efficiency file
..

Remember to "punlearn" or delete your ardlib.par file when you are ready to start an analysis with the default CALDB HETG GREFF file.