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
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.
Built With
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
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
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).
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!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE.txt for details.
Contact
Project Link: https://github.com/arunoruto/reflectance-models
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.
Metadata
Release files for refmod 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| refmod-1.0.0.tar.gz | 25.5 kB | Without provenance | Details for refmod-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| refmod-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for refmod-1.0.0-py3-none-any.whl |
Total release size: 57.2 kB
Release files / refmod-1.0.0.tar.gz
| Download URL | refmod-1.0.0.tar.gz |
|---|---|
| Size | 25.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc840e4ebf55340e41624a5efdd80a9f98e605133cab67bfae1b8d9dfd78e676
|
|
BLAKE2b-256 checksum How to use checksums |
a1ea54a0fc494b6b9d10042cf43a73b41fa5e9ebb872d2c405550ec7149f9138
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / refmod-1.0.0-py3-none-any.whl
| Download URL | refmod-1.0.0-py3-none-any.whl |
|---|---|
| Size | 31.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
639dd3d4630204e80ac68542b44e543462eb6592fcdb479efdd5e765edf87547
|
|
BLAKE2b-256 checksum How to use checksums |
4d6fa2c088cd615ad72508b53c2ac3aadbd9ac1c896ce572499a7728e8218047
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for refmod 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.