Code from the EuXFEL experiment, March 2025
Scripts are in src/scripts
Functions are in a package in src/functions
We assume that you have miniconda or conda installed
One time setup:
- clone the repository or download and unzip the code.
- move to the top level folder of the repository. It will be called
euxfel-mar25and contain thepyproject.tomlfile - create a python 3.11 conda environment that you will work in, e.g.,
conda create -n euxfel-mar25 python=3.11 - activate the environment
conda activate euxfel-mar25 - install all the dependencies
conda install --file requirements/conda.txtpip install - install diffpy.morph
pip install -r requirements/pip.txt - if you will be uploading any code edits and making PRs to the repository install and do some more things
conda install pre-committhen typepre-commit install - copy any ipynbs you might want to run to folder where you want to work
- Download the folder with the data from the EuXFEL cluster and copy it to a folder named 'input_data'. This folder must reside in the same folder as the ipynb.
To run the code:
- log in to your computer and start a terminal
- activate the conda environment
conda activate euxfel-mar25 - move to the directory with the ipynb in it that you want to work on
- start jupyter
jupyter lab - open the ipynb
- edit any user-settable parameters in the second cell, such as the run number you want to work on, the q-range you want to use for the normalization and the q-range you want to compute the figure of merit over.
- run the notebook. The safest way to do it is using the double-chevron that restarts the kernel and runs all the cels
- Good luck!