pymiecs


Namepymiecs JSON
Version 0.4 PyPI version JSON
download
home_pagehttps://gitlab.com/wiechapeter/pymiecs
SummaryA simple python Mie solver for core-shell nano-spheres.
upload_time2024-12-13 11:53:44
maintainerNone
docs_urlNone
authorPeter R. Wiecha
requires_python>=3.9
licenseGPLv3+
keywords mie theory core shell nanospheres effective polarizabilities electrodynamical simulations nano optics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![logo](URL-to-png)

# 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

```python
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](https://gitlab.com/wiechapeter/pymiecs):

```shell
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:
  - pyGDM2: https://homepages.laas.fr/pwiecha/pygdm_doc/
  - TorchGDM: https://gitlab.com/wiechapeter/torchgdm


## Licensing

The code in this project is licensed under the [GNU GPLv3](http://www.gnu.org/licenses/).

            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.com/wiechapeter/pymiecs",
    "name": "pymiecs",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "Mie theory, core shell nanospheres, effective polarizabilities, electrodynamical simulations, nano optics",
    "author": "Peter R. Wiecha",
    "author_email": "pwiecha@laas.fr",
    "download_url": "https://files.pythonhosted.org/packages/93/d0/1a769581eb6db3f7bec75f03615db02becc3f5bb6f50310ba0d8a1876634/pymiecs-0.4.tar.gz",
    "platform": null,
    "description": "![logo](URL-to-png)\n\n# pyMieCS\n> Mie theory for core-shell nanoparticles\n\nSimple Mie solver for core-shell particles supporting magnetic optical response of the materials (useful for effective medium fitting).\n\npyMieCS is fully numpy vectorized and therefore fast.\n\n\n## Getting started\n\nSimple example\n\n```python\nimport pymiecs as mie\n\n# - setup a core-shell sphere\nwavelengths = np.linspace(400, 900, 100)  # wavelength in nm\nk0 = 2 * np.pi / wavelengths\n\nr_core = 120.0\nr_shell = r_core + 10.0\n\nn_env = 1\nmat_core = mie.materials.MaterialDatabase(\"Si\")\nmat_shell = mie.materials.MaterialDatabase(\"Au\")\nn_core = mat_core.get_refindex(wavelength=wavelengths)\nn_shell = mat_shell.get_refindex(wavelength=wavelengths)\n\n\n# - calculate efficiencies\nq_res = mie.Q(k0, r_core=r_core, n_core=n_core, r_shell=r_shell, n_shell=n_shell)\n\n# - plot\nplt.plot(wavelengths, q_res[\"qsca\"], label=\"scat\")\nplt.plot(wavelengths, q_res[\"qabs\"], label=\"abs.\")\nplt.plot(wavelengths, q_res[\"qext\"], label=\"extinct\")\n\nplt.legend()\nplt.xlabel(\"wavelength (nm)\")\nplt.ylabel(r\"efficiency (1/$\\sigma_{geo}$)\")\nplt.tight_layout()\nplt.show()\n#...\n```\n\n\n## Features\n\nList of features\n\n- internal and external Mie coefficients\n- efficiencies\n- differential scattering\n- angular scattering\n- core-shell t-matrix class for `smuthi`\n\n\n## Installing / Requirements\n\nInstallation should work via pip from the [gitlab repository](https://gitlab.com/wiechapeter/pymiecs):\n\n```shell\npip install pymiecs\n```\n\nRequirements:\n\n- **scipy**\n- **numpy**\n\n\n## Contributing\n\nIf you'd like to contribute, please fork the repository and use a feature\nbranch. Pull requests are warmly welcome.\n\n\n## Links\n\n- gitlab repository: https://gitlab.com/wiechapeter/pymiecs\n- issue tracker: https://gitlab.com/wiechapeter/pymiecs/-/issues\n  - in case of sensitive bugs you can also contact me directly at\n    pwiecha|AT|laas|DOT|fr.\n- related projects:\n  - pyGDM2: https://homepages.laas.fr/pwiecha/pygdm_doc/\n  - TorchGDM: https://gitlab.com/wiechapeter/torchgdm\n\n\n## Licensing\n\nThe code in this project is licensed under the [GNU GPLv3](http://www.gnu.org/licenses/).\n",
    "bugtrack_url": null,
    "license": "GPLv3+",
    "summary": "A simple python Mie solver for core-shell nano-spheres.",
    "version": "0.4",
    "project_urls": {
        "Homepage": "https://gitlab.com/wiechapeter/pymiecs"
    },
    "split_keywords": [
        "mie theory",
        " core shell nanospheres",
        " effective polarizabilities",
        " electrodynamical simulations",
        " nano optics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "93d01a769581eb6db3f7bec75f03615db02becc3f5bb6f50310ba0d8a1876634",
                "md5": "eb5c1ef3b05a2dcc31579301a6b4c805",
                "sha256": "31f67b848c12cf37fd4706d1c466e0daa4cd19654936bb6b96fb47b9b0e4411a"
            },
            "downloads": -1,
            "filename": "pymiecs-0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "eb5c1ef3b05a2dcc31579301a6b4c805",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 45896,
            "upload_time": "2024-12-13T11:53:44",
            "upload_time_iso_8601": "2024-12-13T11:53:44.302303Z",
            "url": "https://files.pythonhosted.org/packages/93/d0/1a769581eb6db3f7bec75f03615db02becc3f5bb6f50310ba0d8a1876634/pymiecs-0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-13 11:53:44",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "wiechapeter",
    "gitlab_project": "pymiecs",
    "lcname": "pymiecs"
}
        
Elapsed time: 0.70742s