Skip to main content

PyMieSimX

PyMieSimX logo

Badge

Status

Web app

Launch PyMieSimX

Python versions

Supported Python versions

Documentation

Documentation

Tests

Tests Test coverage

PyPI

PyPI version Monthly PyPI downloads

Conda

Anaconda version Anaconda downloads Latest Anaconda release

Interactive Mie scattering simulations for individual particles, parameter sweeps, and dilute particle populations.

Explore how particle size, composition, and illumination change scattering with PyMieSim. Open a setup from the Examples page, adjust its inputs, and select Run.

  • Single Scatterer shows the angular scattering, polarization, and fields of one particle.

  • Parameter Scan sweeps source, scatterer, or detector parameters and compares the resulting measures.

  • Ensemble Optics averages optical properties over a dilute population of spheres with a chosen size distribution and concentration.

Export results as CSV or use Copy simulation link to share the setup. Opening a shared link reruns it with the receiving installation’s solver and material data.

To run locally after installation, launch pymiesimx. The first launch downloads PyOptik’s refractive-index catalogue.

https://raw.githubusercontent.com/MartinPdeS/PyMieSimX/HEAD/docs/source/_static/app-screenshot.png

PyMieSimX home page with the Single Scatterer and Parameter Scan workspaces.

Installation

Requires Python >=3.11.

$ python -m pip install PyMieSimX

Install from the martinpdes Conda channel:

$ conda install -c martinpdes pymiesimx

For an editable source installation:

$ git clone https://github.com/MartinPdeS/PyMieSimX.git
$ cd PyMieSimX
$ python -m pip install -e .

Calculate scattering efficiency in Python

Compute the scattering efficiency of a 500 nm sphere at a wavelength of 650 nm. With these inputs, the dimensionless scattering efficiency is approximately 1.629.

"""Calculate the scattering efficiency of a single sphere."""

from PyMieSimX import run_experiment

result = run_experiment(
    source_type="GaussianSet",
    source_values={
        "wavelength": "650",
        "polarization": "0",
        "optical_power": "1e-3",
        "numerical_aperture": "0.2",
    },
    scatterer_type="SphereSet",
    scatterer_values={"diameter": "500", "material": "1.4", "medium": "1.0"},
    detector_type="None",
    detector_values={},
    measure="Qsca",
)
print(result["rows"][0]["Qsca"])

Documentation

Use the PyMieSimX documentation to work through examples and look up the inputs and return values of individual functions.

Contributing

Bug reports, worked examples, and documentation corrections are welcome. To set up a development checkout and run the tests, follow the contributing guide.

Contact

For questions, contact Martin Poinsinet de Sivry-Houle.

License

PyMieSimX is licensed under MIT.

Metadata

Release files for PyMieSimX 0.5.0

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

Source distribution (sdist)

Source distribution for PyMieSimX 0.5.0
File Size Uploaded Provenance Actions
pymiesimx-0.5.0.tar.gz 3.7 MB Without provenance Details for pymiesimx-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for PyMieSimX 0.5.0
File Interpreter ABI Platform Actions
pymiesimx-0.5.0-py3-none-any.whl Python 3 none any Details for pymiesimx-0.5.0-py3-none-any.whl

Total release size: 7.5 MB

Release files / pymiesimx-0.5.0.tar.gz

Download URL pymiesimx-0.5.0.tar.gz
Size 3.7 MB
Tags Source
SHA-256 checksum
How to use checksums
67d529fe142b5221a29a8b6df23a2423c87300210bd64d4080dcf3c021a06f1d
BLAKE2b-256 checksum
How to use checksums
a32bf6acb707b4bd817daa656cbdf7f28a8fcd0a1df333b09d17072abf7bce20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Release files / pymiesimx-0.5.0-py3-none-any.whl

Download URL pymiesimx-0.5.0-py3-none-any.whl
Size 3.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
cd5a44fcbe24a8efee1494228c6d208fc411e6daba74da5d5ee600ecb4792fbf
BLAKE2b-256 checksum
How to use checksums
a65e34695cb9938e9bc57c2c32a32f4c04d91c3b06b7f09a8107978ccd6ee68d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Security for PyMieSimX 0.5.0

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.

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