Skip to main content

Solve Maxwell's equations for a cluster of particles using the generalized multiparticle Mie theory (GMMT)

Project description

MiePy

MiePy is a Python module for the generalized multiparticle Mie theory (GMMT), also known as the aggregate T-matrix method. MiePy solves the electrodynamics of a collection of spherical or non-spherical scatterers with an arbitrary incident source.

Features

  • Non-spherical particles using the T-matrix formulation via the null-field method with discrete sources (NFM-DS). Includes cylinders, spheroids, ellipsoids, cubes and polygonal prisms
  • Arbitrary incident sources (plane waves, Gaussian beams, HG and LG beams, point dipoles)
  • Evaluation of cluster cross-sections and optical force and torque on individual particles
  • Periodic boundary conditions with various lattice types (square, hexagonal, etc.) and mirror and discrete rotational symmetries for faster calculations
  • Optional planar interface (substrate)
  • 3D scene visualization using the the VPython library
  • Image clusters using a simulated microscope
  • OpenMP parallelization for systems with larger numbers of particles

Usage

For examples and use cases, see examples folder.

For an overview of the theory, see docs folder.

Installation

If NumPy is not already installed, it must be installed prior to MiePy's installation

pip install numpy

Then install MiePy

pip install miepy

MiePy is also available via Conda

conda install -c japarker miepy

Install from source

To build MiePy from source, first install the required dependencies:

Then, install MiePy using pip

pip install miepy --no-binary

To build the latest development version, clone MiePy and its submodules:

git clone https://github.com/johnaparker/miepy.git miepy --recurse-submodules && cd miepy

and install MiePy using pip

pip install .

Optionally, run the tests to verify correctness:

pytest tests

License

MiePy is licensed under the terms of the GPLv3 license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

miepy-0.4.3.tar.gz (6.0 MB view hashes)

Uploaded Source

Built Distributions

miepy-0.4.3-cp38-cp38-win_amd64.whl (7.9 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

miepy-0.4.3-cp38-cp38-manylinux2010_x86_64.whl (11.9 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

miepy-0.4.3-cp37-cp37m-win_amd64.whl (7.9 MB view hashes)

Uploaded CPython 3.7m Windows x86-64

miepy-0.4.3-cp37-cp37m-manylinux2010_x86_64.whl (11.9 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

miepy-0.4.3-cp36-cp36m-win_amd64.whl (7.9 MB view hashes)

Uploaded CPython 3.6m Windows x86-64

miepy-0.4.3-cp36-cp36m-manylinux2010_x86_64.whl (11.9 MB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page