Feng Yin
Department of Geography, UCL
ucfafyi@ucl.ac.uk
Here, we use SIAC to do the atmospheric correction of Sentinel 2 TOA reflectance, then use inverse emulator to retrieve LAI from surface recflectance. These code will automatically download Sentinel 2 TOA reflectance data from Copernicus Open Access Hub and do atmospheric correction with SIAC and give per pixel LAI value at 20 meters resolution.
Requirements:
- A NASA Earthdata username and password and can be applied here.
- A Copernicus Open Access Hub username and password and can be applied here
Installation:
- Directly from github to get the most up to date version of it:
pip install https://github.com/MarcYin/S2_TOA_TO_LAI/archive/master.zip
- Using PyPI (This one is generally related to release)
pip install S2-TOA-TO-LAI
- Using anaconda from anaconda for 'better' package managements
conda install -c f0xy -c conda-forge s2-toa-to-lai
To save your time for installing GDAL:
conda uninstall gdal libgdal
conda update --all -c conda-forge
conda install -c conda-forge gdal>2.1,<2.4
Usage
- Using Sentinel 2 tiles directly:
from S2_TOA_TO_LAI import TOA2LAI_S2
TOA2LAI_S2(tiles = ['50SMG'], start='2018-01-02', end='2018-01-03')
- Using LatLon (Lat first then Lon) and this can be a 2D list of latlon:
from S2_TOA_TO_LAI import TOA2LAI_S2
TOA2LAI_S2(latlon = '35.4, 56.2', start='2018-01-02', end='2018-01-03')
- Using polygon from string(s) or (a) vector file(s):
from S2_TOA_TO_LAI import TOA2LAI_S2
aoi = 'POLYGON((115.79984234354565 39.41267418434987,115.81853363330639 39.41267418434987,115.81853363330639 39.42542974293974,115.79984234354565 39.42542974293974,115.79984234354565 39.41267418434987))' # or a vector file
TOA2LAI_S2(aoi = aoi, start='2018-01-02', end='2018-01-03')
You can also specify cloud_cover but this may lead to losing of S2 observations due to a bad cloud mask from L1C data
Metadata
Release files for S2-TOA-TO-LAI 2.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 |
|---|---|---|---|---|
| S2_TOA_TO_LAI-2.0.0.tar.gz | 133.6 kB | Without provenance | Details for S2_TOA_TO_LAI-2.0.0.tar.gz |
Release files / S2_TOA_TO_LAI-2.0.0.tar.gz
| Download URL | S2_TOA_TO_LAI-2.0.0.tar.gz |
|---|---|
| Size | 133.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bbf2a5b939904fa09d8e0bd17efb544ecaac95833ce0a89a51b371893dae90e3
|
|
BLAKE2b-256 checksum How to use checksums |
7854f82f1d4f562922b7d21940b31ba7bbec4cf3b525ffc619f91395c26b6742
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1.post20200802 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.11
|
Security for S2-TOA-TO-LAI 2.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.