Code Monkey home page Code Monkey logo

minifel's Introduction

ExaFEL proxy app repository

Description

The ExaFEL proxy app, MiniFEL, is a lightweight Python application that illustrates the process of real-time reconstructions from X-ray Free Electron Laser (XFEL) diffraction patterns at the Linac Coherent Light Source (LCLS), at SLAC. It performs a small subset of the tasks in the MTIP algorithm for reconstructing a 3D electron density from 2D diffraction patterns of randomly oriented single particles.

The app reads in thousands of simulated diffraction images of a single particle with Legion-based Psana2 framework in xtc2 format. It then merges these 2D diffraction images into a 3D diffraction volume. The unknown phase information is recovered by an algorithm called Hybrid-Input-Output (HIO), Error Reduction(ER), or a combination of both, leading to the reconstruction of the 3D electron density of the particle.

The core of these algorithms involve many iterations of a simple loop, which combines FFT, IFFT, and simple arithmetic operations on 3D complex data, all available in numpy. A GPU implementation of the loop is also possible by using cupy as an almost drop-in replacement for numpy, based on CUDA.

MiniFEL leverages the parallel programming abilities of Legion, a parallel programming system with a focus on data, portability, and high performance on heterogeneous architectures.

Although currently working on simulated data, the app aims at loading diffraction data as it arrives from the beam line and process it in real time. Moving forward, we will gradually increase its complexity in order to be able to provide LCLS-II users with rapid feedback to let them take the best out of their limited time on the beamline.

Build and run instructions

git submodule update --init
./setup/build_from_scratch.sh
./scripts/clean_build.sh
./scripts/run_cpu.sh

minifel's People

Contributors

elliottslaughter avatar antoinedujardin avatar

Stargazers

BKN avatar Patrick Adams avatar

Watchers

 avatar James Cloos 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.