Setup: Difference between revisions
m (Bug fix for csh) |
(Link to separate page for PSDM setup.) |
||
Line 7: | Line 7: | ||
=== LCLS quick start === | === LCLS quick start === | ||
See [[Set up PSDM software]]. Linking the ''cctbx.xfel'' analysis modules to the analysis package is described in [[#Linking cctbx.xfel to pyana|Linking cctbx.xfel to pyana]]. | |||
Linking the ''cctbx.xfel'' analysis modules to the analysis package is described in [[#Linking cctbx.xfel to pyana|Linking cctbx.xfel to pyana]]. | |||
=== ''cctbx.xfel'' setup === | === ''cctbx.xfel'' setup === |
Revision as of 23:11, 3 February 2014
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
See Set up PSDM software. 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/g/cctbx/build/setpaths.sh" && \ . "/reg/g/cctbx/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/g/cctbx/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.
Setup your scratch area
Create a scratch folder and populate it with some directories that will be used during this tutorial, changing <username> to your SLAC account name:
$ cd /reg/g/cctbx/tutorials/scratch/ $ mkdir <username> $ cd <username> $ mkdir darks $ mkdir averages $ mkdir results
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/g/cctbx/tutorials/setup/test.cfg /reg/d/ana11/cxi/data/Mar2013calib/xtc/e236-r0004-s00-c00.xtc
This should start a viewer, displaying dark-subtracted averages from an XTC stream. Press the green run button to see the images. This particular stream has a series of misses at its beginning; hits will appear presently.
More specifically, this command starts pyana with a configuration file (-c) and an XTC file. For more information, see the Overview and other tutorial pages.