Skip to main content

A package for downscaling Sentinel-3 LST data using a scale-invariance-based model.

Project description

s3lst-ds: a package for downscaling Sentinel-3 LST data using a scale-invariance-based model

PyPI Version PyPI Python Version PyPI License PyPI Implementation PyPI Wheel PyPI Status GitHub last commit uv Ruff Hatch project

s3lst-ds provides pipelines for conveniently querying, downloading, filtering and downscaling Sentinel-3 LST data using either single or multi-timestamp scale-invariance-based models.

(Base) Installation

  • Install the latest stable release from PyPI in the activated virtual environment using pip command:

    pip install s3lst-ds
    

    or uv:

    uv add s3lst-ds
    

Set CDSE credentials

CDSE credentials are required to download the Sentinel-3 data and must be safely set as environment variables in the system. This may be done through an appropriate script, either using the respective executable:

VENV/bin/s3lst-ds-set-cdse

(where VENV is the path to the installation directory of the virtual environment (e.g. .venv)), or, more conveniently, using uv:

uv run s3lst-ds-set-cdse

[!NOTE] The credentials will be written to file ~/.config/cdse_credentials.sh with read and write permissions solely issued to the user.

Note that if the user would like to remove the credentials at a later time, an appropriate script could be run through the respective excutable:

VENV/bin/s3lst-ds-unset-cdse

or, using uv:

uv run s3lst-ds-unset-cdse

(Optional) Snappy Installation

The base installation considers rioxarray for georeferencing the Sentinel-3 products. However, snappy has been found to produce better results, and, because of that, it is herein availed as an optional tool. The installation of this extra dependency requires two steps, in the following order:

  1. Installation of the snappy Python package using pip:

    pip install s3lst-ds[snap]
    

    or uv:

    uv add s3lst-ds[snap]
    
  2. Installation of the backend SNAP Java package and subsequent configuration using the respective executable:

    VENV/bin/s3lst-ds-install-snap
    

    or, more conveniently, using uv:

    uv run s3lst-ds-install-snap
    

[!WARNING] It is important to note that SNAP is configured with a limited amount of memory. To increase SNAP's maximum heap memory to for instance 64 GB, one would need to open file esa_snappy.ini nested in the installation directory of the virtual environment (herein assumed to be VENV) by doing

nano VENV/lib/python3.12/site-packages/esa_snappy/esa_snappy.ini

and writing in it:

[DEFAULT]
java_max_mem: 64G

[!NOTE] If the user would to like to uninstall SNAP at a later time, an appropriate script may be used, either through the respective executable:

VENV/bin/s3lst-ds-uninstall-snap

or, more conveniently, using uv:

uv run s3lst-ds-uninstall-snap

Documentation

To be built.

Development

Installation of development dependencies

  • Create the development environment using all dependency groups:

    uv sync --all-groups
    

Linting

  • Use ruff for Python linting:

    uv run ruff check --fix --diff
    

    The command above will check for bugs, suspicious code, style violations, dead code, complexity issues and import problems. It will further proposed fixes.

  • Apply the fixes:

    uv run ruff check --fix
    

Formatting

  • Use ruff for Python formatting:

    uv run ruff format --diff
    

    The command above will check the code structure, namely, the indentation, spaces, line breaks, quote style and long line wrapping. It will further show the proposed changes.

  • Apply the changes:

    uv run ruff format
    

License

Pingi is licensed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

s3lst_ds-0.1.1.tar.gz (218.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

s3lst_ds-0.1.1-py3-none-any.whl (157.6 kB view details)

Uploaded Python 3

File details

Details for the file s3lst_ds-0.1.1.tar.gz.

File metadata

  • Download URL: s3lst_ds-0.1.1.tar.gz
  • Upload date:
  • Size: 218.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for s3lst_ds-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5aa63bc9804751c050fd3a523ae771699e2a3da3fbddc2d38d50e048f924d5b0
MD5 f7046b6cb8e3ec350659aac84f2aa880
BLAKE2b-256 080646969f9a0c11708be0d61ddad298c0aaf2fb8a63ba8cbcef03232bc22b88

See more details on using hashes here.

File details

Details for the file s3lst_ds-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: s3lst_ds-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 157.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for s3lst_ds-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e3abbf1a0074ab36ed67a833ba1de533150e460500960187b82153cca5770554
MD5 cccb7576c792be232fec128130a74704
BLAKE2b-256 772e2d21ce295efc1fce11f0fdded9c9234382cae5cfa8c315e89ecb852a6bda

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page