Metadata-Version: 2.4
Name: isofit
Version: 4.0.0b0
Summary: Imaging Spectrometer Optimal FITting
Project-URL: repository, https://github.com/isofit/isofit
Project-URL: documentation, https://isofit.readthedocs.io/en/latest/index.html
Author-email: "David R. Thompson" <david.r.thompson@jpl.nasa.gov>, "Philip G. Brodrick" <philip.brodrick@jpl.nasa.gov>, Niklas Bohn <urs.n.bohn@jpl.nasa.gov>, Evan Greenberg <evan.greenberg@jpl.nasa.gov>, James Montgomery <J.Montgomery@jpl.nasa.gov>, Winston Olson-Duvall <winston.olson-duvall@jpl.nasa.gov>
Maintainer-email: "David R. Thompson" <david.r.thompson@jpl.nasa.gov>, "Philip G. Brodrick" <philip.brodrick@jpl.nasa.gov>, Niklas Bohn <urs.n.bohn@jpl.nasa.gov>, Evan Greenberg <evan.greenberg@jpl.nasa.gov>, James Montgomery <J.Montgomery@jpl.nasa.gov>
License: 
                                        Apache License
                                   Version 2.0, January 2004
                                http://www.apache.org/licenses/
        
           TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
        
           1. Definitions.
        
              "License" shall mean the terms and conditions for use, reproduction,
              and distribution as defined by Sections 1 through 9 of this document.
        
              "Licensor" shall mean the copyright owner or entity authorized by
              the copyright owner that is granting the License.
        
              "Legal Entity" shall mean the union of the acting entity and all
              other entities that control, are controlled by, or are under common
              control with that entity. For the purposes of this definition,
              "control" means (i) the power, direct or indirect, to cause the
              direction or management of such entity, whether by contract or
              otherwise, or (ii) ownership of fifty percent (50%) or more of the
              outstanding shares, or (iii) beneficial ownership of such entity.
        
              "You" (or "Your") shall mean an individual or Legal Entity
              exercising permissions granted by this License.
        
              "Source" form shall mean the preferred form for making modifications,
              including but not limited to software source code, documentation
              source, and configuration files.
        
              "Object" form shall mean any form resulting from mechanical
              transformation or translation of a Source form, including but
              not limited to compiled object code, generated documentation,
              and conversions to other media types.
        
              "Work" shall mean the work of authorship, whether in Source or
              Object form, made available under the License, as indicated by a
              copyright notice that is included in or attached to the work
              (an example is provided in the Appendix below).
        
              "Derivative Works" shall mean any work, whether in Source or Object
              form, that is based on (or derived from) the Work and for which the
              editorial revisions, annotations, elaborations, or other modifications
              represent, as a whole, an original work of authorship. For the purposes
              of this License, Derivative Works shall not include works that remain
              separable from, or merely link (or bind by name) to the interfaces of,
              the Work and Derivative Works thereof.
        
              "Contribution" shall mean any work of authorship, including
              the original version of the Work and any modifications or additions
              to that Work or Derivative Works thereof, that is intentionally
              submitted to Licensor for inclusion in the Work by the copyright owner
              or by an individual or Legal Entity authorized to submit on behalf of
              the copyright owner. For the purposes of this definition, "submitted"
              means any form of electronic, verbal, or written communication sent
              to the Licensor or its representatives, including but not limited to
              communication on electronic mailing lists, source code control systems,
              and issue tracking systems that are managed by, or on behalf of, the
              Licensor for the purpose of discussing and improving the Work, but
              excluding communication that is conspicuously marked or otherwise
              designated in writing by the copyright owner as "Not a Contribution."
        
              "Contributor" shall mean Licensor and any individual or Legal Entity
              on behalf of whom a Contribution has been received by Licensor and
              subsequently incorporated within the Work.
        
           2. Grant of Copyright License. Subject to the terms and conditions of
              this License, each Contributor hereby grants to You a perpetual,
              worldwide, non-exclusive, no-charge, royalty-free, irrevocable
              copyright license to reproduce, prepare Derivative Works of,
              publicly display, publicly perform, sublicense, and distribute the
              Work and such Derivative Works in Source or Object form.
        
           3. Grant of Patent License. Subject to the terms and conditions of
              this License, each Contributor hereby grants to You a perpetual,
              worldwide, non-exclusive, no-charge, royalty-free, irrevocable
              (except as stated in this section) patent license to make, have made,
              use, offer to sell, sell, import, and otherwise transfer the Work,
              where such license applies only to those patent claims licensable
              by such Contributor that are necessarily infringed by their
              Contribution(s) alone or by combination of their Contribution(s)
              with the Work to which such Contribution(s) was submitted. If You
              institute patent litigation against any entity (including a
              cross-claim or counterclaim in a lawsuit) alleging that the Work
              or a Contribution incorporated within the Work constitutes direct
              or contributory patent infringement, then any patent licenses
              granted to You under this License for that Work shall terminate
              as of the date such litigation is filed.
        
           4. Redistribution. You may reproduce and distribute copies of the
              Work or Derivative Works thereof in any medium, with or without
              modifications, and in Source or Object form, provided that You
              meet the following conditions:
        
              (a) You must give any other recipients of the Work or
                  Derivative Works a copy of this License; and
        
              (b) You must cause any modified files to carry prominent notices
                  stating that You changed the files; and
        
              (c) You must retain, in the Source form of any Derivative Works
                  that You distribute, all copyright, patent, trademark, and
                  attribution notices from the Source form of the Work,
                  excluding those notices that do not pertain to any part of
                  the Derivative Works; and
        
              (d) If the Work includes a "NOTICE" text file as part of its
                  distribution, then any Derivative Works that You distribute must
                  include a readable copy of the attribution notices contained
                  within such NOTICE file, excluding those notices that do not
                  pertain to any part of the Derivative Works, in at least one
                  of the following places: within a NOTICE text file distributed
                  as part of the Derivative Works; within the Source form or
                  documentation, if provided along with the Derivative Works; or,
                  within a display generated by the Derivative Works, if and
                  wherever such third-party notices normally appear. The contents
                  of the NOTICE file are for informational purposes only and
                  do not modify the License. You may add Your own attribution
                  notices within Derivative Works that You distribute, alongside
                  or as an addendum to the NOTICE text from the Work, provided
                  that such additional attribution notices cannot be construed
                  as modifying the License.
        
              You may add Your own copyright statement to Your modifications and
              may provide additional or different license terms and conditions
              for use, reproduction, or distribution of Your modifications, or
              for any such Derivative Works as a whole, provided Your use,
              reproduction, and distribution of the Work otherwise complies with
              the conditions stated in this License.
        
           5. Submission of Contributions. Unless You explicitly state otherwise,
              any Contribution intentionally submitted for inclusion in the Work
              by You to the Licensor shall be under the terms and conditions of
              this License, without any additional terms or conditions.
              Notwithstanding the above, nothing herein shall supersede or modify
              the terms of any separate license agreement you may have executed
              with Licensor regarding such Contributions.
        
           6. Trademarks. This License does not grant permission to use the trade
              names, trademarks, service marks, or product names of the Licensor,
              except as required for reasonable and customary use in describing the
              origin of the Work and reproducing the content of the NOTICE file.
        
           7. Disclaimer of Warranty. Unless required by applicable law or
              agreed to in writing, Licensor provides the Work (and each
              Contributor provides its Contributions) on an "AS IS" BASIS,
              WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
              implied, including, without limitation, any warranties or conditions
              of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
              PARTICULAR PURPOSE. You are solely responsible for determining the
              appropriateness of using or redistributing the Work and assume any
              risks associated with Your exercise of permissions under this License.
        
           8. Limitation of Liability. In no event and under no legal theory,
              whether in tort (including negligence), contract, or otherwise,
              unless required by applicable law (such as deliberate and grossly
              negligent acts) or agreed to in writing, shall any Contributor be
              liable to You for damages, including any direct, indirect, special,
              incidental, or consequential damages of any character arising as a
              result of this License or out of the use or inability to use the
              Work (including but not limited to damages for loss of goodwill,
              work stoppage, computer failure or malfunction, or any and all
              other commercial damages or losses), even if such Contributor
              has been advised of the possibility of such damages.
        
           9. Accepting Warranty or Additional Liability. While redistributing
              the Work or Derivative Works thereof, You may choose to offer,
              and charge a fee for, acceptance of support, warranty, indemnity,
              or other liability obligations and/or rights consistent with this
              License. However, in accepting such obligations, You may act only
              on Your own behalf and on Your sole responsibility, not on behalf
              of any other Contributor, and only if You agree to indemnify,
              defend, and hold each Contributor harmless for any liability
              incurred by, or claims asserted against, such Contributor by reason
              of your accepting any such warranty or additional liability.
        
           END OF TERMS AND CONDITIONS
        
