Skip to main content

Feng Yin

Department of Geography, UCL

ucfafyi@ucl.ac.uk

Build Status

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:

  1. A NASA Earthdata username and password and can be applied here.
  2. A Copernicus Open Access Hub username and password and can be applied here

Installation:

  1. 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
  1. Using PyPI (This one is generally related to release)
pip install S2-TOA-TO-LAI
  1. 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

  1. 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')
  1. 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')
  1. 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)

Source distribution for S2-TOA-TO-LAI 2.0.0
File Size Uploaded
S2_TOA_TO_LAI-2.0.0.tar.gz 133.6 kB Details

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

Release history Release notifications | RSS feed

This release

2.0.0 This release

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page