Skip to main content

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

Metadata

Release files for pyGDM2 1.1.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyGDM2 1.1.12
File Size Uploaded Provenance
pygdm2-1.1.12.tar.gz 198.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pyGDM2 1.1.12
File Interpreter ABI Platform
pygdm2-1.1.12-py3-none-any.whl Python 3 none any Details

Total release size: 420.1 kB

Release files / pygdm2-1.1.12.tar.gz

Download URL pygdm2-1.1.12.tar.gz
Size 198.8 kB
Tags Source
SHA-256 checksum
How to use checksums
94ca0be3af60d207c620e0a78e89e7e771b1198ab638dd405449d2defc02fbd5
BLAKE2b-256 checksum
How to use checksums
af2bd5e0494f31f3c82c813e7b8b82ec847d72aa5fe1d6b75d46561edaf54fb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / pygdm2-1.1.12-py3-none-any.whl

Download URL pygdm2-1.1.12-py3-none-any.whl
Size 221.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
159ba850d12edf00b55024536046207445de0fb6b40cc6d63bcfe1b5745c4427
BLAKE2b-256 checksum
How to use checksums
10a0a5bd94273a3ed2b43c06ff9acedfd2f7888a13c796479376c3721dfd9171
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Security for pyGDM2 1.1.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.12 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page