miepython


Namemiepython JSON
Version 2.5.3 PyPI version JSON
download
home_pagehttps://github.com/scottprahl/miepython.git
SummaryMie scattering of a plane wave by a sphere
upload_time2023-08-05 21:31:06
maintainer
docs_urlNone
authorScott Prahl
requires_python
licenseMIT
keywords mie scattering rainbow droplet backscatter sphere nanoparticle sphere cloud phase function efficiency rayleigh backscattering
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            miepython
=========

by Scott Prahl

.. image:: https://img.shields.io/pypi/v/miepython.svg
   :target: https://pypi.org/project/miepython/

.. image:: https://img.shields.io/badge/readthedocs-latest-blue.svg
   :target: https://miepython.readthedocs.io

.. image:: https://img.shields.io/badge/MIT-license-yellow.svg
   :target: https://github.com/scottprahl/miepython/blob/master/LICENSE.txt

.. image:: https://github.com/scottprahl/miepython/actions/workflows/test.yml/badge.svg
   :target: https://github.com/scottprahl/miepython/actions/workflows/test.yml

.. image:: https://zenodo.org/badge/99259684.svg
   :target: https://zenodo.org/badge/latestdoi/99259684

__________

``miepython`` is a pure Python module to calculate light scattering for
non-absorbing, partially-absorbing, or perfectly-conducting spheres. Mie
theory is used, following `the procedure described by Wiscombe
<http://opensky.ucar.edu/islandora/object/technotes:232>`_. This code has
been validated against his results. 

This code provides functions for calculating the extinction efficiency, scattering efficiency, backscattering, and scattering asymmetry. Moreover, a set of angles can be given to calculate the scattering for a sphere at each of those
angles.

Full documentation at <https://miepython.readthedocs.io>

Pay Attention!
--------------

When comparing different Mie scattering codes, make sure that you're aware of the conventions used by each code.  ``miepython`` makes the following assumptions

#. the imaginary part of the complex index of refraction for absorbing spheres is *negative*.  

#. the scattering phase function is normalized so it equals the *single scattering albedo* when integrated over 4π steradians.  As of version 2.3, this can be changed.


Using miepython
---------------

1. You can install locally using pip::
    
    pip install miepython

2. or `run this code in the cloud using Google Collaboratory <https://colab.research.google.com/github/scottprahl/miepython/blob/master>`_ by selecting the Jupyter notebook that interests you.

An example
----------

The following code::

    import miepython
    
    m = 1.5-1j
    x = 1
    qext, qsca, qback, g = miepython.mie(m,x)

    print("The extinction efficiency  is %.3f" % qext)
    print("The scattering efficiency  is %.3f" % qsca)
    print("The backscatter efficiency is %.3f" % qback)
    print("The scattering anisotropy  is %.3f" % g)

should produce::

    The extinction efficiency  is 2.336
    The scattering efficiency  is 0.663
    The backscatter efficiency is 0.573
    The scattering anisotropy  is 0.192

Here are a few short scripts in the github repository.

* `Extinction Efficiency of Absorbing and Non-Absorbing Spheres <https://github.com/scottprahl/miepython/blob/master/miepython/examples/01_dielectric.py>`_ 
* `Four Micron Glass Spheres <https://github.com/scottprahl/miepython/blob/master/miepython/examples/02_glass.py>`_ 
* `One Micron Water Droplets <https://github.com/scottprahl/miepython/blob/master/miepython/examples/03_droplets.py>`_ 
* `Gold Nanospheres <https://github.com/scottprahl/miepython/blob/master/miepython/examples/04_gold.py>`_ 

Detailed documentation is available at <https://miepython.readthedocs.io>


License
-------

