pypro4sail
Python code for running ProspectD and 4SAIL Rasiative Transfer Models
Science Score: 57.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
Found 12 DOI reference(s) in README -
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.2%) to scientific vocabulary
Repository
Python code for running ProspectD and 4SAIL Rasiative Transfer Models
Basic Info
- Host: GitHub
- Owner: hectornieto
- License: gpl-3.0
- Language: Python
- Default Branch: master
- Size: 2.32 MB
Statistics
- Stars: 22
- Watchers: 1
- Forks: 9
- Open Issues: 2
- Releases: 6
Metadata Files
README.md
pyPro4Sail
Vectorized vesions of the ProspectD and 4SAIL Radiative Transfer Models for simulating the transmission of radiation in leaves and canopies.
Synopsis
This project contains Python code for Prospect and 4SAIL Radiative Transfer Models (RTM) for simulating the transmission of optical and thermal electromagnetic radiation through leaves and vegetated canopies.
The package also include helpers for inverting the models, either using gradient-based optimization algorithms or regression-based approaches based of forward simulations.
The project consists of:
lower-level modules with the basic functions needed in Prospec5 and 4SAIL RTMs.
higher-level scripts for easily running ProSAIL in both forward and inverse mode.
Installation
Download the project to your local system, enter the download directory and then type.
python setup.py install
if you want to install pyTSEB and its low-level modules in your Python distribution.
The following Python library ir required for running Prospect and 4SAIL:
- Numpy
In addition, the inversion of both RTMS requires.
Scipy
cma [Optional]
Code Example
High-level example
You can automatically run the coupled leaf+canopyt Prospect5+4SAIL RTM with pyPro4Sail.py module.
python
[N, chloro, caroten, brown, EWT, LMA, LAI, hot_spot, solar_zenith, solar_azimuth, view_zenith, view_azimuth, LIDF]=[1.5,40,8,0.0,0.01,0.009,3,0.01,30,180,10,180,(-0.35,-0.15)]
import pyPro4SAIL
wl,rho=pyPro4SAIL.run(N, chloro, caroten, brown, EWT, LMA, LAI, hot_spot, solar_zenith, solar_azimuth, view_zenith, view_azimuth, LIDF, skyl=0.2, soilType=pyPro4SAIL.DEFAULT_SOIL)
Also it is possible to simulate the surface land-leaving thermal radiance with the function run_TIR.
Low-level example
Prospect5 RTM
You can run Prospect by importing the module Prospect5.py and then either calling the function Prospect5
for simulating the full optical spectrum (400-2500nm), or the function Prospect5_wl for simulating
the leaf reflectance and transmittance for a given wavelength.
```python
Running Prospect5
import Prospect5
Simulate leaf full optical spectrum (400-2500nm)
wl, rholeaf, tauleaf = Prospect5.Prospect5(N, chloro, caroten, brown, EWT, LMA)
```
You can type
help(Prospect5.Prospect5)
to understand better the inputs needed and the outputs returned
4SAIL RTM
You can run 4SAIL by importing the module FourSAIL.py and then either calling the function FourSAIL
for simulating the reflectance and transmittance factor of a given canopy given a list of leaf reflectances
and trasmittances, or you can call the function FourSAIL_wl for simulating the leaf reflectance and transmittance
factor of a given canopy at for a single wavelenght.
```python
Running the coupled Prospect and 4SAIL
import Prospect5, FourSAIL
Simulate leaf full optical spectrum (400-2500nm)
wl, rholeaf, tauleaf = Prospect5.Prospect5(N, chloro, caroten, brown, EWT, LMA)
Estimate the Leaf Inclination Distribution Function of a canopy
LIDF = FourSAIL.CalcLIDF_Campbell(alpha)
Simulate leaf reflectance and transmittance factors of a canopy
tss,too,tsstoo,rdd,tdd,rsd,tsd,rdo,tdo,rso,rsos,rsod,rddt,rsdt,rdot,rsodt,rsost,rsot,gammasdf,gammasdb,gammasowl = FourSAIL.FourSAIL(LAI,hotspot,LIDF,solarzenith,viewzenith,solarazimuth-viewazimuth,rholeaf,tauleaf,rhosoil)
Simulate the canopy reflectance factor for a given difuse/total radiation condition (skyl)
rho_canopy = rdotskyl+rsot(1-skyl) ```
You can type
help(FourSAIL.FourSAIL)
to understand better the inputs needed and the outputs returned
Basic Contents
High-level modules
- .src/pyPro4SAIL.py > Runs the coupled Prospect5+4SAIL to estimate the canopy directional reflectance factor and 4SAIL to estimate the land-leaving broadband thermal radiance.
Low-level modules
The low-level modules in this project are aimed at providing customisation and more flexibility in running TSEB. The following modules are included.
.src/Prospect5.py
core functions for running Prospect5 Leaf Radiative Transfer Model.
.src/Prospect5Jacobian.py
core functions for computing the Jacobian of Prospect5 Leaf Radiative Transfer Model.
.src/FourSAIL.py
core functions for running 4SAIL Canopy Radiative Transfer Model.
.src/FourSAILJacobian.py
core functions for computing the Jacobian of 4SAIL Canopy Radiative Transfer Model.
.src/CostFunctionsPROSPECT4SAIL.py
merit functions used to invert Prospect and/or 4SAIL from a given spectrum
.src/cma.py
Covariance Matrix Adaptation Evolution Strategy optimization method for inverting Prospect5 and/or 4SAIL.
API Reference
http://pyPro4Sail.readthedocs.org/en/latest/index.html
Main Scientific References
- S. Jacquemoud, F. Baret, PROSPECT: A model of leaf optical properties spectra, Remote Sensing of Environment, Volume 34, Issue 2, November 1990, Pages 75-91, ISSN 0034-4257, http://dx.doi.org/10.1016/0034-4257(90)90100-Z.
- Jean-Baptiste Feret, Christophe François, Gregory P. Asner, Anatoly A. Gitelson, Roberta E. Martin, Luc P.R. Bidel, Susan L. Ustin, Guerric le Maire, Stéphane Jacquemoud, PROSPECT-4 and 5: Advances in the leaf optical properties model separating photosynthetic pigments, Remote Sensing of Environment, Volume 112, Issue 6, 16 June 2008, Pages 3030-3043, ISSN 0034-4257, http://dx.doi.org/10.1016/j.rse.2008.02.012.
- W. Verhoef, Light scattering by leaf layers with application to canopy reflectance modeling: The SAIL model, Remote Sensing of Environment, Volume 16, Issue 2, October 1984, Pages 125-141, ISSN 0034-4257, http://dx.doi.org/10.1016/0034-4257(84)90057-9.
- W. Verhoef, L. Jia, Q. Xiao and Z. Su, Unified Optical-Thermal Four-Stream Radiative Transfer Theory for Homogeneous Vegetation Canopies, IEEE Transactions on Geoscience and Remote Sensing, vol. 45, no. 6, pp. 1808-1822, June 2007. http://dx.doi.org/10.1109/TGRS.2007.895844.
Tests
to be included
Contributors
- Hector Nieto hnieto@ias.csic.es hector.nieto.solana@gmail.com main developer
- Radoslaw Guzinski
- Robin Wilson robin@rtwilson.com main developer of pyProSail https://github.com/robintw/PyProSAIL
License
pyPro4Sail: a Python Two Source Energy Balance Model
Copyright 2016 Hector Nieto and contributors.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Owner
- Name: Héctor Nieto
- Login: hectornieto
- Kind: user
- Location: Madrid
- Company: ICA-CSIC
- Website: https://www.ica.csic.es/index.php/en/
- Twitter: hn_sol
- Repositories: 29
- Profile: https://github.com/hectornieto
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Nieto" given-names: "Hector" orcid: "https://orcid.org/0000-0003-4250-6424" title: "pyPro4SAIL: Vectorized vesions of the Prospect5 and 4SAIL Radiative Transfer Models for simulating the transmission of radiation in leaves and canopies. " version: 1.2 doi: 10.5281/zenodo.11279249 date-released: 2025-02-07 url: "https://github.com/hectornieto/pypro4sail"
GitHub Events
Total
- Create event: 4
- Release event: 4
- Issues event: 2
- Watch event: 5
- Issue comment event: 2
- Push event: 7
- Pull request event: 1
- Fork event: 1
Last Year
- Create event: 4
- Release event: 4
- Issues event: 2
- Watch event: 5
- Issue comment event: 2
- Push event: 7
- Pull request event: 1
- Fork event: 1
Committers
Last synced: about 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| hectornieto | h****a@g****m | 140 |
| Héctor Nieto | h****o@i****t | 14 |
| Jofre | c****e@i****t | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 3
- Total pull requests: 1
- Average time to close issues: 3 days
- Average time to close pull requests: N/A
- Total issue authors: 3
- Total pull request authors: 1
- Average comments per issue: 1.67
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 1
- Average time to close issues: 2 days
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 1.0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- ddjustina (1)
- sdamn (1)
- 222huan (1)
Pull Request Authors
- diviningwater (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- numpy *
- scipy *