| Name | miepy JSON |
| Version |
1.0.2
JSON |
| download |
| home_page | None |
| Summary | Solve Maxwell's equations for a cluster of particles using the generalized multiparticle Mie theory (GMMT) |
| upload_time | 2025-10-14 04:44:12 |
| maintainer | None |
| docs_url | None |
| author | None |
| requires_python | >=3.11 |
| license | GPLv3 |
| keywords |
electrodynamics
mie
scattering
|
| VCS |
|
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
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.
<p align="center">
<img src="./docs/miepy_thumbnail.png" width="500" alt="Electric field visualization">
<br>
<em>Electric field around a 37 particle cluster</em>
</p>
<p align="center">
<img src="https://jparker.nyc3.digitaloceanspaces.com/gallery/em_three_np_contours.png" width="500" alt="Three particle system">
<br>
<em>3D electric field contours around three metal nanoparticles</em>
</p>
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 VPython library
+ Image clusters using a **simulated microscope**
+ **OpenMP parallelization** for systems with larger numbers of particles
Installation
--------------
```shell
pip install miepy
```
If using `uv`:
```
uv venv --python 3.13
uv pip install miepy
source .venv/bin/activate
```
Usage
--------------
See the [examples](src/miepy/examples) folder for how to use MiePy.
Run any of the available [examples](src/miepy/examples) without explicit installation using `uv`:
| Command | Description |
|---------|-------------|
| `uvx miepy dielectric_sphere` | Dielectric sphere scattering and cross-sections |
| `uvx miepy ag_sphere` | Silver sphere scattering and absorption |
| `uvx miepy ag_shell` | Core-shell particle scattering |
| `uvx miepy vary_index` | Scattering intensity vs wavelength and refractive index |
| `uvx miepy fields` | Electric and magnetic field visualization |
| `uvx miepy dimer_scattering` | Au dimer cross-sections |
| `uvx miepy dimer_force` | Force and torque on dimer particles |
| `uvx miepy far_field` | Far-field radiation patterns |
| `uvx miepy whispering_gallery` | Whispering gallery modes in dielectric sphere |
| `uvx miepy focused_gaussian` | Focused Gaussian beam with orbital angular momentum |
| `uvx miepy imaging` | Near-field, far-field, and microscope imaging |
For an overview of the theory, see [docs](./docs) folder.
Install from source
--------------
MiePy uses [vcpkg](https://vcpkg.io/) for C++ dependency management and uv for Python management, which simplifies building across platforms.
**Prerequisites:**
+ GCC and GFORTRAN
+ uv
**Build steps:**
1. Clone MiePy and its submodules:
```shell
git clone https://github.com/johnaparker/miepy.git miepy --recurse-submodules && cd miepy
```
2. Bootstrap vcpkg (first time only):
```shell
./vcpkg/bootstrap-vcpkg.sh
```
3. Install MiePy using uv:
```shell
uv sync
```
4. Optionally, run the tests to verify correctness:
```shell
uv run pytest tests
```
License
--------------
MiePy is licensed under the terms of the GPLv3 license.
Raw data
{
"_id": null,
"home_page": null,
"name": "miepy",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "electrodynamics, mie, scattering",
"author": null,
"author_email": "John Parker <johnaparker@users.noreply.github.com>",
"download_url": "https://files.pythonhosted.org/packages/b6/73/19d65a8b1d4f47a03ccdb0b68932d662855adadafd0da2292b8cc67c0567/miepy-1.0.2.tar.gz",
"platform": null,
"description": "MiePy\n==============\nMiePy is a Python module for the generalized multiparticle Mie theory (GMMT), also known as the aggregate T-matrix method.\nMiePy solves the electrodynamics of a collection of spherical or non-spherical scatterers with an arbitrary incident source.\n\n<p align=\"center\">\n <img src=\"./docs/miepy_thumbnail.png\" width=\"500\" alt=\"Electric field visualization\">\n <br>\n <em>Electric field around a 37 particle cluster</em>\n</p>\n\n<p align=\"center\">\n <img src=\"https://jparker.nyc3.digitaloceanspaces.com/gallery/em_three_np_contours.png\" width=\"500\" alt=\"Three particle system\">\n <br>\n <em>3D electric field contours around three metal nanoparticles</em>\n</p>\n\nFeatures\n--------------\n+ **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\n+ **Arbitrary incident sources** (plane waves, Gaussian beams, HG and LG beams, point dipoles)\n+ Evaluation of cluster **cross-sections** and **optical force and torque** on individual particles\n+ **Periodic boundary conditions** with various lattice types (square, hexagonal, etc.) and **mirror and discrete rotational symmetries** for faster calculations\n+ Optional **planar interface (substrate)** \n+ **3D scene visualization** using the VPython library\n+ Image clusters using a **simulated microscope**\n+ **OpenMP parallelization** for systems with larger numbers of particles\n\nInstallation\n--------------\n```shell\npip install miepy\n```\n\nIf using `uv`:\n```\nuv venv --python 3.13\nuv pip install miepy\nsource .venv/bin/activate\n```\n\nUsage\n--------------\n\nSee the [examples](src/miepy/examples) folder for how to use MiePy.\n\nRun any of the available [examples](src/miepy/examples) without explicit installation using `uv`:\n\n| Command | Description |\n|---------|-------------|\n| `uvx miepy dielectric_sphere` | Dielectric sphere scattering and cross-sections |\n| `uvx miepy ag_sphere` | Silver sphere scattering and absorption |\n| `uvx miepy ag_shell` | Core-shell particle scattering |\n| `uvx miepy vary_index` | Scattering intensity vs wavelength and refractive index |\n| `uvx miepy fields` | Electric and magnetic field visualization |\n| `uvx miepy dimer_scattering` | Au dimer cross-sections |\n| `uvx miepy dimer_force` | Force and torque on dimer particles |\n| `uvx miepy far_field` | Far-field radiation patterns |\n| `uvx miepy whispering_gallery` | Whispering gallery modes in dielectric sphere |\n| `uvx miepy focused_gaussian` | Focused Gaussian beam with orbital angular momentum |\n| `uvx miepy imaging` | Near-field, far-field, and microscope imaging |\n\nFor an overview of the theory, see [docs](./docs) folder.\n\nInstall from source\n--------------\nMiePy uses [vcpkg](https://vcpkg.io/) for C++ dependency management and uv for Python management, which simplifies building across platforms.\n\n**Prerequisites:**\n+ GCC and GFORTRAN\n+ uv\n\n**Build steps:**\n\n1. Clone MiePy and its submodules:\n```shell\ngit clone https://github.com/johnaparker/miepy.git miepy --recurse-submodules && cd miepy\n```\n\n2. Bootstrap vcpkg (first time only):\n```shell\n./vcpkg/bootstrap-vcpkg.sh\n```\n\n3. Install MiePy using uv:\n```shell\nuv sync\n```\n\n4. Optionally, run the tests to verify correctness:\n```shell\nuv run pytest tests\n```\n\nLicense\n--------------\nMiePy is licensed under the terms of the GPLv3 license.\n",
"bugtrack_url": null,
"license": "GPLv3",
"summary": "Solve Maxwell's equations for a cluster of particles using the generalized multiparticle Mie theory (GMMT)",
"version": "1.0.2",
"project_urls": null,
"split_keywords": [
"electrodynamics",
" mie",
" scattering"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "56165cbe287cf8790231b02f376eea9baa3a549c65f3d2bbf3b9715e6f3b0e6b",
"md5": "15ace71461bb4f34dfece05b7f259c3f",
"sha256": "fd9c6fe6b25cb799743db8df7028cfce7c693374067b64bd800510996e4e2f78"
},
"downloads": -1,
"filename": "miepy-1.0.2-cp311-cp311-macosx_15_0_arm64.whl",
"has_sig": false,
"md5_digest": "15ace71461bb4f34dfece05b7f259c3f",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.11",
"size": 7608784,
"upload_time": "2025-10-14T04:43:45",
"upload_time_iso_8601": "2025-10-14T04:43:45.978999Z",
"url": "https://files.pythonhosted.org/packages/56/16/5cbe287cf8790231b02f376eea9baa3a549c65f3d2bbf3b9715e6f3b0e6b/miepy-1.0.2-cp311-cp311-macosx_15_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "d5f0c515fd0a917a8c7db2c7fe90e7a5e2b533f4ddbaf36556db13a579239e20",
"md5": "7ca6bd0abad56f1faa98483cd7d79547",
"sha256": "87ba4955efa3dbe0f16ca13df8060d0dfc677a7d3f58ec9f2f86f63811fefaff"
},
"downloads": -1,
"filename": "miepy-1.0.2-cp311-cp311-macosx_15_0_x86_64.whl",
"has_sig": false,
"md5_digest": "7ca6bd0abad56f1faa98483cd7d79547",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.11",
"size": 7759139,
"upload_time": "2025-10-14T04:43:47",
"upload_time_iso_8601": "2025-10-14T04:43:47.993501Z",
"url": "https://files.pythonhosted.org/packages/d5/f0/c515fd0a917a8c7db2c7fe90e7a5e2b533f4ddbaf36556db13a579239e20/miepy-1.0.2-cp311-cp311-macosx_15_0_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "c062efd441538f9ad0a63423281c62560c30e94d86621f00d1f9f63d60ccc8fb",
"md5": "6313be3a6415aca0be75d6252e24a041",
"sha256": "f79d6b791acefd50d7478e739ac29a1865f529acd55544bace80f27243e9cc34"
},
"downloads": -1,
"filename": "miepy-1.0.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
"has_sig": false,
"md5_digest": "6313be3a6415aca0be75d6252e24a041",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.11",
"size": 8129533,
"upload_time": "2025-10-14T04:43:50",
"upload_time_iso_8601": "2025-10-14T04:43:50.296211Z",
"url": "https://files.pythonhosted.org/packages/c0/62/efd441538f9ad0a63423281c62560c30e94d86621f00d1f9f63d60ccc8fb/miepy-1.0.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "a697b7de7713b2c1bca55dfc0dc5080886cb8c1b79bb659c1f44fe50960a50c6",
"md5": "40106656c8ecdee19c98877a74a271ea",
"sha256": "c2d8669303e5184ec5742114b324ca65f0bd6333659bce616c41d17ed81b361c"
},
"downloads": -1,
"filename": "miepy-1.0.2-cp311-cp311-win_amd64.whl",
"has_sig": false,
"md5_digest": "40106656c8ecdee19c98877a74a271ea",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.11",
"size": 9543785,
"upload_time": "2025-10-14T04:43:52",
"upload_time_iso_8601": "2025-10-14T04:43:52.715194Z",
"url": "https://files.pythonhosted.org/packages/a6/97/b7de7713b2c1bca55dfc0dc5080886cb8c1b79bb659c1f44fe50960a50c6/miepy-1.0.2-cp311-cp311-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "9f4f4b63860102640990ccf2be04579fca0c8cf9bc1d7303f166685d26df636c",
"md5": "708ba877b16e080009ddeaf0e4530443",
"sha256": "752f85d8e1c43af13a8f73a3d26cc1936c97279e0b99b9f5c848492e2eb98022"
},
"downloads": -1,
"filename": "miepy-1.0.2-cp312-cp312-macosx_15_0_arm64.whl",
"has_sig": false,
"md5_digest": "708ba877b16e080009ddeaf0e4530443",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.11",
"size": 7608824,
"upload_time": "2025-10-14T04:43:55",
"upload_time_iso_8601": "2025-10-14T04:43:55.532457Z",
"url": "https://files.pythonhosted.org/packages/9f/4f/4b63860102640990ccf2be04579fca0c8cf9bc1d7303f166685d26df636c/miepy-1.0.2-cp312-cp312-macosx_15_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "d36cc77f578fa5a2200d0cfd390c08cf973cb488ca627b6819a7ecf690444d7a",
"md5": "493c0966e5c87b0efca219a452f051c5",
"sha256": "95eeb47e4d0d12d8eea71525ea4b238b86e010de44b696c13aa93d00830b5025"
},
"downloads": -1,
"filename": "miepy-1.0.2-cp312-cp312-macosx_15_0_x86_64.whl",
"has_sig": false,
"md5_digest": "493c0966e5c87b0efca219a452f051c5",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.11",
"size": 7758966,
"upload_time": "2025-10-14T04:43:57",
"upload_time_iso_8601": "2025-10-14T04:43:57.406096Z",
"url": "https://files.pythonhosted.org/packages/d3/6c/c77f578fa5a2200d0cfd390c08cf973cb488ca627b6819a7ecf690444d7a/miepy-1.0.2-cp312-cp312-macosx_15_0_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "23a27453f0238609ff61593f0a776159d493905df882792fe8e3aa5a888d47b8",
"md5": "51960ea1590f9a086cf2225860dd693a",
"sha256": "61ee174ea7a85aded30c904e1f0b137d03914dd5f311c85d171657ca4bf5f9c3"
},
"downloads": -1,
"filename": "miepy-1.0.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
"has_sig": false,
"md5_digest": "51960ea1590f9a086cf2225860dd693a",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.11",
"size": 8131582,
"upload_time": "2025-10-14T04:43:59",
"upload_time_iso_8601": "2025-10-14T04:43:59.310517Z",
"url": "https://files.pythonhosted.org/packages/23/a2/7453f0238609ff61593f0a776159d493905df882792fe8e3aa5a888d47b8/miepy-1.0.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "6d2dde8fa60bdca39dbb45cef3418f23a462252b25a28498bab84e14314cc717",
"md5": "1b3692a782149f7a38625a6bb884ac8f",
"sha256": "47292eb7c2b5e9852fa345b6219ef9d6d3ca0b30a60d416c1b229221386424f6"
},
"downloads": -1,
"filename": "miepy-1.0.2-cp312-cp312-win_amd64.whl",
"has_sig": false,
"md5_digest": "1b3692a782149f7a38625a6bb884ac8f",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.11",
"size": 9549135,
"upload_time": "2025-10-14T04:44:01",
"upload_time_iso_8601": "2025-10-14T04:44:01.739623Z",
"url": "https://files.pythonhosted.org/packages/6d/2d/de8fa60bdca39dbb45cef3418f23a462252b25a28498bab84e14314cc717/miepy-1.0.2-cp312-cp312-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "2e4e2e6d9cf225c211a1bc947d26724066080f83c1c43bd132ab3a2d4f7f0c58",
"md5": "e789a6126a0111c48fe57ceba4016074",
"sha256": "08b71e3b54794bb932e04b4c5408f9991186adfafc1ef06513a0433addac7c19"
},
"downloads": -1,
"filename": "miepy-1.0.2-cp313-cp313-macosx_15_0_arm64.whl",
"has_sig": false,
"md5_digest": "e789a6126a0111c48fe57ceba4016074",
"packagetype": "bdist_wheel",
"python_version": "cp313",
"requires_python": ">=3.11",
"size": 7609063,
"upload_time": "2025-10-14T04:44:04",
"upload_time_iso_8601": "2025-10-14T04:44:04.050255Z",
"url": "https://files.pythonhosted.org/packages/2e/4e/2e6d9cf225c211a1bc947d26724066080f83c1c43bd132ab3a2d4f7f0c58/miepy-1.0.2-cp313-cp313-macosx_15_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "a776d120407886a1f2867e961af98b4858e98c33385e99ab13aec4ca8e42b426",
"md5": "8c49693ffba7f048ff441e84eeb537f6",
"sha256": "36ecac8666e6e23e65e73dbfffbfb494403c57c6cbde0869879cc19533e928e2"
},
"downloads": -1,
"filename": "miepy-1.0.2-cp313-cp313-macosx_15_0_x86_64.whl",
"has_sig": false,
"md5_digest": "8c49693ffba7f048ff441e84eeb537f6",
"packagetype": "bdist_wheel",
"python_version": "cp313",
"requires_python": ">=3.11",
"size": 7759681,
"upload_time": "2025-10-14T04:44:06",
"upload_time_iso_8601": "2025-10-14T04:44:06.034251Z",
"url": "https://files.pythonhosted.org/packages/a7/76/d120407886a1f2867e961af98b4858e98c33385e99ab13aec4ca8e42b426/miepy-1.0.2-cp313-cp313-macosx_15_0_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "75dd5f6253d309f28c0e0fbce2091411c9e37852bfd013698c9efd05a74a4c50",
"md5": "66063c13a1b8e077eca7d984459da207",
"sha256": "267a02553c3c5785851edc0b6f3c751e3f1b0eb8aa43f4c0ecefeedeb9cb4bbc"
},
"downloads": -1,
"filename": "miepy-1.0.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
"has_sig": false,
"md5_digest": "66063c13a1b8e077eca7d984459da207",
"packagetype": "bdist_wheel",
"python_version": "cp313",
"requires_python": ">=3.11",
"size": 8131811,
"upload_time": "2025-10-14T04:44:08",
"upload_time_iso_8601": "2025-10-14T04:44:08.291928Z",
"url": "https://files.pythonhosted.org/packages/75/dd/5f6253d309f28c0e0fbce2091411c9e37852bfd013698c9efd05a74a4c50/miepy-1.0.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "60fa43bafb9e6df752f8dc8c7485892792d37d5ed839f5ea4dff368b32f6e0cf",
"md5": "62690d1d336618514cc21fad872e1946",
"sha256": "cd468725f485cf7c0cf9e57560ab94e004433f0d2247dd6fdda6f4ece47e380a"
},
"downloads": -1,
"filename": "miepy-1.0.2-cp313-cp313-win_amd64.whl",
"has_sig": false,
"md5_digest": "62690d1d336618514cc21fad872e1946",
"packagetype": "bdist_wheel",
"python_version": "cp313",
"requires_python": ">=3.11",
"size": 9550812,
"upload_time": "2025-10-14T04:44:10",
"upload_time_iso_8601": "2025-10-14T04:44:10.306468Z",
"url": "https://files.pythonhosted.org/packages/60/fa/43bafb9e6df752f8dc8c7485892792d37d5ed839f5ea4dff368b32f6e0cf/miepy-1.0.2-cp313-cp313-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "b67319d65a8b1d4f47a03ccdb0b68932d662855adadafd0da2292b8cc67c0567",
"md5": "8d9517e162771cb299d66aebbf617959",
"sha256": "93f4b013c468aebad74af2cb7abea1de7c81fa00aa53febb5e0682465ccd0c2d"
},
"downloads": -1,
"filename": "miepy-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "8d9517e162771cb299d66aebbf617959",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 7745917,
"upload_time": "2025-10-14T04:44:12",
"upload_time_iso_8601": "2025-10-14T04:44:12.583822Z",
"url": "https://files.pythonhosted.org/packages/b6/73/19d65a8b1d4f47a03ccdb0b68932d662855adadafd0da2292b8cc67c0567/miepy-1.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-14 04:44:12",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "miepy"
}