``miepython`` is licensed under the terms of the MIT license.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/scottprahl/miepython.git",
    "name": "miepython",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "mie,scattering,rainbow,droplet,backscatter,sphere,nanoparticle,sphere,cloud,phase function,efficiency,rayleigh,backscattering",
    "author": "Scott Prahl",
    "author_email": "scott.prahl@oit.edu",
    "download_url": "https://files.pythonhosted.org/packages/5c/88/80d380d2a4fe28c9d37391d82c558bdc6c227181ed4d1a92181bb2223117/miepython-2.5.3.tar.gz",
    "platform": null,
    "description": "miepython\n=========\n\nby Scott Prahl\n\n.. image:: https://img.shields.io/pypi/v/miepython.svg\n   :target: https://pypi.org/project/miepython/\n\n.. image:: https://img.shields.io/badge/readthedocs-latest-blue.svg\n   :target: https://miepython.readthedocs.io\n\n.. image:: https://img.shields.io/badge/MIT-license-yellow.svg\n   :target: https://github.com/scottprahl/miepython/blob/master/LICENSE.txt\n\n.. image:: https://github.com/scottprahl/miepython/actions/workflows/test.yml/badge.svg\n   :target: https://github.com/scottprahl/miepython/actions/workflows/test.yml\n\n.. image:: https://zenodo.org/badge/99259684.svg\n   :target: https://zenodo.org/badge/latestdoi/99259684\n\n__________\n\n``miepython`` is a pure Python module to calculate light scattering for\nnon-absorbing, partially-absorbing, or perfectly-conducting spheres. Mie\ntheory is used, following `the procedure described by Wiscombe\n<http://opensky.ucar.edu/islandora/object/technotes:232>`_. This code has\nbeen validated against his results. \n\nThis code provides functions for calculating the extinction efficiency, scattering efficiency, backscattering, and scattering asymmetry. Moreover, a set of angles can be given to calculate the scattering for a sphere at each of those\nangles.\n\nFull documentation at <https://miepython.readthedocs.io>\n\nPay Attention!\n--------------\n\nWhen comparing different Mie scattering codes, make sure that you're aware of the conventions used by each code.  ``miepython`` makes the following assumptions\n\n#. the imaginary part of the complex index of refraction for absorbing spheres is *negative*.  \n\n#. the scattering phase function is normalized so it equals the *single scattering albedo* when integrated over 4\u03c0 steradians.  As of version 2.3, this can be changed.\n\n\nUsing miepython\n---------------\n\n1. You can install locally using pip::\n    \n    pip install miepython\n\n2. or `run this code in the cloud using Google Collaboratory <https://colab.research.google.com/github/scottprahl/miepython/blob/master>`_ by selecting the Jupyter notebook that interests you.\n\nAn example\n----------\n\nThe following code::\n\n    import miepython\n    \n    m = 1.5-1j\n    x = 1\n    qext, qsca, qback, g = miepython.mie(m,x)\n\n    print(\"The extinction efficiency  is %.3f\" % qext)\n    print(\"The scattering efficiency  is %.3f\" % qsca)\n    print(\"The backscatter efficiency is %.3f\" % qback)\n    print(\"The scattering anisotropy  is %.3f\" % g)\n\nshould produce::\n\n    The extinction efficiency  is 2.336\n    The scattering efficiency  is 0.663\n    The backscatter efficiency is 0.573\n    The scattering anisotropy  is 0.192\n\nHere are a few short scripts in the github repository.\n\n* `Extinction Efficiency of Absorbing and Non-Absorbing Spheres <https://github.com/scottprahl/miepython/blob/master/miepython/examples/01_dielectric.py>`_ \n* `Four Micron Glass Spheres <https://github.com/scottprahl/miepython/blob/master/miepython/examples/02_glass.py>`_ \n* `One Micron Water Droplets <https://github.com/scottprahl/miepython/blob/master/miepython/examples/03_droplets.py>`_ \n* `Gold Nanospheres <https://github.com/scottprahl/miepython/blob/master/miepython/examples/04_gold.py>`_ \n\nDetailed documentation is available at <https://miepython.readthedocs.io>\n\n\nLicense\n-------\n\n``miepython`` is licensed under the terms of the MIT license.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Mie scattering of a plane wave by a sphere",
    "version": "2.5.3",
    "project_urls": {
        "Homepage": "https://github.com/scottprahl/miepython.git"
    },
    "split_keywords": [
        "mie",
        "scattering",
        "rainbow",
        "droplet",
        "backscatter",
        "sphere",
        "nanoparticle",
        "sphere",
        "cloud",
        "phase function",
        "efficiency",
        "rayleigh",
        "backscattering"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ee2f68fab792c7da4e47c5101dc610356170ffb27d163a6704dbcf363f5fa8f1",
                "md5": "eea1d16ec784e4b8ce99f1eed770c3a6",
                "sha256": "45ae722c9d83cdaef57d3857034feca73e48eac851c7990fa9127d525ead957b"
            },
            "downloads": -1,
            "filename": "miepython-2.5.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "eea1d16ec784e4b8ce99f1eed770c3a6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 30773,
            "upload_time": "2023-08-05T21:31:04",
            "upload_time_iso_8601": "2023-08-05T21:31:04.124634Z",
            "url": "https://files.pythonhosted.org/packages/ee/2f/68fab792c7da4e47c5101dc610356170ffb27d163a6704dbcf363f5fa8f1/miepython-2.5.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5c8880d380d2a4fe28c9d37391d82c558bdc6c227181ed4d1a92181bb2223117",
                "md5": "8bcc27831442198531ffcbc1ef1ba47c",
                "sha256": "3e13b36949db0aaf72787dffd1003f936cb72c062a9ca209cfa5982799252dd2"
            },
            "downloads": -1,
            "filename": "miepython-2.5.3.tar.gz",
            "has_sig": false,
            "md5_digest": "8bcc27831442198531ffcbc1ef1ba47c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 37060,
            "upload_time": "2023-08-05T21:31:06",
            "upload_time_iso_8601": "2023-08-05T21:31:06.031466Z",
            "url": "https://files.pythonhosted.org/packages/5c/88/80d380d2a4fe28c9d37391d82c558bdc6c227181ed4d1a92181bb2223117/miepython-2.5.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-05 21:31:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "scottprahl",
    "github_project": "miepython",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "miepython"
}
        
Elapsed time: 0.10142s