Setup: Difference between revisions

From cctbx_xfel
Jump to navigation Jump to search
m (→‎bash(1): Corrected paths with new build)
No edit summary
Line 29: Line 29:
csh(1)-users should instead source <code>setpaths.csh</code>,
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_xfel/build/setpaths.csh


and add the lines below to <code>~/.cshrc</code>
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_xfel/build/setpaths.csh" && \
   source "/reg/d/ffb/cxi/temp/cctbx/cctbx-build/setpaths.csh"
   source "/reg/d/ffb/cxi/temp/cctbx/cctbx_xfel/build/setpaths.csh"


For csh(1) there is no need to edit any additional files for interactive shells.
For csh(1) there is no need to edit any additional files for interactive shells.
Line 42: Line 42:
Run these commands to associate ''pyana'' and ''cctbx.xfel'':
Run these commands to associate ''pyana'' and ''cctbx.xfel'':
  $ cd ~/myrelease/my_ana_pkg
  $ cd ~/myrelease/my_ana_pkg
  $ ln -s /reg/d/ffb/cxi/temp/cctbx/cctbx_project/xfel/cxi/cspad_ana src
  $ ln -s /reg/d/ffb/cxi/temp/cctbx/cctbx_xfel/sources/cctbx_project/xfel/cxi/cspad_ana src
  $ cd ..
  $ cd ..
  $ scons
  $ scons

Revision as of 16:50, 27 September 2013

LCLS provides several frameworks for data analysis, and also provides methods for translating collected data to HDF5, a general and portable container format for storage of large amounts of numerical data. cctbx.xfel extends the LCLS analysis packages with a set of analysis modules. In particular, the cctbx.xfel analysis modules are run through pyana, the Python-implementation of LCLS's analysis framework. Since analysis proceeds directly from the raw data, no intermediate conversion is necessary, and it can be done while an experiment is running.

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 release setup

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_xfel/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_xfel/build/setpaths.sh" && \
 . "/reg/d/ffb/cxi/temp/cctbx/cctbx_xfel/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_xfel/build/setpaths.csh

and add the lines below to ~/.cshrc

test -r "/reg/d/ffb/cxi/temp/cctbx/cctbx_xfel/build/setpaths.csh" && \
 source "/reg/d/ffb/cxi/temp/cctbx/cctbx_xfel/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_xfel/sources/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.