Experiment setup


Cheetah does not magically know the details about your experiment - it is necessary to tell Cheetah about the location and format of data files, detector calibration, and what analysis to perform. 

Most of this mess has been hidden behind a few configuration scripts which you will need to edit in order to provide the necessary information. This page will guide you through the key steps in setting up these scripts from scratch for a new experiment.

First, know the location of your data and where temporary files can be written.

At CXI, all data for your experiment will usually be in a location such as


In this directory will be subdirectories with the raw data (xtc/), somewhere to write temporary files (scratch/), and a few other directories that don’t matter for now.

    [psexport02] cxi12345 > ls

    calib  ftc  hdf5  res  scratch  usr  xtc

1. Download the template

Expand the file /reg/g/cfel/cheetah/template.tar into the location where you want files to be placed:

> tar -xvf /reg/g/cfel/cheetah/template.tar

This will create the cheetah directory with a number of sub-directories containing a ‘starter kit’ of files:

> ls cheetah

calib  gui  hdf5  process

2. edit gui/crawler.config

Edit the file cheetah/gui/crawler.config

xtcdir should point to the location of your XTC files

hdf5dir should point to where you want the Cheetah output to go.  By default let this be the cheetah/hdf5 directory expanded by the template (but it can be elsewhere).

The rest can be left alone for now.

3. edit process/process

Edit the file cheetah/process/process

This script is a front-end to making Cheetah run, enabling data to be processed from the command line by simply typing the one-line command

    > ./process <Run#> <cheetah.ini> <tag>

This is the command executed by the ‘Run Cheetah’ button on the front of the GUI.

It should only be necessary to edit the experiment name. The rest should should not need modification, but should be self-explanatory if changes need to be made (for example configuration files in ${expt}/res instead of ${expt}/scratch).

The last three lines are various options for calling the hitfinder script using either (i) the SLAC batch queue, (ii) the SLAC batch queue with a separate job for each XTC stream, or (iii) output to the terminal.  Probably no need to change these (ii adds some speed at the expense of complexity, while option iii is useful for debugging if things go really wrong)

Actual details of the job submission process are hidden in the script hitfinder.  Probably no need to to touch the hitfinder script at all unless there are problems with how jobs are submitted to the batch queue (search for lines containing ‘bsub’).