License-File: LICENSE
Keywords: isofit
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: <3.13,>=3.11
Requires-Dist: build>=1.5.0
Requires-Dist: click
Requires-Dist: dask
Requires-Dist: h5py<=3.14.0
Requires-Dist: netcdf4<1.7.4
Requires-Dist: numba
Requires-Dist: numpy>=1.20
Requires-Dist: pyyaml>=5.3.2
Requires-Dist: ray>=1.2.0
Requires-Dist: scikit-image>=0.17.0
Requires-Dist: scikit-learn>=0.19.1
Requires-Dist: scipy>=1.3.0
Requires-Dist: spectral>=0.19
Requires-Dist: torch
Requires-Dist: twine>=6.2.0
Requires-Dist: xarray
Requires-Dist: xxhash>=1.2.0
Requires-Dist: zarr>=3
Provides-Extra: dev
Requires-Dist: black; extra == 'dev'
Requires-Dist: isort; extra == 'dev'
Requires-Dist: pre-commit; extra == 'dev'
Provides-Extra: docker
Requires-Dist: ipykernel; extra == 'docker'
Requires-Dist: ipywidgets; extra == 'docker'
Requires-Dist: jupyterlab; extra == 'docker'
Requires-Dist: matplotlib; extra == 'docker'
Provides-Extra: docs
Requires-Dist: mike>=2.1.3; extra == 'docs'
Requires-Dist: mkapi>=4.5.0; extra == 'docs'
Requires-Dist: mkdocs-material[imaging]>=9.7.1; extra == 'docs'
Requires-Dist: mkdocs<2,>=1.6.1; extra == 'docs'
Provides-Extra: plots
Requires-Dist: isoplots; extra == 'plots'
Provides-Extra: test
Requires-Dist: pytest>=3.5.1; extra == 'test'
Description-Content-Type: text/markdown

