SAS (pwkit.environments.sas)

sas - running software in the SAS environment

To use, export an environment variable $PWKIT_SAS pointing to the SAS installation root. The files $PWKIT_SAS/RELEASE and $PWKIT_SAS/setsas.sh should exist. The “current calibration files” (CCF) should be accessible as $PWKIT_SAS/ccf/; a symlink may make sense if multiple SAS versions are going to be used.

SAS is unusual because you need to set up some magic environment variables specific to the dataset that you’re working with. There is also default preparation to be run on each dataset before anything useful can be done.

Unpacking data sets

Data sets are downloaded as tar.gz files. Those unpack to a few files in ‘.’ including a .TAR file, which should be unpacked too. That unpacks to a bunch of data files in ‘.’ as well.

SAS installation notes

Download tarball from, e.g.,

ftp://legacy.gsfc.nasa.gov/xmm/software/sas/14.0.0/64/Linux/Fedora20/

Tarball unpacks installation script and data into ‘.’, and the installation script sets up a SAS install in a versioned subdirectory of ‘.’, so curl|tar should be run from something like /a/sas:

$ ./install.sh

The CCF are like CALDB and need to be rsynced – see the update-ccf subcommand.

ODF data format notes

ODF files all have names in the format RRRR_NNNNNNNNNN_IIUEEECCMMM.ZZZ where:

RRRR
revolution (orbit) number
NNNNNNNNNN
obs ID
II

The instrument:

OM
optical monitor
R1
RGS (reflection grating spectrometer) unit 1
R2
RGS 2
M1
EPIC (imaging camera) MOS 1 detector
M2
EPIC (imaging camera) MOS 2 detector
PN
EPIC (imaging camera) PN detector
RM
EPIC radiation monitor
SC
spacecraft
U

Scheduling status of exposure:

S
scheduled
U
unscheduled
X
N/A
EEE
exposure number
CC
CCD/OM-window ID
MMM
data type of file (many; not listed here)
ZZZ
file extension

See the make-*-aliases commands for tools that generate symlinks with saner names.