SkillAgentSearch skills...

PyRawS

Python for Raw Sentinel-2 data (PyRawS) is an open-source software providing utilities to open and process Sentinel 2 RAW data, which corresponds to a decompressed version of Level-0 data with additional metadata. The software is demonstrated on the first Sentinel-2 dataset containing raw data for warm temperature hotspots detection/classification.

Install / Use

/learn @ESA-PhiLab/PyRawS
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Docker Automated build GitHub last commit GitHub contributors GitHub issues GitHub pull requests Tests Python 3.8 Python 3.9 Python 3.10 PyPI Docs

(Disclaimer: This project is currently under development.)

PyRawS

News & Updates

  • [ ] #23
  • [x] #28
  • [ ] New Readme :tada: (23/03/2024)

About the project

Python for RAW Sentinel-2 data (PyRawS) is a powerful open-source Python package that provides a comprehensive set of tools for working with Sentinel-2 Raw data🔬. <sup id="fnref:1"><a href="#fn:1" class="footnote">1</a></sup> It provides utilities for coarse spatial bands coregistration, geo-referencing, data visualization📊, and image processing🖼️. The software is demonstrated on the first Sentinel-2 🛰️ Raw database for warm temperature hotspots 🔥 detection/classification, making it an ideal tool for a wide range of applications in remote sensing and earth observation🌍. The package is written in Python and is open source💻, making it easy to use and modify for your specific needs. The systme is based on pytorch, which be installed with CUDA support, to enable GPU acceleation. The use of PyRawS and ideas behind raw data is described in our paper G. Meoni, R. D. Prete, F. Serva, A. De Beusscher, O. Colin and N. Longépé, "Unlocking the Use of Raw Multispectral Earth Observation Imagery for Onboard Artificial Intelligence," in IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, vol. 17, pp. 12521-12537, 2024, doi: 10.1109/JSTARS.2024.3418891.

[!IMPORTANT] NB: What we call raw data in this project are Sentinel-2 data generated by the decompression and metadata addition of Sentinel-2 L0 data. Because of that, with the exception of the effects due to onboard equalization and lossy compression, they are the most similar version of the rawest form of data acquired by the satellite's sensors. Both the compression and equalization are applied onboard the satellite to reduce the amount of data transmitted to the ground station. For easy naming convention, this repo refer to the term "Raw" as the products decompressed with ancillary information appended. For further information browse our paper at https://arxiv.org/abs/2305.11891 <a href="#fnref:1" class="reversefootnote"></a></li>

[!NOTE]

YouTube Tutorial ⭐️

A demo showcasing PyRawS capabilities is available on the YouTube channel of Robin Cole Alt Text

Content of the repository

The PyRawS repository includes the following directories:

| Directory Name | Description | |----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | quickstart | Contains Jupyter notebooks for quick start: | | | 1. API demonstration: Notebook demonstrating PyRawS API. | | | 2. DB_creation: Notebook for automatic creation of a database for a target dataset. | | | 3. geographical_distribution: Notebook to display the geographical distribution of dataset events on a map. | | pyraws | Contains PyRawS package with the following subdirectories: | | | 1. database: Various PyRawS and other databases. | | | 2. raw: Includes Raw_event and Raw_granule classes for modeling Sentinel-2 Raw events and granules. | | | 3. l1: Contains L1_event and L1_tiles classes for modeling Sentinel-2 L1C events and tiles. | | | 4. utils: Utilities for the PYRAW package. | | resources | Contains various resources, such as images for the README. | | scripts_and_studies | Contains scripts and code for different studies related to the THRAWS dataset: | | | 1. coregistration_study: Utils for coregistration study and coarse coregistration technique. | | | 2. dataset_preparation: Scripts and files for designing THRAWS files, including data download and event selection. | | | 3. hta_detection_algorithms: Custom and simplified implementation of various high-thermal-anomalies-detection algorithms, including those used for designing the THRAWS dataset. | | | 4. runscripts: Runscripts and utils for cropping Sentinel-2 L1C tiles, generating images, and exporting tif. | | | 5. granules_filtering: Script for running and mapping cropped Sentinel-2 L1C tiles to corresponding Raw granules. | | | 6. download_thraws: Utility for downloading the THRAWS dataset from Zenodo. |

Installation

Install pyraws referring to the guide in here.

Sidenote: Sentinel-2 Raw granules and events

Alt Text

Downloading Sentinel-2 Raw data requires to specify a polygon surrounding the area of interest and a date. Given the pushbroom nature of the Sentinel-2 sensor, bands of data at Raw level do not look at the same area (i.e., they are not registered). Therefore,to be sure to collect all the band around an event (i.e., volcanic eruptions, wildfires) rectangular polygons centered on the events of area 28x10 $km^2$ are used (white rectangular in the image above). This leads to download all the Raw granules whose reference band (B02) interesects the polygon area. <br> The image above shows the footprint of the all the Sentinel-2 Raw granules that are downloaded for the eruption named "Etna_00" in our database by using the white rectangular polygon. We define the collection of Raw granules that are downloaded for each of the rows of our database "Sentinel-2 Raw event". <br> However, as you can see in the image above, most of the Sentinel-2 Raw granules in Etna_00 Sentinel-2 Raw event do not contain the volcanic eruption (big red spot) of interest (red rectangulars). Indeed, only the yellow and the pink rectangulars intersects or include part of the volcanic eruption. <br> In addition, the fact that one Raw granule intersects or include one event, this does not mean that the latter interesects or is included in all the bands of that Raw granule. In particular, since we use the bands [B8A, B11, B12] to detect wildfires and volcanic

View on GitHub
GitHub Stars90
CategoryDevelopment
Updated1mo ago
Forks9

Languages

Jupyter Notebook

Security Score

100/100

Audited on Feb 11, 2026

No findings