# ISOFIT — Imaging Spectrometer Optimal FITting

[![Documentation](https://img.shields.io/static/v1?label=Docs&message=isofit.github.io&color=blue)](https://isofit.github.io/isofit/latest/)
[![PyPI version](https://img.shields.io/pypi/v/isofit.svg)](https://pypi.python.org/pypi/isofit)
[![conda-forge](https://img.shields.io/conda/vn/conda-forge/isofit.svg)](https://anaconda.org/conda-forge/isofit)
[![License](https://img.shields.io/pypi/l/isofit.svg)](https://github.com/isofit/isofit/blob/master/LICENSE)
[![Python versions](https://img.shields.io/pypi/pyversions/isofit.svg)](https://img.shields.io/pypi/pyversions/isofit.svg)
[![Downloads](https://static.pepy.tech/badge/isofit)](https://pepy.tech/project/isofit)
[![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.6908949-blue)](https://doi.org/10.5281/zenodo.6908949)

ISOFIT is a Python toolkit for retrieving surface reflectance, atmospheric state, and instrument calibration from imaging spectrometer radiance data. It is built around the [optimal estimation](https://isofit.github.io/isofit/latest/information/bibliography/) framework and is designed for flexibility — users can combine different radiative transfer models, surface priors, and uncertainty models to suit their sensors and science questions. The effort began with a straightforward optimal estimation [implementation](https://doi.org/10.1016/j.rse.2018.07.003), and has grown considerably - see the [bibilography](https://isofit.github.io/isofit/latest/information/bibliography/) for the latest science.

> ISOFIT is on version ![PyPI version](https://img.shields.io/pypi/v/isofit.svg).  Major revisions are not backwards compatible with one another due to updates to the configuration files.   See [Release History](https://github.com/isofit/isofit/releases) for older versions.


ISOFIT combines surface models, atmospheric radiative transfer, and instrument characteristics into a forward model.  This forward model is then solved by inverting relative to a measurement, via optimization or MCMC, to generate the Maximum a Posterior estimate of the joint surface and atmospheric state vector.


```
+-------------------------------------------------------------------------+
|                                 isofit                                  |
|                                                                         |
|  +--------+      +---------------+      +----------------------------+  |
|  |        |      |               |      |          forward           |  |
|  |   io   | ===> |   inversion   | <=== |                            |  |
|  |        |      |               |      | +----------+  +----------+ |  |
|  +--------+      +---------------+      | |atmosphere|  | surface  | |  |
|                          |              | +----------+  +----------+ |  |
|                          |              |                            |  |
|                          |              |       +------------+       |  |
|                          |              |       | instrument |       |  |
|                          |              |       +------------+       |  |
|                          |              +----------------------------+  |
|                          |                                              |
+--------------------------|----------------------------------------------+
                           |
                           | produces
                           v
   +-------------------------------------------------------------+
   |    Joint Surface, Instrument, & Atmospheric State Vector    |
   +-------------------------------------------------------------+
```

---

## Contents

- [Features](#features)
- [Installation](#installation)
- [Quick Start](#quick-start)
- [Examples](#examples)
- [Atmospheric Radiative Transfer Models](#atmospheric-radiative-transfer-models)
- [Documentation](#documentation)
- [Contributing](#contributing)
- [Citation](#citation)
- [License](#license)

---

## Components

| Capability | Details |
|---|---|
| **Radiative transfer** | MODTRAN, 6S, LibRadTran, sRTMnet neural-network emulator |
| **Surface models** | Multicomponent Gaussian, Glint, LUT, Emissive (thermal) |
| **Instrument models** | SNR, parametric noise, nonlinear response, and more |

---

## Installation

### Conda (recommended)

```bash
mamba create -n isofit_env -c conda-forge isofit
mamba activate isofit_env
```

[Full Installation Instructions](https://isofit.github.io/isofit/latest/getting_started/installation/)


For all options including developer installs, see the **[Installation guide](https://isofit.github.io/isofit/latest/getting_started/installation/)**.

---

## Quick Start

### 1. Download supporting data and build examples

```bash
isofit download all
isofit build
```

This fetches the sRTMnet emulator, 6S, surface libraries, and pre-configured example datasets into `~/.isofit/`.  For users that want a smaller or mosre custom download, see [Additional Data](https://isofit.github.io/isofit/latest/extra_downloads/data/) for customization.

### 2. Run an example to test

```bash
cd $(isofit path examples)/image_cube/small
bash default.sh
```

### 3. Start using!

Leverage the command line interface to build surface models, run isofit on scenes, or perform a wavelength calibration.  

To get going, you'll need a radiance image, a location file (with lat, lon, and elevation), and an observation file with sensor and solar geometry.  To get running, ISOFIT ships with both examples (all command line scripts) and tutorials (jupyter notebooks that annotate calls in python and the command line):

#### Tutorials
| Tutorial | Description |
|---|---|
| [apply_oe](https://isofit.github.io/isofit-tutorials/latest/notebooks/apply_oe/) | Full walkthrough of inputs and outputs of apply_oe |
| [single pixel inversion](https://isofit.github.io/isofit-tutorials/latest/notebooks/neon_single_pixel/) | Learn how to use isofit modules in your own code by building and executing individual modules on a single pixel |

#### Examples
| Example | Description |
|---|---|
| `image_cube/small` | Fast analytical retrieval — good first run |
| `20151026_SantaMonica` | AVIRIS-NG scene with 6S radiative transfer |
| `20171108_Pasadena` | Urban hyperspectral scene |
| `20190806_ThermalIR` | Thermal infrared joint VSWIR+TIR retrieval |
| `20231110_Prism_Multisurface` | Multi-component surface model |
| `NEON` | National Ecological Observatory Network data |
| `SeaBASS_prism_001` | Coastal / water target single-pixel case |

Full instructions for **[running examples](https://isofit.github.io/isofit/latest/examples/)**.

---

## Atmospheric Radiative Transfer Models

ISOFIT supports several atmospheric RTM backends.  The recommended starting point for new users is **sRTMnet**, a neural-network emulator that requires no licensed software:

- **[sRTMnet quickstart](https://isofit.github.io/isofit/latest/getting_started/quickstarts/srtmnet/)** — automatic install via `isofit download`
- **[MODTRAN quickstart](https://isofit.github.io/isofit/latest/getting_started/quickstarts/modtran/)** — requires a MODTRAN 6 licence
- **6S** — Second Simulation of a Satellite Signal in the Solar Spectrum vector code.  Automatic download and build with `isofit download`.
- **libRadtran** — library for radiative transfer.  Automatic download and build with `isofit download`.
- **Bring Your Own** — isofit can run with any LUT that complies with the luts/reader.py standards.  Adding a new radiative transfer model is also straightforward by extending the base [BaseAtmosphere](isofit/atmosphere/atmosphere.py) class.


## Contributing

Contributions are welcome — bug reports, tests, documentation, and new features.  
Please read the **[Contributing guide](https://isofit.github.io/isofit/latest/developers/contributing/)** before opening a pull request.

Active development happens on the [`dev`](https://github.com/isofit/isofit/tree/dev) branch.  
Issues and feature requests are tracked in the [issue tracker](https://github.com/isofit/isofit/issues).

---

## Citation

If you use ISOFIT in your work, please cite the relevant papers listed in the **[Bibliography](https://isofit.github.io/isofit/latest/information/bibliography/)**.  
Package citation information is in the [CITATION.cff](https://github.com/isofit/isofit/blob/dev/CITATION.cff) file.

---

## License

Apache License v2 — see [LICENSE](https://github.com/isofit/isofit/blob/master/LICENSE).

Images in this repository are licensed under [CC0](https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt).
