Setup
cctbx.xfel is installed at SLAC for general use. Before it can be used, the following setup commands need to be run to configure the environment.
One-time setup
These steps need only be performed once before using cctbx.xfel.
LCLS quick start
A test release, which refers to a particular release of the LCLS packages, is represented by a directory in the file system, often called analysis-rel
or myrelease
. An analysis package within the test release in turn refers to the files implementing the analysis modules of the package. Details about installing of a test release and analysis packages are covered in Analysis Workbook. Quick Tour. Assuming the LCLS software is installed at /reg/d/psdm
, the LCLS environment is prepared in a bash(1) shell using
$ . /reg/g/psdm/etc/ana_env.sh
or
% source /reg/g/psdm/etc/ana_env.csh
for a csh(1). These settings may be made persistent by adding
test -r /reg/g/psdm/etc/ana_env.sh && . /reg/g/psdm/etc/ana_env.sh
to ~/.bashrc
, or
test -r /reg/g/psdm/etc/ana_env.csh && . /reg/g/psdm/etc/ana_env.csh
to ~/.cshrc
as appropriate. A test released based on the most current LCLS software is then set up using
$ newrel ana-current myrelease $ cd myrelease $ newpkg my_ana_pkg
Linking the cctbx.xfel analysis modules to the analysis package is described in Linking cctbx.xfel to pyana.
cctbx.xfel setup
To start using an installation of cctbx.xfel, the environment has to be configured. The details depend on the user's shell.
-
For a bash(1) shell,
setpaths.sh
should be sourced from the shell configuration files. To do that, addtest -r "/reg/d/ffb/cxi/temp/cctbx/cctbx_xfel/build/setpaths.sh" && \ . "/reg/d/ffb/cxi/temp/cctbx/cctbx_xfel/build/setpaths.sh"
to
~/.bashrc
. This ensures the environment is properly prepared for non-interactive shells, e.g. the shells that are used to run jobs on the cluster. To also be able to use cctbx.xfel from interactive shells, e.g. the shell started after logging in to a host, it is recommended to puttest -r "${HOME}/.bashrc" && . "${HOME}/.bashrc"
near the top of
~/.bash_profile
. These changes will not take effect until a new shell is started. To start using the cctbx.xfel environment from the running shell, sourcesetpaths.sh
on the command line,. /reg/g/cctbx/build/setpaths.sh
-
csh(1)-users should instead source
setpaths.csh
. Addtest -r "/reg/g/cctbx/build/setpaths.csh" && \ source "/reg/g/cctbx/build/setpaths.csh"
to
~/.cshrc
. There is no need to edit any additional files for interactive shells. To set up the environment for the running shell, executesource /reg/d/ffb/cxi/temp/cctbx/cctbx_xfel/build/setpaths.csh
on the command line.
Linking cctbx.xfel to pyana
Run these commands to associate pyana and cctbx.xfel:
$ cd ~/myrelease $ sit_setup $ cd ~/myrelease/my_ana_pkg $ ln -s /reg/g/cctbx/sources/cctbx_project/xfel/cxi/cspad_ana src $ cd .. $ ln -s /reg/g/cctbx/sources/cctbx_project/xfel/cxi/lsf.sh . $ scons
The last step compiles the analysis modules just linked in.
Run each time on logging on to SLAC
Whenever you log on to a fresh shell at SLAC, before you can use any portion of cctbx.xfel that uses pyana, you must run these commands:
$ cd ~/myrelease $ sit_setup
Test the installation
At SLAC, test that it is working by e.g.
$ cd ~/myrelease $ cxi.pyana -c /reg/d/ffb/cxi/temp/cctbx/tutorials/setup/test.cfg /reg/d/ffb/cxi/temp/xtc/e236-r0004-s00-c00.xtc
This should start a viewer, displaying dark-subtracted averages from an XTC stream. Do not forget to press the Run button! FIXME NKS--more detailed description of what this command actually does; also, the Run/Pause button