Cheetah at home
Cheetah at home
Cheetah is divided into two separate parts:
1)A graphical user interface for interacting with data, starting analysis jobs, monitoring status and viewing output. This part can be installed and run very easily at home to look at data that has been copied back to your institution.
and
2)A data processing program which runs separately, ideally on a batch farm, for performing the data processing. Installing the data processing part is more complicated and is not much use without the raw facility data (ie: XTC files).
Our suggestion: Install the GUI at home and use it to look at data processed at LCLS. Use a remote connection to SLAC to process your data there then copy it home for analysis and use with the GUI locally. Globus Online is an excellent tool for high-volume data transfer (the LCLS endpoint is slac#lcls).
At CFEL this is directly available here:
> source /gpfs/cfel/cxi/common/public/development/cheetah/setup.sh (or setup.csh if using csh/tcsh)
> cheetah-gui
Installing the GUI at home
The Cheetah GUI is written in Python and uses a standard Anaconda python 3.x installation with PyQt5 and pyqtgraph.
1) Install Anaconda / Python 3.x version
https://www.continuum.io/downloads
Make sure the following modules are installed:
-PyQt5
-pyqtgraph (not standard)
2) Download Cheetah from the repository:
https://github.com/antonbarty/cheetah
The GUI only needs the cheetah/python and cheetah/bin directories, the rest comes for ‘free’ and can be ignored
Ideally do a clone as this is the easiest way to stay up to date:
> git clone git://github.com/antonbarty/cheetah.git
Master branch is the most stable version, but more out of date.
Testing is where the latest improvements (and bugs) can be found.
3) Add the cheetah/bin directory to your path.
4) Modify the cheetah-gui and cxiview scripts in directory cheetah/bin.
This directory contains some lightweight shell scripts which call the actual cheetah-gui.py and cxiview.py programs.
Having a light startup script avoids python3 installations conflicting with other things in your path. For example: we have had bad experiences with python version clashes whenever sit-setup is included in someone’s profile, which is frequently the case at LCLS
These scripts enable cheetah-gui and cxiview to be called from the command line, and in practice do no more than set some paths pointing to the Anaconda/python3 installation.
The LCLS versions look like this:
#!/bin/bash
CDIR=/reg/g/cfel/cheetah/cheetah-stable
ADIR=/reg/g/cfel/anaconda
echo Using ${CDIR}
export PYTHONPATH=""
export PATH=${CDIR}/bin:${ADIR}/bin:${CDIR}/python:$PATH
/reg/g/cfel/cheetah/cheetah-latest/python/cheetah-gui.py
Create a copy and change it as needed to work on your home system.
It should now be possible to run cheetah-gui at home. You can select experiments, use the GUI to browse data, etc. just like at SLAC but on local data. So it’s time to:
5) Copy home all data in the cheetah folder
The GUI relies on all files being in a predictable location relative to the cheetah/gui directory. It does not really matter where that is located. So go ahead, copy the whole cheetah directory, and the GUI should be able to navigate the data.
Running remotely at LCLS
Running Cheetah at SLAC is as simple as logging in to pslogin.slac.stanford.edu, changing to one of the psana machines, and ensuring X11 forwarding is enabled. However, this can be very slow.
A better idea is to use the NoMachine client provided by SLAC for remote data access.
https://confluence.slac.stanford.edu/display/PCDS/Remote+Visualization
It’s almost like being there. OK, not quite, but usually much better than X11 forwarding.
My suggestion:
Process your XTC files at SLAC using NoMachine, and copy the data home once you’re happy with it. This saves having to copy the (large!) XTC files home and fight installation of the psana framework on your own Linux system.