Coder Social home page Coder Social logo

fperakis / swissfel-bernina Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 2.0 609 KB

Data analysis repository for experiments at SwissFEL Inlcudes code to: - read data from .json files - do angular integration - calculate pump-probe signal

Shell 5.01% Python 94.99%

swissfel-bernina's Introduction

SwissFEL-BERNINA

Data analysis repository for Time-Resolved X-Ray Diffraction (TR-XRD) experiments at the Bernina instrument of SwissFEL, PSI.

Inlcudes code to:

  • read data from .json files
  • do angular integrations
  • calculate pump-probe signal

Installation on a SwissFEL machine

  1. First connect to psi server:
  1. Then connect to the ra-cluster:
$ ssh ra
  1. Make sure to activate bernina conda environment
$ source /sf/bernina/bin/anaconda_env

IMPORTANT NOTE: your ~/.bashrc should contain:

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

#Setup the environment for the PSI pmodules
#idocumentation : https://amas.psi.ch/Pmodules
if [ -f /etc/scripts/pmodules.sh ]; then
        . /etc/scripts/pmodules.sh
fi
  1. Then download the repo:
$ git clone https://github.com/fperakis/SwissFEL-Bernina.git

To run in parallel:

salloc -n 12 mpirun ./process.py -r 1 -s 18000

with the desired run number (-r integer).

Right now there are some issues:

  • you have to specify the number of shots with -s or it processes zero shots (bug, will be fixed)
  • we cannot submit batch jobs (not sure how to get MPI to play nice with SLURM)

To submit batch jobs using Slurm do:

$ cd scripts
$ ./submit_jobs.sh 0001_test # submits run0001_test.json with default parameters

For help how to run submit_jobs.sh, do: $ ./submit_jobs.sh

Useful Slurm commands:

$ sinfo # check idle nodes
$ squeue -u ext-user # check jobs submitted by user 'ext-user'
$ scancel 1438285 # kill job with id 1438285
$ sbatch job.sh # to submit job to the default partition, with allocation time of 1 hour
$ sbatch -p week job.sh # to submit to the partition with longer allocation time (2 days if not specified)
$ sbatch -p week -t 4-5:30:00 job.sh # to submit job with time limit of 4 days, 5 hours and 30 minutes (max. allowed time limit is 8 days)

See here for more info about computer cluster analysis at SwissFEL: https://www.psi.ch/photon-science-data-services/offline-computing-facility-for-sls-and-swissfel-data-analysis

and here for information related to SSH: https://www.psi.ch/computing/ssh

swissfel-bernina's People

Contributors

fperakis avatar

Watchers

Jonas Sellberg avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.