Skip to main content

A python full-field electrodynamical solver, based on the Green dyadic method (volume integral technique in frequency domain).

Project description

pyGDM is an open source python toolkit for electro-dynamical simulations, implementing the Green dyadic method (GDM), a volume discretization technique. pyGDM is based on simulation codes and theoretical models developed over the past 20 years by Christian Girard at CEMES (see e.g. Ch. Girard 2005 Rep. Prog. Phys. 68 1883), with contributions from G. Colas des Francs, A. Arbouet, R. Marty, C. Majorel, A. Patoux, Y. Brûlé and P.R. Wiecha. In contrast to most other coupled-dipole codes, pyGDM uses a generalized propagator, which allows to cost-efficiently treat large monochromatic problems such as angle-of-incidence scans or raster-scan simulations.

pyGDM2 is available on pypi and gitlab.

Detailed documentation with many examples can be found at the pyGDM2 documentation website. See also the documentation paper on arXiv (1802.04071) or a more theoretical review about the GDM method.

Requirements

Python

  • python (3.5+, python)

  • numba (to drastically accelerate computations we use numba)

  • numpy (numpy)

  • scipy >= v0.17.0, lower versions supported with restrictions (scipy)

Optional Python packages

  • pytables (v3.x recommended. For hdf5 saving/loading of simulations. pytables)

  • matplotlib (Strongly recommended. For all 2D visualization tools. matplotlib)

  • mayavi (for all 3D visualization. mayavi)

  • mpi4py (for MPI parallelized calculation of spectra. mpi4py)

  • PIL (image processing. PIL)

  • PaGMO / PyGMO (version 2.4+. Required for the EO submodule. pagmo)

  • cupy (version 7+, for GPU-based matrix inversion) cupy)

(all available via pip)

Installation under linux

Via pip

Install from pypi repository via

$ pip install pygdm2

Via source code

From source, install pyGDM via the setup-script. DO NOT use the setup.py directly for installation, this may install pyGDM as “egg” which leads to problems with numba caching. Please use pip instead. Run the following command in the source directory:

$ pip3 install . --user

For a system wide installation, run as superuser without the –user argument. To install to a user-defined location, use the target option:

$ pip3 install . --target=/some/specific/location

To only compile without installation, you can use the setup.py script

$ python3 setup.py build sdist

Installation under windows

For windows, we also recommend Anaconda in which pyGDM can be installed easily via pip. From pyGDM2 V1.1 on, installation from source should work straightforward in any other python distribution as well (described above).

Via pip

We provide a 64bit windows binary on the pypi repository (tested on Win7 and Win10). Install via

$ pip install pygdm2

Installation under Mac OS X

Tested with the pypi version, installation via pip, with the Anaconda distribution. From pyGDM2 V1.1 on, installation from source should work straightforward in any other python distribution as well (described above).

$ pip install pygdm2

Authors

Python implementation

  • P. R. Wiecha

  • contributions by A. Arbouet, C. Majorel, Y. Brûlé, A. Patoux

Original fortran code by

  • Ch. Girard

  • G. Colas des Francs

  • A. Arbouet

  • R. Marty

  • P. R. Wiecha

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

pygdm2-1.1.8.tar.gz (357.7 kB view details)

Uploaded Source

File details

Details for the file pygdm2-1.1.8.tar.gz.

File metadata

  • Download URL: pygdm2-1.1.8.tar.gz
  • Upload date:
  • Size: 357.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for pygdm2-1.1.8.tar.gz
Algorithm Hash digest
SHA256 848f62fd4e7c3b1bdb00dce6ebaaf8eba8457d11163dde22daebe70925f44620
MD5 fa067ddffd1940b34246a20c0d315c4e
BLAKE2b-256 0909d05d47993ce3e57947d7b1940bcd25c16796e5fb219e44897431328495ae

See more details on using hashes here.

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