A simple python Mie solver for core-shell nano-spheres.
Project description
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"][0], label="scat")
plt.plot(wavelengths, q_res["qabs"][0], label="abs.")
plt.plot(wavelengths, q_res["qext"][0], 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
- gitlab repository: https://gitlab.com/wiechapeter/pymiecs
- issue tracker: https://gitlab.com/wiechapeter/pymiecs/-/issues
- in case of sensitive bugs you can also contact me directly at pwiecha|AT|laas|DOT|fr.
- related projects:
Licensing
The code in this project is licensed under the GNU GPLv3.
Project details
Release history Release notifications | RSS feed
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.2.tar.gz
(37.6 kB
view details)
File details
Details for the file pymiecs-0.2.tar.gz
.
File metadata
- Download URL: pymiecs-0.2.tar.gz
- Upload date:
- Size: 37.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffd1070ab574a5f534d88f507eb3f6db406b4374fc6f4a52da7b3ef5973eafb5 |
|
MD5 | 615063174ed0920f52293294c9c441a2 |
|
BLAKE2b-256 | 6dbfa125ca1010d161ef24c327a37f03152fed757b557e98636a6bffe54b6f16 |