Setup: Difference between revisions
(Corrected link.) |
|||
Line 11: | Line 11: | ||
Installation of a "test release" and analysis packages is covered in [https://confluence.slac.stanford.edu/display/PCDS/Analysis+Workbook.+Quick+Tour Analysis Workbook. Quick Tour]. Linking the ''cctbx.xfel'' analysis modules to the analysis package is described in [[#Linking cctbx.xfel to pyana|Linking cctbx.xfel to pyana]]. | Installation of a "test release" and analysis packages is covered in [https://confluence.slac.stanford.edu/display/PCDS/Analysis+Workbook.+Quick+Tour Analysis Workbook. Quick Tour]. 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 === | ||
==== bash(1) ==== | |||
To set up the ''cctbx.xfel''-environment for a bash(1) shell, <code>setpaths.sh</code> has to be sourced, | |||
. /reg/d/ffb/cxi/temp/cctbx/cctbx_build/setpaths.sh | |||
To avoid having to perform this step on each login, the lines below should be added to <code>~/.bashrc</code> file | |||
test -r "/reg/d/ffb/cxi/temp/cctbx/cctbx_build/setpaths.sh" && \ | |||
. "/reg/d/ffb/cxi/temp/cctbx/cctbx_build/setpaths.sh" | |||
. / | This ensures the environment is properly prepared for non-interactive shells, which are used to launch jobs on the cluster. To prepare the environment for interactive bash(1) shells it is recommended to put the lines below near the top of <code>~/.bash_profile</code>: | ||
test -r "${HOME}/.bashrc" && . "${HOME}/.bashrc" | |||
csh(1) users should | ==== csh(1) ==== | ||
csh(1)-users should instead source <code>setpaths.csh</code>, | |||
source /reg/d/ffb/cxi/temp/cctbx/cctbx_build/setpaths.csh | source /reg/d/ffb/cxi/temp/cctbx/cctbx_build/setpaths.csh | ||
and add the lines below to <code>~/.cshrc</code> | |||
test -r "/reg/d/ffb/cxi/temp/cctbx/cctbx_build/setpaths.csh" && \ | test -r "/reg/d/ffb/cxi/temp/cctbx/cctbx_build/setpaths.csh" && \ | ||
source "/reg/d/ffb/cxi/temp/cctbx/cctbx-build/setpaths.csh" | source "/reg/d/ffb/cxi/temp/cctbx/cctbx-build/setpaths.csh" | ||
For csh(1) there is no need to edit any additional files for interactive shells. | |||
=== Linking ''cctbx.xfel'' to ''pyana'' === | === Linking ''cctbx.xfel'' to ''pyana'' === |
Revision as of 02:51, 27 September 2013
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.
Run once
These steps need only be performed once before using cctbx.xfel.
LCLS release setup
cctbx.xfel extends a release of the LCLS analysis packages with a set of analysis modules. 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 cctbx.xfel.
Installation of a "test release" and analysis packages is covered in Analysis Workbook. Quick Tour. Linking the cctbx.xfel analysis modules to the analysis package is described in Linking cctbx.xfel to pyana.
cctbx.xfel setup
bash(1)
To set up the cctbx.xfel-environment for a bash(1) shell, setpaths.sh
has to be sourced,
. /reg/d/ffb/cxi/temp/cctbx/cctbx_build/setpaths.sh
To avoid having to perform this step on each login, the lines below should be added to ~/.bashrc
file
test -r "/reg/d/ffb/cxi/temp/cctbx/cctbx_build/setpaths.sh" && \ . "/reg/d/ffb/cxi/temp/cctbx/cctbx_build/setpaths.sh"
This ensures the environment is properly prepared for non-interactive shells, which are used to launch jobs on the cluster. To prepare the environment for interactive bash(1) shells it is recommended to put the lines below near the top of ~/.bash_profile
:
test -r "${HOME}/.bashrc" && . "${HOME}/.bashrc"
csh(1)
csh(1)-users should instead source setpaths.csh
,
source /reg/d/ffb/cxi/temp/cctbx/cctbx_build/setpaths.csh
and add the lines below to ~/.cshrc
test -r "/reg/d/ffb/cxi/temp/cctbx/cctbx_build/setpaths.csh" && \ source "/reg/d/ffb/cxi/temp/cctbx/cctbx-build/setpaths.csh"
For csh(1) there is no need to edit any additional files for interactive shells.
Linking cctbx.xfel to pyana
Run these commands to associate pyana and cctbx.xfel:
$ cd ~/myrelease/my_ana_pkg $ ln -s /reg/d/ffb/cxi/temp/cctbx/cctbx_project/xfel/cxi/cspad_ana src $ cd .. $ 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/Feb2013calib/e290-r0069-s00-c00.xtc
This should start a viewer, displaying dark-subtracted averages from an XTC stream.