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.1.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.1.0-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: refmod-0.1.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.1.0.tar.gz
Algorithm Hash digest
SHA256 67ec81182b2bbf46e8fa829900001ea36f9c028b19c99f877e582600996ffde4
MD5 e5882ef5dff8897d34fefa7384cad032
BLAKE2b-256 b58091fb105a454358533c307f8c72cb7f5dd26ee86c84f136cee5799f360135

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for refmod-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 858d16c5bf62187ac89563da56471092d787784e8a621baf1c38133283bc1137
MD5 45ecd7760948865899a54526997432d1
BLAKE2b-256 56480ed164e89abcbc10ed1a81526e301bdd6cd06b169d35404247b048f2307c

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