Setup: Difference between revisions
(Link to separate page for PSDM setup.) |
(Reorganized for consistency with PSDM setup) |
||
Line 1: | Line 1: | ||
''cctbx.xfel'' | <!-- XXX Should probably rename this page to "Set up ''cctbx.xfel''" or some such --> | ||
== Prerequisities == | |||
''cctbx.xfel'' must be installed, which in turn requires the PSDM software distribution to be set up. See [[Set up PSDM software]] for the latter and [[Installation]] for the former. ''cctbx.xfel'' can be installed anywhere on the filesystem where write access is granted. | |||
The installation root directory affects the absolute paths used in these instructions and differs from site to site. Some common installation root directories are listed below. | |||
{| class="wikitable sortable" | |||
|- | |||
! Site | |||
!class="unsortable"| Installation root directory | |||
!class="unsortable"| Notes | |||
|- | |||
| BNL | |||
| <code>/usr/local/crys_test/cctbx</code> | |||
| | |||
|- | |||
| CCI, LBNL | |||
| | |||
| No central installation available | |||
|- | |||
| SLAC | |||
| <code>/reg/g/cctbx/sources</code> | |||
| | |||
|} | |||
Developers will generally have ''cctbx.xfel'' installed in their home directory. | |||
== ''cctbx.xfel'' setup == | |||
To start using ''cctbx.xfel'', the environment has to be configured. The details depend on the ''cctbx.xfel'' installation root directory and the user's shell. | |||
In what follows it is assumed that ''cctbx.xfel'' is installed at <code>/reg/g/cctbx/build</code>. Substitute <code>/reg/g/cctbx/build</code> with the appropriate path in the instructions below. These steps need only be performed once. | |||
< | |||
In a bash shell, the environment is prepared for ''cctbx.xfel'' using | |||
$ . /reg/g/cctbx/build/setpaths.sh | |||
For csh, the corresponding command is | |||
% source /reg/g/cctbx/build/setpaths.csh | |||
Sourcing <code>setpaths.sh</code> or <code>ana_env.csh</code> only modifies the environment of the current shell, and would have to be repeated every time a new shell is started. To make the changes persistent, add | |||
test -r "/reg/g/cctbx/build/setpaths.sh" && \ | |||
. "/reg/g/cctbx/build/setpaths.sh" | |||
to <code>~/.bashrc</code>, or | |||
test -r "/reg/g/cctbx/build/setpaths.csh" && \ | |||
source "/reg/g/cctbx/build/setpaths.csh" | |||
to <code>~/.cshrc as appropriate</code>. | |||
== Linking ''cctbx.xfel'' to ''pyana'' == | |||
Run these commands to associate ''pyana'' and ''cctbx.xfel'': | Run these commands to associate ''pyana'' and ''cctbx.xfel'': | ||
Line 39: | Line 52: | ||
$ sit_setup | $ sit_setup | ||
$ cd ~/myrelease/my_ana_pkg | $ cd ~/myrelease/my_ana_pkg | ||
$ ln - | $ ln -fns /reg/g/cctbx/sources/cctbx_project/xfel/cxi/cspad_ana src | ||
$ cd .. | $ cd .. | ||
$ ln -s /reg/g/cctbx/sources/cctbx_project/xfel/cxi/lsf.sh . | $ ln -s /reg/g/cctbx/sources/cctbx_project/xfel/cxi/lsf.sh . | ||
Line 45: | Line 58: | ||
The last step compiles the analysis modules just linked in. | The last step compiles the analysis modules just linked in. | ||
<!-- XXX Should check this with Andy or so; this can probably be done better. Perhaps note that using -fns will zap any old src link in place. --> | |||
== Setup your scratch area == | |||
<!-- XXX This should probably be moved out of the general installation instructions --> | |||
Create a scratch folder and populate it with some directories that will be used during this tutorial, changing <username> to your SLAC account name: | Create a scratch folder and populate it with some directories that will be used during this tutorial, changing <username> to your SLAC account name: | ||
Line 55: | Line 72: | ||
$ mkdir averages | $ mkdir averages | ||
$ mkdir results | $ mkdir results | ||
== Run each time on logging on to SLAC == | == 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: | 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 | $ cd ~/myrelease | ||
$ sit_setup | $ sit_setup | ||
== Test the installation == | == Test the installation == | ||
At SLAC, test that it is working by e.g. | At SLAC, test that it is working by <i>e.g.</i> | ||
$ cd ~/myrelease | $ cd ~/myrelease | ||
$ cxi.pyana -c /reg/g/cctbx/tutorials/setup/test.cfg /reg/d/ana11/cxi/data/Mar2013calib/xtc/e236-r0004-s00-c00.xtc | $ 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. | 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. | More specifically, this command starts ''pyana'' with a configuration file (<code>-c</code>) and an XTC file. For more information, see the [[Overview]] and other tutorial pages. |
Revision as of 18:42, 5 February 2014
Prerequisities
cctbx.xfel must be installed, which in turn requires the PSDM software distribution to be set up. See Set up PSDM software for the latter and Installation for the former. cctbx.xfel can be installed anywhere on the filesystem where write access is granted.
The installation root directory affects the absolute paths used in these instructions and differs from site to site. Some common installation root directories are listed below.
Site | Installation root directory | Notes |
---|---|---|
BNL | /usr/local/crys_test/cctbx
|
|
CCI, LBNL | No central installation available | |
SLAC | /reg/g/cctbx/sources
|
Developers will generally have cctbx.xfel installed in their home directory.
cctbx.xfel setup
To start using cctbx.xfel, the environment has to be configured. The details depend on the cctbx.xfel installation root directory and the user's shell.
In what follows it is assumed that cctbx.xfel is installed at /reg/g/cctbx/build
. Substitute /reg/g/cctbx/build
with the appropriate path in the instructions below. These steps need only be performed once.
In a bash shell, the environment is prepared for cctbx.xfel using
$ . /reg/g/cctbx/build/setpaths.sh
For csh, the corresponding command is
% source /reg/g/cctbx/build/setpaths.csh
Sourcing setpaths.sh
or ana_env.csh
only modifies the environment of the current shell, and would have to be repeated every time a new shell is started. To make the changes persistent, add
test -r "/reg/g/cctbx/build/setpaths.sh" && \ . "/reg/g/cctbx/build/setpaths.sh"
to ~/.bashrc
, or
test -r "/reg/g/cctbx/build/setpaths.csh" && \ source "/reg/g/cctbx/build/setpaths.csh"
to ~/.cshrc as appropriate
.
Linking cctbx.xfel to pyana
Run these commands to associate pyana and cctbx.xfel:
$ cd ~/myrelease $ sit_setup $ cd ~/myrelease/my_ana_pkg $ ln -fns /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.