iadpython


Nameiadpython JSON
Version 0.5.3 PyPI version JSON
download
home_pagehttps://github.com/scottprahl/iadpython.git
Summary'Forward and inverse radiative transport using adding-doubling'
upload_time2023-09-19 23:02:38
maintainer
docs_urlNone
authorScott Prahl
requires_python>=3.7
licenseMIT
keywords absorption scattering reflection transmission optical properties radiative transport optical properties scattering coefficient scattering anisotropy
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            iadpython
=========

by Scott Prahl

.. image:: https://img.shields.io/pypi/v/iadpython
   :target: https://pypi.org/project/iadpython/
   :alt: pypi

.. image:: https://img.shields.io/conda/v/conda-forge/iadpython.svg
   :target: https://anaconda.org/conda-forge/iadpython
   :alt: conda

.. image:: https://zenodo.org/badge/131667397.svg
   :target: https://zenodo.org/badge/latestdoi/131667397
   :alt: doi

|

.. image:: https://img.shields.io/github/license/scottprahl/iadpython
   :target: https://github.com/scottprahl/iadpython/blob/master/LICENSE.txt
   :alt: License

.. image:: https://github.com/scottprahl/iadpython/actions/workflows/test.yaml/badge.svg
   :target: https://github.com/scottprahl/iadpython/actions/workflows/test.yaml
   :alt: Testing

.. image:: https://readthedocs.org/projects/iadpython/badge
   :target: https://iadpython.readthedocs.io
   :alt: Docs

.. image:: https://img.shields.io/pypi/dm/iadpython
   :target: https://pypi.org/project/iadpython/
   :alt: Downloads

__________

`iadpython` will be a pure Python module to do forward and inverse multiple light
scattering (radiative transport) in layered materials.  Calculations are done using 
van de Hulst's adding-doubling technique.

The original adding-doubling algorithm was developed by van de Hulst to model light
propagation through layered media.  I extended it to handle Fresnel 
reflection at boundaries as well as interactions with integrating spheres. 

Finally, the code was further extended to handle lost light using
Monte Carlo techniques for inverse calculations.

Version v0.4.0 started the migration to a pure-python implementation.  This 
version includes the ability to do forward calculations of light transport through
layered 1D structures.  

The long-term goal is rewrite the integrating sphere, inverse algorithm, and
lost light calculations in pure python so that one can do 
inverse calculations (i.e., reflection and transmission measurements to 
intrinsic absorption and scattering properties). 

Both inverse and forward calculations are currently possible using the `iadc` framework.
This is a python interface to the inverse 
adding-doubling package written in C by Scott Prahl 
<https://github.com/scottprahl/iad>.  This works now
but is a nuisance to install and maintain because of its dependence on compiling
and installing a C library.

See <https://iadpython.readthedocs.io> for full documentation of `iadpython`.

Usage
-----

The following will do a forward calculation::

    import iadpython as iad

    mu_s = 10  # scattering coefficient [1/mm]
    mu_a = 0.1 # absorption coefficient [1/mm]
    g = 0.9    # scattering anisotropy
    d = 1      # thickness mm

    a = mu_s/(mu_a+mu_s)
    b = mu_s/(mu_a+mu_s) * d

    # air / glass / sample / glass / air
    s = iadpython.Sample(a=a, b=b, g=g, n=1.4, n_above=1.5, n_below=1.5)
    ur1, ut1, uru, utu = s.rt()

    print('Collimated light incident perpendicular to sample')
    print('  total reflection = %.5f' % ur1)
    print('  total transmission = %.5f' % ut1)
 
    print('Diffuse light incident on sample')
    print('  total reflection = %.5f' % uru)
    print('  total transmission = %.5f' % utu)


Installation
------------

Use `pip`::

    pip install iadpython

If you just want to do forward calculations then you're done.

If you want to do inverse calculations, then you'll need to build and
install the `libiad` library::

    git clone https://github.com/scottprahl/iad.git
    cd iad
    # edit Makefile as needed
    make install-lib


Dependencies
------------

Required Python modules: numpy, matplotlib, ctypes, scipy


