HyBRIS
This package offers functions and tools to download and handle Sentinel-1 and Sentinel-2 time series, and calculate hybrid indices.
Optical, radar, and hybrid indices to detect farming practices in Europe
Laboratory of Geo-Information Science and Remote Sensing (GRS), Wageningen University & Research
Please refer to the research paper for more information.
Install
Using pip:
pip install hybris
Or using pixi:
pixi add --pypi hybris
Install optional dependencies
To download Sentinel-1 and -2 time series, Earth Engine must be installed. By installing the Google Earth Engine api and GeoPandas, your own shapefiles can be used for time-series download (through shp_to_ee()). To install these optional dependencies, run:
Using pip:
pip install hybris[gee]
Or using pixi:
pixi add --pypi hybris[gee]
Requirements
Google Earth Engine
A Google Earth Engine project is needed to download Sentinel-1 and -2 time series for your own georeferenced fields. You can follow this tutorial to set up your Google Earth Engine project.
Then, follow the examples/download_ts_example.py to make sure your project is authenticated and initialized:
import hybris
# Make sure to insert your ee-project
ee = hybris.initialize_ee('ee-yourprojectname') #Insert the name of your existing ee-project
print(hybris.is_initialized()) # should now be True
More info:
Quickstart
The example below reads prepared field-level CSV files, creates optical and radar indices, fuses them into a daily series, and detects farming events.
import hybris
#Select bands of interest for Sentinel-2 and Sentinel-1
bandsusedS2 = ["B1", "B2", "B3", "B4", "B5", "B6", "B7", "B8", "B8A", "B11", "B12"]
bandsusedS1 = ["VV", "VH", "angle"]
#Open Sentinel-2 file, remove NA, and add Vegetation Indices
s2 = hybris.add_vis(hybris.openSentinel2file("examples/data/Sentinel2_example.csv", bandsusedS2))
#Open Sentinel-1 file, remove NA, and add Vegetation Indices
s1 = hybris.add_vis_radar(hybris.openSentinel1file("examples/data/Sentinel1_example.csv", bandsusedS1))
#Calculate HyBRIS
hybrid = hybris.calculate_hybris_vectorized(s1, s2)
#Apply minMax method
maxima = hybris.find_maxima(hybrid)
minima = hybris.find_minima(hybrid)
# Identify growing seasons based on predicted minima
g_seasons = hybris.growing_seasons(maxima, minima)
# Add tillages to predictions
predictions = hybris.add_tillages(g_seasons, minima)
#Merge with predictions
hybrid = hybris.add_predictions(hybrid, predictions)
For a complete workflow including orbit selection, ground truth, and plots, run examples/hybris_example.py.
Load your own polygons!
This can be a shapefile (.shp) or a geopackage (.gpkg)
shapefile_path = 'local/path/to/your/shapefile.shp'
fields = hybris.shp_to_ee(shapefile_path) #fields is converted to an Earth Engine object: ee.FeatureCollection
Alternatively, you can also write the path of your GEE asset, if it is already loaded in your GEE account.
fields = ee.FeatureCollection('path/to/your/gee/asset')
Download the time series
Sentinel-1 and Sentinel-2 data are preprocessed and downloaded as .csv time series: one row per date, one column per band.
The download of preprocessed time series for a given field is wrapped in one line of code:
hybris.get_S1_one_field(fields, field_id, bandsusedS1, start, end, output_dir, id_column, True)
hybris.get_S2_one_field(fields, field_id, bandsusedS2, start, end, CLOUD_FILTER, output_dir, id_column, True)
For a complete workflow, follow examples/download_ts_example.py. The preprocessing and methodology is explained in detail in the research paper.
Method summary
The HyBRIS methodology combines one optical and one radar index into a daily, field-level time series. Here, Sentinel-2 observations of the Bare Soil Index (BSI) and Sentinel-1 VH/VV observations are normalized and aggregated with a temporally weighted mean within a +/-12-day window. Closer observations have greater influence, which helps bridge irregular acquisitions and sensor-specific gaps. A centered rolling mean is used alongside the unsmoothed series to detect local minima and maxima associated with sowing, harvest, and tillage.
The index is unitless and is intended to stabilize complementary signals, not to estimate a physically true variable. Because percentile normalization is computed over the selected observation period, the time range affects the index amplitude.
Repository layout
src/hybris/ Package implementation and public API
examples/ Runnable scripts and example input data
Dataset/ Research dataset and field-level time series
docs/ Figures and supporting documentation
tests/ Test for correctly importing the package
Examples
Research paper dataset
More information
Acknowledgements
The Sentinel-1 preprocessing pipeline is adapted from the gee_s1_ard Python API, which is used under the hood; see its instructions:
Source: https://github.com/adugnag/gee_s1_ard (python-api folder) — MIT License.
From: Mullissa, A.; Vollrath, A.; Odongo-Braun, C.; Slagter, B.; Balling, J.; Gou, Y.; Gorelick, N.; Reiche, J. Sentinel-1 SAR Backscatter Analysis Ready Data Preparation in Google Earth Engine. Remote Sens. 2021, 13, 1954. https://doi.org/10.3390/rs13101954
License
HyBRIS is released under the GNU Affero General Public License v3 or later (AGPLv3+).
Citation
Paolo Dal Lago, Lammert Kooistra, Nandika Tsendbazar, Kirsten de Beurs, "Optical, radar, and hybrid indices to detect farming practices in Europe," Remote Sensing of Environment, volume 344, 2026, 115553, DOI: https://doi.org/10.1016/j.rse.2026.115553.
Metadata
Release files for hybris 1.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 |
|---|---|---|---|---|
| hybris-1.0.tar.gz | 326.5 kB | Without provenance | Details for hybris-1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hybris-1.0-py3-none-any.whl | Python 3 | none | any | Details for hybris-1.0-py3-none-any.whl |
Total release size: 379.0 kB
Release files / hybris-1.0.tar.gz
| Download URL | hybris-1.0.tar.gz |
|---|---|
| Size | 326.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5f2ed96c272a797ee387b3d318f002c24eff09b12f21d10505a455b6ff5f637d
|
|
BLAKE2b-256 checksum How to use checksums |
e981b8c35a8d638b8a977b2d68f22a6fb2cf97434d3d15f29db9025ea084d0bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / hybris-1.0-py3-none-any.whl
| Download URL | hybris-1.0-py3-none-any.whl |
|---|---|
| Size | 52.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b1145d3352e21d91fef37bfa3cef21dcbd01338c130e4cc47306165010734609
|
|
BLAKE2b-256 checksum How to use checksums |
52fb86acb9d0941455cf27fc0eb40efe0141d34ea84df95453eb6360c58fcd3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for hybris 1.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.