Metadata-Version: 2.4
Name: grstbx
Version: 2.4.0
Summary: Visualization and post-processing of GRS (Glint Removal for Sentinel-2-like sensors) L2A and L2B images
Author-email: "T. Harmel" <tristan.harmel@gmail.com>
Project-URL: Repository, https://github.com/Tristanovsk/grstbx
Project-URL: Documentation, https://grstbx.readthedocs.io
Project-URL: Issues, https://github.com/Tristanovsk/grstbx/issues
Project-URL: GRS, https://github.com/Tristanovsk/grs
Keywords: Sentinel-2,Landsat,ocean color,remote sensing reflectance,water quality,sunglint,xarray,datacube
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: GIS
Classifier: Topic :: Scientific/Engineering :: Image Processing
Classifier: Framework :: Jupyter
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.24
Requires-Dist: scipy>=1.10
Requires-Dist: pandas>=2.0
Requires-Dist: xarray>=2025.6.1
Requires-Dist: dask[array]>=2024.1
Requires-Dist: zarr>=3
Requires-Dist: netCDF4>=1.6
Requires-Dist: importlib_resources>=5.10
Requires-Dist: affine>=2.4
Requires-Dist: pyproj>=3.6
Requires-Dist: shapely>=2.0
Requires-Dist: geopandas>=0.14
Requires-Dist: rasterio>=1.3
Requires-Dist: rioxarray>=0.15
Requires-Dist: matplotlib>=3.7
Requires-Dist: cartopy>=0.22
Requires-Dist: bokeh>=3.3
Requires-Dist: holoviews>=1.18
Requires-Dist: datashader>=0.16
Requires-Dist: colorcet>=3.0
Requires-Dist: cmocean>=3.0
Requires-Dist: param>=2.0
Requires-Dist: panel>=1.3
Requires-Dist: scikit-learn>=1.3
Provides-Extra: notebook
Requires-Dist: jupyterlab>=4; extra == "notebook"
Requires-Dist: ipykernel>=6; extra == "notebook"
Requires-Dist: jupyter_bokeh>=4; extra == "notebook"
Provides-Extra: regrid
Requires-Dist: xesmf>=0.8; extra == "regrid"
Provides-Extra: docs
Requires-Dist: sphinx>=7; extra == "docs"
Requires-Dist: sphinx-book-theme>=1.1; extra == "docs"
Requires-Dist: sphinx-copybutton; extra == "docs"
Requires-Dist: myst-nb>=1.0; extra == "docs"
Requires-Dist: linkify-it-py; extra == "docs"
Requires-Dist: ipython; extra == "docs"
Provides-Extra: all
Requires-Dist: grstbx[docs,notebook]; extra == "all"
Dynamic: license-file

# **grstbx**
## **Scientific code and notebooks to visualize and post-process GRS L2A and L2B images** 


## Example
![example gif](https://raw.githubusercontent.com/Tristanovsk/grstbx/main/illustration/grstbx_visual_tool.gif)

## Documentation

Tutorials and API reference: https://grstbx.readthedocs.io

## Installation

grstbx requires Python >= 3.11. Install it from [PyPI](https://pypi.org/project/grstbx/):

```
pip install grstbx                 # library and web dashboard (grstbx-viewer)
pip install "grstbx[notebook]"     # + JupyterLab environment for the notebooks
```

To run the notebooks of the repository or to develop grstbx, clone
[the repository](https://github.com/Tristanovsk/grstbx) and create the conda environment
(recommended: GDAL, PROJ and xesmf come from conda-forge), which also installs grstbx in editable mode:

```
git clone https://github.com/Tristanovsk/grstbx.git
cd grstbx
conda env create -f environment.yml
conda activate grstbx
```

or install the clone with pip in an existing environment:

```
pip install ".[notebook]"      # library + JupyterLab environment
pip install .                  # library only
pip install -e ".[notebook]"   # editable install, for development
```

| extra | content |
|---|---|
| `notebook` | JupyterLab, ipykernel, jupyter_bokeh |
| `regrid` | xesmf (`grstbx.utils.Reproj.regridding`), preferably `conda install -c conda-forge xesmf` |
| `docs` | Sphinx and extensions to build the documentation |
| `all` | `notebook` and `docs` |

The export of subsets (`grstbx.export_l2a`, `grstbx.crop_and_export`) uses the writers of
[GRS](https://github.com/Tristanovsk/grs): it needs `grs >= 3.0.1` in the same environment.

To register the environment as a Jupyter kernel:

```
python -m ipykernel install --user --name=grstbx
```

## Web dashboard

Explore GRS L2A and L2B products (Zarr or NetCDF, hGRS NetCDF), single images, time series or
datacubes, in the web browser, without notebook:

```
grstbx-viewer /path/to/product.zarr                  # or: grstbx-viewer --root /data/satellite
grstbx-viewer "/data/L2B/BEFR/2024/*/*/*.nc"         # time series of L2B products
```

Pan and zoom the images over a basemap, hover them to plot the spectrum (L2A) or the time series (L2B)
under the mouse, draw points and polygons, and download their values and statistics. See the
[dashboard tutorial](https://grstbx.readthedocs.io/en/latest/tutorials/dashboard.html).

## Example of L2A image

![example files](https://raw.githubusercontent.com/Tristanovsk/grstbx/main/illustration/le_leman_bleu.png)
