Skip to content

harnessa/diffraq

Repository files navigation

diffraq


Diffraction with Areal Quadrature, or diffraq, is a fast nonuniform Fourier method to calculate Fresnel diffraction via areal quadrature. The core algorithms are a translation of the code fresnaq (https://github.com/ahbarnett/fresnaq) into Python, and we shamelessly take many algorithms from there. In addition to the original fresnaq algorithms, diffraq adds various kinds of perturbations and vector diffraction effects.

Getting started

To clone a copy and install:

git clone https://github.com/harnessa/diffraq
cd diffraq
python setup.py install

You'll need to set an environment variable which points to the diffraq install directory, e.g. (in bash):

export DIFFRAQ=${HOME}/repos/diffraq

Dependencies

You will need:

  • numpy <http://www.numpy.org/>
  • scipy <https://www.scipy.org>
  • finufft <https://github.com/flatironinstitute/finufft>
  • h5py <http://www.h5py.org>

And optionally:

  • matplotlib <https://pypi.org/project/matplotlib/>
  • pytest <https://pypi.org/project/pytest/>

Testing

If pytest is installed, testing can be done through:

sh $DIFFRAQ/tests/run_all_tests.sh

Documentation

No public documentation yet :(

Contributors

  • Primary author: Anthony Harness (Princeton University)
  • Author of original fresnaq code: Alex Barnett (Flatiron Institute)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published