2. Installation

2.1. Stable release

To install Python diffraction and interference, run this command in your terminal:

# Linux:
$ pip3 install diffractio

# Windows:
$ pip install diffractio

This is the preferred method to install Python diffraction and interference, as it will always install the most recent stable release.

If you don’t have pip installed, this Python installation guide can guide you through the process.

2.2. Additional packages

Diffractio uses also the following non-standard modules:

  • py-pol

In some schemes, the following modules are also required:

  • screeninfo
  • PIL
  • mayavi, traits, tvtk
  • python-opencv

They should previously be installed before Diffractio module.

2.3. From sources

The sources for Python diffraction and interference can be downloaded from the Bitbucket repo.

You can either clone the public repository:

$ git clone git@bitbucket.org:optbrea/diffractio.git
$ git clone https://optbrea@bitbucket.org/optbrea/diffractio.git

Once you have a copy of the source, you can install it with:

# Linux:
$ python3 setup.py install

# Windows:
$ python setup.py install