Skip to main content

logo

pyMieCS

Mie theory for core-shell nanoparticles

Simple Mie solver for core-shell particles supporting magnetic optical response of the materials (useful for effective medium fitting).

pyMieCS is fully numpy vectorized and therefore fast.

Getting started

Simple example

import pymiecs as mie

# - setup a core-shell sphere
wavelengths = np.linspace(400, 900, 100)  # wavelength in nm
k0 = 2 * np.pi / wavelengths

r_core = 120.0
r_shell = r_core + 10.0

n_env = 1
mat_core = mie.materials.MaterialDatabase("Si")
mat_shell = mie.materials.MaterialDatabase("Au")
n_core = mat_core.get_refindex(wavelength=wavelengths)
n_shell = mat_shell.get_refindex(wavelength=wavelengths)


# - calculate efficiencies
q_res = mie.Q(k0, r_core=r_core, n_core=n_core, r_shell=r_shell, n_shell=n_shell)

# - plot
plt.plot(wavelengths, q_res["qsca"], label="scat")
plt.plot(wavelengths, q_res["qabs"], label="abs.")
plt.plot(wavelengths, q_res["qext"], label="extinct")

plt.legend()
plt.xlabel("wavelength (nm)")
plt.ylabel(r"efficiency (1/$\sigma_{geo}$)")
plt.tight_layout()
plt.show()
#...

Features

List of features

  • internal and external Mie coefficients
  • efficiencies
  • differential scattering
  • angular scattering
  • core-shell t-matrix class for smuthi

Installing / Requirements

Installation should work via pip from the gitlab repository:

pip install pymiecs

Requirements:

  • scipy
  • numpy

Contributing

If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.

Links

Licensing

The code in this project is licensed under the GNU GPLv3.

Download files

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

Source Distribution

pymiecs-0.5.tar.gz (46.5 kB view details)

Uploaded Source

File details

Details for the file pymiecs-0.5.tar.gz.

File metadata

  • Download URL: pymiecs-0.5.tar.gz
  • Upload date:
  • Size: 46.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for pymiecs-0.5.tar.gz
Algorithm Hash digest
SHA256 c263c3e509acd3c54506f75fdcb545db57ac6606fad47ba10f143ba7ae4e73e0
MD5 98cd63d250adc32221ae5315262e984e
BLAKE2b-256 ec2a694dda622bb3ec04564c4d790a51b978fac6603eb98a7575660d398abd62

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.5 This release

1 file

0.4

1 file

0.3

1 file

0.2

1 file

0.1

1 file

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