Skip to content

scikit-beam/xpcs-baseline

 
 

Repository files navigation

xpcs-baseline

MD Generated samples to test XPCS algorithms

Results can be downloaded from the releases page or reproduced as documented below.

Preview images from proposed changes are uploaded to this gist.

Installation and Usage

Installation

git clone --recursive https://github.com/scikit-beam/xpcs-baseline
cd xpcs-baseline
pip install .

You will also need LAMMPS. On Ubuntu/Debian:

apt install lammps

On OSX:

brew install lammps

Usage

Run MD simulation. This prodcues data files (ASCII text) in data/

lammps -in lammps/in.melt

Calculate scattering

python script/calc_scattering.py

This produces an HDF5 file, xpcs00512.h5. You may use this script to generate a PNG file with the first frame

python script/export_first_frame.py xpcs00512.h5 xpcs00512-frame0.png

or use any HDF5 application or library to view the output file directly. For example, using matplotlib:

import h5py
file = h5py.File('xpcs00512.h5', 'r')
frame0 = file['xpcs']['imgs'][0, :, :]
import matplotlib.pyplot as plt
plt.imshow(frame0)

Developer Notes

This project's structure was based on the pybind11 CMake example.

About

MD Generated samples to test XPCS algorithms

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 51.5%
  • C++ 25.1%
  • Cuda 16.0%
  • Shell 6.1%
  • CMake 1.3%