Chandra

From Remeis-Wiki
Jump to navigation Jump to search
Chandra
HETG

As of Aug 2014, the old Chandra HETG extraction scripts by Manfred are deprecated. They were good for Ciao Versions up to 4.2. Ciao 4.3 already has a bug that does not cause error messages with this script but whose bug fix is not implemented. On top of that a lot has changed. We have newer extraction scripts working with Ciao-4.6 that should be much easier to maintain with future changes to data preparation with Ciao, as the data preparation is now based on chandra_repro.

Data preparation and data extraction are two separate steps, i.e., the data only needs to be prepared / reprocessed once (making sure the newest and most appropriate CALDB information is used for each observation), but then can be used for extration of spectra, lightcurves, and images multiple times, e.g., with different GTIs. The scripts can be found at: /data/system/software/scripts/chandrascripts/ and are called chandraprepare and gratingsextract. Calling the scripts with no option or with --help will print a description of available options / arguments to STDOUT.

Caveats

The scripts currently have issues with data in CC mode.

If there are multiple event1 files in the archive directory, the script will exit with a warning. Correct use of multi-event1 file observation is pending implementation. Talk to the Remeis Chandra-point of contact.

chandraprepare

Example bash script to call chandraprepare (update the Ciao version if applicable):

#!/bin/bash

. /data/system/software/chandra/ciao-4.6/ciao-4.6/bin/ciao.bash

export CHANDRATOOLS=/data/system/software/scripts/chandrascripts

chandraprepare=${CHANDRATOOLS}/chandraprepare

cdata=/eu/X-ray/Chandra/archive/${obsid}/
obsid=1600
datadir=${cdata}/${obsid}

${chandraprepare} --datadir=${datadir} --prepdir=test${obsid}


gratingsextract

Example bash script to call gratingsextract (update the Ciao version if applicable):

#!/bin/bash

. /data/system/software/chandra/ciao-4.6/ciao-4.6/bin/ciao.bash

export CHANDRATOOLS=/data/system/software/scripts/chandrascripts

extract=${CHANDRATOOLS}/gratingsextract

obsid=1600
name=full

${extract} --prepdir=${obsid} --name=${name} --heg --meg --order=-1,1 --dt=25.5 --energyband=500,1500,3000,10000


Loading data in ISIS

The above scripts create individual files for each arm/order, even for lightcurves. While the old Manfred-scripts wrote loadscripts to ease loading the data in ISIS, the new script do not provide loaddata.sl scripts anymore. The naming scheme for the extracted data changed slightly and is now generic enough to allow for common load functions for HETG data. Talk to Natalie for functions that easily load spectral data (preserving the order established by the old extraction scripts to allow for compatibility with old isis par files), individual lightcurves and the sum over lightcurves.

Eventually, these function will make it into the isisscripts.


LETG

Theoretically, the new scripts described above can handle LETG observations. However, this is largely untested.



ACIS-I

Global scripts are yet missing.