iadpython

Forward and Inverse radiative transfer models using the adding-doubling method in python.

https://github.com/scottprahl/iadpython

Science Score: 64.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    1 of 3 committers (33.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.4%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Forward and Inverse radiative transfer models using the adding-doubling method in python.

Basic Info
  • Host: GitHub
  • Owner: scottprahl
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 23.6 MB
Statistics
  • Stars: 16
  • Watchers: 4
  • Forks: 8
  • Open Issues: 0
  • Releases: 6
Created over 8 years ago · Last pushed 7 months ago
Metadata Files
Readme Changelog License Citation

README.rst

.. |pypi| image:: https://img.shields.io/pypi/v/iadpython?color=68CA66
   :target: https://pypi.org/project/iadpython/
   :alt: pypi

.. |github| image:: https://img.shields.io/github/v/tag/scottprahl/iadpython?label=github&color=68CA66
   :target: https://github.com/scottprahl/iadpython
   :alt: github

.. |conda| image:: https://img.shields.io/conda/vn/conda-forge/iadpython?label=conda&color=68CA66
   :target: https://github.com/conda-forge/iadpython-feedstock
   :alt: conda

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

.. |license| image:: https://img.shields.io/github/license/scottprahl/iadpython?color=68CA66
   :target: https://github.com/scottprahl/iadpython/blob/main/LICENSE.txt
   :alt: License

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

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

.. |downloads| image:: https://img.shields.io/pypi/dm/iadpython?color=68CA66
   :target: https://pypi.org/project/iadpython/
   :alt: Downloads

iadpython
=========

by Scott Prahl

|pypi| |github| |conda| |doi|

|license| |test| |docs| |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 
.  This works now
but is a nuisance to install and maintain because of its dependence on compiling
and installing a C library.

See  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_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

or ``conda``::

    conda install -c conda-forge iadpython

or use immediately by clicking the Google Colaboratory button below

.. image:: https://colab.research.google.com/assets/colab-badge.svg
  :target: https://colab.research.google.com/github/scottprahl/iadpython/blob/main
  :alt: Colab

Inverse Calculations
---------------------

As of version 0.5.3, the forward and inverse calculations work fine as long as you do not need to
include integrating sphere effects or lost-light calculations.

If you want to do these, then you're probably best served by downloading and compiling
the C-code (on unix or macos) or the `.exe` file for Windows.  


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

Required Python modules: numpy, matplotlib, ctypes, scipy


License
-------

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

Owner

  • Name: Scott Prahl
  • Login: scottprahl
  • Kind: user
  • Location: Portland, Oregon
  • Company: Oregon Institute of Technology

Citation (CITATION.cff)

authors:
- family-names: Prahl
  given-names: Scott
  orcid: https://orcid.org/0000-0003-1468-6851
cff-version: 1.2.0
date-released: '2023-09-19'
doi: 10.5281/zenodo.8361415
message: If you use this software, please cite it as below.
title: 'iadpython: a python module implementation of adding-doubling.'
url: https://zenodo.org/badge/latestdoi/102148844
version: 0.5.3


GitHub Events

Total
  • Issues event: 1
  • Watch event: 3
  • Push event: 2
  • Fork event: 1
Last Year
  • Issues event: 1
  • Watch event: 3
  • Push event: 2
  • Fork event: 1

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 339
  • Total Committers: 3
  • Avg Commits per committer: 113.0
  • Development Distribution Score (DDS): 0.05
Past Year
  • Commits: 63
  • Committers: 2
  • Avg Commits per committer: 31.5
  • Development Distribution Score (DDS): 0.016
Top Committers
Name Email Commits
Scott Prahl s****t@p****m 322
Work Prahl p****l@b****u 16
GitHub Action a****n@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 1
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • nestor98 (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 65 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 11
  • Total maintainers: 1
pypi.org: iadpython

'Forward and inverse radiative transport using adding-doubling'

  • Versions: 11
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 65 Last month
Rankings
Dependent packages count: 7.4%
Forks count: 14.3%
Average: 16.5%
Stargazers count: 18.5%
Downloads: 19.9%
Dependent repos count: 22.2%
Maintainers (1)
Last synced: 6 months ago

Dependencies

docs/requirements.txt pypi
  • iadpython *
  • matplotlib *
  • nbsphinx *
  • numpy *
  • scipy *
  • sphinx-automodapi *
  • sphinx-rtd-theme *
requirements-dev.txt pypi
  • check-manifest * development
  • matplotlib * development
  • nbconvert * development
  • nbformat * development
  • notebook * development
  • numpy * development
  • pydocstyle * development
  • pylint * development
  • pyroma * development
  • pytest * development
  • rstcheck * development
  • scipy * development
  • tox * development
requirements.txt pypi
  • matplotlib *
  • numpy *
  • scipy *
.github/workflows/test.yml actions
  • actions/checkout v3 composite
  • actions/setup-node v3 composite
  • actions/setup-python v4 composite