Skip to main content

Reflectance models in python

Project description

Contributors Forks Stargazers Issues License: MIT


refmod

A Python library for the Hapke photometric model, used for modeling light scattering from surfaces.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

refmod is a Python library dedicated to the Hapke photometric model, a widely used model in planetary science and remote sensing to describe the scattering of light from particulate surfaces.

The Hapke model, developed by Bruce Hapke, provides a theoretical framework to relate the observed reflectance of a surface to its physical properties, such as particle size, compaction, and single-scattering albedo. It accounts for various phenomena like opposition effect, shadow hiding, and multiple scattering.

refmod offers Python implementations of:

  • The core Hapke reflectance equations.
  • Various scattering functions (e.g., Legendre polynomials, Henyey-Greenstein).
  • Functions to model the opposition effect.
  • Utilities for common calculations and parameter conversions.

This library aims to provide researchers and students with an easy-to-use and well-documented tool for applying the Hapke model in their work.

(back to top)

Built With

  • Python
  • NumPy

(back to top)

Getting Started

To get refmod up and running on your local machine, follow these simple steps.

Prerequisites

Ensure you have Python installed (version 3.6 or higher is recommended). You will also need pip to install packages.

Installation

You can install refmod directly from PyPI:

pip install refmod

(back to top)

Usage

Here's a basic example of how to use refmod to calculate reflectance:

import refmod
import numpy as np

# Define Hapke parameters
incidence_angle = 30  # degrees
emission_angle = 0    # degrees
phase_angle = 30      # degrees
ssa = 0.8             # single scattering albedo
# ... other parameters like Henyey-Greenstein asymmetry parameter, porosity, etc.

# Calculate reflectance
# reflectance = refmod.hapke_isotropic(incidence_angle, emission_angle, phase_angle, ssa) # Example function
# print(f"Reflectance: {reflectance}")

For more detailed examples, please refer to the Documentation

(back to top)

Roadmap

  • Core Hapke model implementation.
  • Implementation of common scattering phase functions.
  • Functions for opposition effect modeling.
  • lumax: Subpackage with JAX-based functions for GPU acceleration and automatic differentiation.
  • lumba: Subpackage with Numba-jitted functions for performance enhancement on CPU.
  • Comprehensive test suite.
  • Detailed documentation and example notebooks.

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for details.

(back to top)

Contact

Project Link: https://github.com/arunoruto/reflectance-models

(back to top)

Acknowledgments

  • Hapke, B. (1981). Bidirectional reflectance spectroscopy: 1. Theory. Journal of Geophysical Research: Solid Earth, 86(B4), 3039-3054.
  • Hapke, B. (1993). Theory of reflectance and emittance spectroscopy. Cambridge university press.
  • Hapke, B. (2002). Bidirectional reflectance spectroscopy: 5. The coherent backscatter opposition effect and anisotropic scattering. Icarus, 157(2), 523-534.
  • Hapke, B. (2012). Theory of reflectance and emittance spectroscopy (2nd ed.). Cambridge University Press.

(back to top)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

refmod-0.2.0.tar.gz (66.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

refmod-0.2.0-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file refmod-0.2.0.tar.gz.

File metadata

  • Download URL: refmod-0.2.0.tar.gz
  • Upload date:
  • Size: 66.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.15

File hashes

Hashes for refmod-0.2.0.tar.gz
Algorithm Hash digest
SHA256 071c4b06bad74a259592be9bab39db26ea0cfd7d14b6b1840f900d28fba53fd3
MD5 c1d7d14df8a4a05d29b409518ef8c44e
BLAKE2b-256 4cbc6ca6946318df86f00a79b05f182e2059bb64c00dc96a8446a54609d2b9aa

See more details on using hashes here.

File details

Details for the file refmod-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: refmod-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 21.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.15

File hashes

Hashes for refmod-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0777d7fb08abed65fa8001b193c939859ae10aafd55755a6628b81ff2e3a1b0a
MD5 ab9b1fd29c333c093e961cbf2d1bcc59
BLAKE2b-256 39a7caef1bf8d6aef8bdcf429c09e7fd68ee888dccaae51ec076b22118c26461

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page