Skip to content
mrware91 edited this page May 7, 2019 · 14 revisions

Welcome to the XFELMay2019 wiki!

Analysis notes

These notes are here to enable quick reproduction of analysis at XFEL. Please document import aspects of the analysis tools here. Be brief, but clear.

More detailed documentation is here:

https://docs.google.com/document/d/1-t6IVIgW5v4c1h8NEXOttyI2ro-rJ3YPysrXIUM2zxo/edit

Logbook:

Commissioning log book:

in.xfel.eu/elog/SQS+Proposal+2430/

Community experiment log book: https://in.xfel.eu/elog/SQS+Proposal+2176/

in.xfel.eu/elog/SQS+Proposal+2430/

Moving runs to maxwell server:

https://in.xfel.eu/metadata/proposals

Offline:

SSH Access:

The offline analysis is done on the DESY Maxwell servers. The Maxwell servers cannot be accessed from the terminals in the control room. They may be accessed from your laptop.

Instructions for logging in and setting up enviroment:

ssh -Y [email protected]
ssh -Y max-exfl  
module load anaconda3/5.2

Cloning data analysis git repository:

For comissioning:

git clone /gpfs/exfel/exp/SQS/201921/p002430/usr/Software/kuschelware.git

For community experiment:

git clone /gpfs/exfel/exp/SQS/201802/p002176/usr/Software/kuschelware.git

This is a local repo that we’ll push to the online git repo at the end of the experiment.

Setting up analysis:

navigate to the git directory, and run

chmod +x INSTALL.sh
./INSTALL.sh

Jupyterhub access:

http://max-jhub.desy.de/

Best practices for git repo:

As you add materials / analysis code, update the README.md with documentation for your script. Also add inline documentation for what your code is doing.

Once you are done with updates, execute the following commands:

git add NEWFILE
git commit -a -m “Message documenting changes”
git push

Once these changes are done. Your code will be available to everyone using the git repo.

To grab newest analysis, type git pull

We are having issues with permission. In case of permissions issues, execute chmod g+rws -R /.../GITDIRECTORY

Online:

Access:

The online analysis is done from the terminals in the hutch.

Instructions for logging in:

Open terminal ssh USERNAME@exflonc##

Replace ## with: 36 for hutch, 30-35 when hutch has beam.

Upon logging in

Pulling GIT repo and installing the analysis files

Follow directions identical to the offline installation.

Setting up data steam to fake online stream:

module load anaconda3/5.2
karabo-bridge-serve-files PATH PORT

PATH points to H5 file or run directory of H5s PORT some computer port greater than 1000

Useful scripts for online analysis

Located in kuschelware/scripts.

xfelmay2019-bgcalc.py

Calculates the background on the TOF.

Run as ./xfelmay2019-bgcalc.py STREAM tof

where STREAM='live' or 'tcp://127.0.0.1:PORT' and PORT is the PORT from the karabo-bridge.

xfelmay2019-imagepreview.py

Display brightest image of the last 50, the background subtracted image, and the intensity integrated image over real time.

Run as ./xfelmay2019-imagepreview.py STREAM

where STREAM='live' or 'tcp://127.0.0.1:PORT' and PORT is the PORT from the karabo-bridge.

xfelmay2019-toflive.py

Display live and averaged tof trace, as well as the ROI integrated TOF trace over real time.

Run as ./xfelmay2019-toflive.py STREAM

where STREAM='live' or 'tcp://127.0.0.1:PORT' and PORT is the PORT from the karabo-bridge.

xfelmay2019-offlineDAQalive.sh

Displays a green (okay) or red (bad) image if a run contains the correct datastreams.

Run like ./xfelmay2019-offlineDAQalive.sh PATH_TO_EXPERIMENT START_RUN

Possible problems and solutions

Missing keyword arg

In the event the above scripts crash with a missing keyword argument exception, then it is likely that the name of a detector changed in the DAQ.

Output of xfelmay2019-offlineDAQalive will turn red in this event.

To diagnose, run karabo-bridge-glimpse tcp://10.253.0.142:6666 to look for the new detector name. Then the libraries in kuschelware/xfelmay2019 need to be updated with the new path / key combinations to specify detectors.

Phillipe stuff (Needs better documentation):

Copy his stuff

Module load exfel exfel_anaconda3
./setup.py
./start.py

In theory, this can run online analysis for us, but we were unable to start the software using our unix accounts. Hopefully, a happy marriage between our code and his can happen when he returns next week.

karabo-gui (Needs better documentation):

Useful thing for controls??? Shows pressures, experiment, change voltages, yada, yada

Locations of experiment files (both online and offline)

Commissioning experiment: /gpfs/exfel/exp/SQS/201921/p002430

Methane cluster experiment: /gpfs/exfel/exp/SQS/201802/p002176

Subdirectories:

/raw : contains H5 files

/proc : ?????

/scratch : scratch directory for intermittent files during processing

/usr : longer term storage for analysis files

Sample data

Look in /gpfs/exfel/exp/SQS/201802/p002176/scratch

Run 217 argon TOF calibration data

Runs 266-268 scan the chamber height.

Run 393 is a long scan with TOF and MCP at static conditions.

Run 445 has TOF and MCP.

Useful references:

Karabo (python) https://karabo-data.readthedocs.io/en/latest/index.html https://in.xfel.eu/readthedocs/docs/karabofai/en/latest/index.html# https://in.xfel.eu/readthedocs/docs/karabo/en/latest/index.html https://in.xfel.eu/readthedocs/docs/data-analysis-user-documentation/en/latest/karabo_bridge/py-client.html https://karabo-data.readthedocs.io/en/latest/Demo.html

Cheetah http://www.desy.de/~barty/cheetah/Cheetah/EuXFEL_data_analysis.html