License
-------

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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/scottprahl/iadpython.git",
    "name": "iadpython",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "absorption,scattering,reflection,transmission,optical properties,radiative transport,optical properties,scattering coefficient,scattering anisotropy",
    "author": "Scott Prahl",
    "author_email": "scott.prahl@oit.edu",
    "download_url": "https://files.pythonhosted.org/packages/8c/a9/bd81ac773ea970cd640a1f85d774b1f6eed0a2173e5664adb5d06a6360e0/iadpython-0.5.3.tar.gz",
    "platform": null,
    "description": "iadpython\n=========\n\nby Scott Prahl\n\n.. image:: https://img.shields.io/pypi/v/iadpython\n   :target: https://pypi.org/project/iadpython/\n   :alt: pypi\n\n.. image:: https://img.shields.io/conda/v/conda-forge/iadpython.svg\n   :target: https://anaconda.org/conda-forge/iadpython\n   :alt: conda\n\n.. image:: https://zenodo.org/badge/131667397.svg\n   :target: https://zenodo.org/badge/latestdoi/131667397\n   :alt: doi\n\n|\n\n.. image:: https://img.shields.io/github/license/scottprahl/iadpython\n   :target: https://github.com/scottprahl/iadpython/blob/master/LICENSE.txt\n   :alt: License\n\n.. image:: https://github.com/scottprahl/iadpython/actions/workflows/test.yaml/badge.svg\n   :target: https://github.com/scottprahl/iadpython/actions/workflows/test.yaml\n   :alt: Testing\n\n.. image:: https://readthedocs.org/projects/iadpython/badge\n   :target: https://iadpython.readthedocs.io\n   :alt: Docs\n\n.. image:: https://img.shields.io/pypi/dm/iadpython\n   :target: https://pypi.org/project/iadpython/\n   :alt: Downloads\n\n__________\n\n`iadpython` will be a pure Python module to do forward and inverse multiple light\nscattering (radiative transport) in layered materials.  Calculations are done using \nvan de Hulst's adding-doubling technique.\n\nThe original adding-doubling algorithm was developed by van de Hulst to model light\npropagation through layered media.  I extended it to handle Fresnel \nreflection at boundaries as well as interactions with integrating spheres. \n\nFinally, the code was further extended to handle lost light using\nMonte Carlo techniques for inverse calculations.\n\nVersion v0.4.0 started the migration to a pure-python implementation.  This \nversion includes the ability to do forward calculations of light transport through\nlayered 1D structures.  \n\nThe long-term goal is rewrite the integrating sphere, inverse algorithm, and\nlost light calculations in pure python so that one can do \ninverse calculations (i.e., reflection and transmission measurements to \nintrinsic absorption and scattering properties). \n\nBoth inverse and forward calculations are currently possible using the `iadc` framework.\nThis is a python interface to the inverse \nadding-doubling package written in C by Scott Prahl \n<https://github.com/scottprahl/iad>.  This works now\nbut is a nuisance to install and maintain because of its dependence on compiling\nand installing a C library.\n\nSee <https://iadpython.readthedocs.io> for full documentation of `iadpython`.\n\nUsage\n-----\n\nThe following will do a forward calculation::\n\n    import iadpython as iad\n\n    mu_s = 10  # scattering coefficient [1/mm]\n    mu_a = 0.1 # absorption coefficient [1/mm]\n    g = 0.9    # scattering anisotropy\n    d = 1      # thickness mm\n\n    a = mu_s/(mu_a+mu_s)\n    b = mu_s/(mu_a+mu_s) * d\n\n    # air / glass / sample / glass / air\n    s = iadpython.Sample(a=a, b=b, g=g, n=1.4, n_above=1.5, n_below=1.5)\n    ur1, ut1, uru, utu = s.rt()\n\n    print('Collimated light incident perpendicular to sample')\n    print('  total reflection = %.5f' % ur1)\n    print('  total transmission = %.5f' % ut1)\n \n    print('Diffuse light incident on sample')\n    print('  total reflection = %.5f' % uru)\n    print('  total transmission = %.5f' % utu)\n\n\nInstallation\n------------\n\nUse `pip`::\n\n    pip install iadpython\n\nIf you just want to do forward calculations then you're done.\n\nIf you want to do inverse calculations, then you'll need to build and\ninstall the `libiad` library::\n\n    git clone https://github.com/scottprahl/iad.git\n    cd iad\n    # edit Makefile as needed\n    make install-lib\n\n\nDependencies\n------------\n\nRequired Python modules: numpy, matplotlib, ctypes, scipy\n\n\nLicense\n-------\n\n`iadpython` is licensed under the terms of the MIT license.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "'Forward and inverse radiative transport using adding-doubling'",
    "version": "0.5.3",
    "project_urls": {
        "Homepage": "https://github.com/scottprahl/iadpython.git"
    },
    "split_keywords": [
        "absorption",
        "scattering",
        "reflection",
        "transmission",
        "optical properties",
        "radiative transport",
        "optical properties",
        "scattering coefficient",
        "scattering anisotropy"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c6ce0059cce71767ff796bda53aad8767a1f9b7b159a2542e1cb19312f68c13c",
                "md5": "9e71451ab8056e5a0eca14919158965a",
                "sha256": "8d6065e43ffc2b2819be926ad84b696f3f135a1e39bfd9c66027a1c26e5016a6"
            },
            "downloads": -1,
            "filename": "iadpython-0.5.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9e71451ab8056e5a0eca14919158965a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 40383,
            "upload_time": "2023-09-19T23:02:36",
            "upload_time_iso_8601": "2023-09-19T23:02:36.844551Z",
            "url": "https://files.pythonhosted.org/packages/c6/ce/0059cce71767ff796bda53aad8767a1f9b7b159a2542e1cb19312f68c13c/iadpython-0.5.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8ca9bd81ac773ea970cd640a1f85d774b1f6eed0a2173e5664adb5d06a6360e0",
                "md5": "f040eaa2fb7257b8a9df007cc18c0f1f",
                "sha256": "9efa69677a22450c140c4d13bd30b4f066a3158731c3a4497a7a989bac1dbc4a"
            },
            "downloads": -1,
            "filename": "iadpython-0.5.3.tar.gz",
            "has_sig": false,
            "md5_digest": "f040eaa2fb7257b8a9df007cc18c0f1f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 2519445,
            "upload_time": "2023-09-19T23:02:38",
            "upload_time_iso_8601": "2023-09-19T23:02:38.554182Z",
            "url": "https://files.pythonhosted.org/packages/8c/a9/bd81ac773ea970cd640a1f85d774b1f6eed0a2173e5664adb5d06a6360e0/iadpython-0.5.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-19 23:02:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "scottprahl",
    "github_project": "iadpython",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "iadpython"
}
        
Elapsed time: 0.13569s