lcls-users / btx

BeamTime with X-rays - miscellaneous functions for aiding analysis during LCLS experiments.
https://lcls-users.github.io/btx/
Other
1 stars 12 forks source link

ENH: add `ResoNet` task #372

Open fredericpoitevin opened 6 months ago

fredericpoitevin commented 6 months ago

Goal trigger Resonet from the eLog and report back a trace of the predicted shot-to-shot resolution and timestamps for highest resolution, and summary of results: histogram of resolutions, actual diffraction images (or a powder of it) of the highest resolution hits, also the lowest and intermediate.

fredericpoitevin commented 5 months ago
srun -p ampere -N 1 --gpus-per-node=1 --account=lcls --pty /bin/bash
source /sdf/group/lcls/ds/ana/sw/conda1/manage/bin/psconda.sh
conda create --prefix=/sdf/group/lcls/ds/tools/conda_envs/resonet_conda --clone ana-4.0.60-py3
conda deactivate
conda activate resonet_conda

cd /sdf/group/lcls/ds/tools/
git clone --recurse-submodules https://github.com/ssrl-px/resonet.git
cd resonet
python -m pip install build
python -m build
python -m pip install dist/resonet-0.1.tar.gz

resonet-mfx -h
mkdir models
cd models
wget https://smb.slac.stanford.edu/~resonet/reso_retrained.nn
mpirun -n 1 resonet-mfx --expt mfxl1032222 --run 20  --aduPerPhoton 0.7
...
Resolution is 32.14 Ang. for image 1001/8992 (sec=1711181653,nsec=392691554,fiducial=81369).
Resolution is 31.95 Ang. for image 1002/8992 (sec=1711181653,nsec=426039204,fiducial=81381).
Resolution is 32.04 Ang. for image 1003/8992 (sec=1711181653,nsec=459354914,fiducial=81393).
Resolution is 32.06 Ang. for image 1004/8992 (sec=1711181653,nsec=492739854,fiducial=81405).
Resolution is 31.97 Ang. for image 1005/8992 (sec=1711181653,nsec=526059551,fiducial=81417).
Resolution is 32.10 Ang. for image 1006/8992 (sec=1711181653,nsec=559436308,fiducial=81429).
fredericpoitevin commented 5 months ago
Screenshot 2024-05-22 at 2 56 04 PM