Skip to main content

PyMieSimX is the standalone graphical interface for PyMieSim. It provides a Dash application for configuring optical setups, running parameter sweeps, exploring individual particles, and exporting results.

Source-model note

The Gaussian source exposed by PyMieSimX is not a generalized Lorenz–Mie theory (GLMT) implementation. It is a convenience object for defining a Gaussian illumination through its numerical aperture and optical power in watts. The Gaussian and GaussianSet source options should therefore be interpreted as a practical source parameterization, not as a separate GLMT solver.

Installation

Install the GUI and its PyMieSim dependency with:

pip install PyMieSimX

Launch the dashboard with:

pymiesimx

Use pymiesimx --help to see the available host, port, browser, and debug options.

Development

Install an editable checkout with:

pip install -e .

The GUI source lives in PyMieSimX/gui. Scientific calculations are provided by the installed PyMieSim package rather than duplicated here.

Testing and automation

Run the GUI test suite with:

pip install -e ".[testing]"
python -m pytest

GitHub Actions includes quality checks, GUI tests, PyPI publishing, Conda recipe publishing, and coverage deployment. The Conda recipe is in meta.yaml and the container entry point is defined in Dockerfile.

Python API

The computational API can be used without constructing the Dash application:

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",
)

PyMieSimX.create_dash_app and PyMieSimX.OpticalSetupGUI remain available for applications that need the graphical interface.

Background calculations and limits

Parameter sweeps are submitted to a bounded background worker and reported to the dashboard through a polling status indicator. Results are guarded by both an in-memory dataframe limit and a serialized Dash-payload limit. Large-result warnings are logged before execution; oversized results are rejected with an actionable message asking you to reduce the sweep.

Run the command-line launcher with --debug to enable detailed logs. Log messages use the format timestamp | level | logger | message and include experiment job identifiers, input configuration, queue transitions, dataframe memory usage, and serialized result sizes.

Server-side usage metrics

The dashboard can share a PostgreSQL metrics database with RosettaX. Configure the Render service with:

PYMIESIMX_USAGE_METRICS_BACKEND=postgres
DATABASE_URL=<the shared PostgreSQL URL>

PyMieSimX writes namespaced counters to the shared metrics_counters table: pymiesimx_home_page_visit_count, pymiesimx_experiment_run_count, and pymiesimx_single_run_count. If PostgreSQL is unavailable, local development falls back to a JSON file under the platform’s application-data directory.

Download files

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

Source Distribution

pymiesimx-0.1.1.tar.gz (435.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymiesimx-0.1.1-py3-none-any.whl (439.8 kB view details)

Uploaded Python 3

File details

Details for the file pymiesimx-0.1.1.tar.gz.

File metadata

  • Download URL: pymiesimx-0.1.1.tar.gz
  • Upload date:
  • Size: 435.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for pymiesimx-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3294fca7a11c3292ef324236619b72a0d95ea60eed03dd13e329b8ba0b4a014a
MD5 a5978e212e936d3391c2f7ff045cc1f2
BLAKE2b-256 4cdc0489feecdb27f1ebd12d6f23c0897e89205f11c59610348bd5afa26668d5

See more details on using hashes here.

File details

Details for the file pymiesimx-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pymiesimx-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 439.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for pymiesimx-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 910c02528a84a36be8cdbdde744e0260540fc051ae57c2b404fa8bdf5dda9fb7
MD5 0a1bc0ebcb0d4ac4eac9ad0eecda34a2
BLAKE2b-256 30d87adc8e6897b4f0eb183bb156ac2295a5460501dc6b4d20c1004a7f861da1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page