1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
From: Antonio Valentino <antonio.valentino@tiscali.it>
Date: Mon, 22 Dec 2025 13:33:55 +0000
Subject: Fix dependencies
Forwarded: https://github.com/satim-co/PolSARpro/pull/5
---
polsarpro/util.py | 4 ++--
pyproject.toml | 6 +++++-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/polsarpro/util.py b/polsarpro/util.py
index 2d55649..8590e44 100644
--- a/polsarpro/util.py
+++ b/polsarpro/util.py
@@ -33,7 +33,6 @@ from scipy.ndimage import convolve
import dask.array as da
import xarray as xr
import xarray
-import matplotlib.pyplot as plt
from polsarpro.auxil import validate_dataset
log = logging.getLogger(__name__)
@@ -551,10 +550,11 @@ def plot_h_alpha_plane(ds, bins=500, min_pts=5):
bins (int): Number of bins along each dimension.
min_pts (int): If the number of points in one bin is less than this value, display is omitted.
"""
+ import matplotlib.pyplot as plt
if not ds.poltype == "h_a_alpha":
raise ValueError("Input must be a valid PolSARpro H/A/Alpha result.")
-
+
if not {"entropy", "alpha"}.issubset(ds.data_vars):
raise ValueError("Entropy or Alpha is missing from the input data.")
diff --git a/pyproject.toml b/pyproject.toml
index 158e537..02a597b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -7,11 +7,15 @@ name = "polsarpro"
version = "2025.12.1"
description = "Re-implementation of selected PolSARpro functions in Python, following the scientific recommendations of PolInSAR 2021."
requires-python = ">=3.12"
-dependencies = ["gdal", "rasterio", "geopandas", "pandas", "xarray", "netcdf4", "rioxarray", "dask", "bottleneck", "jupyter", "zarr", "pyyaml"]
+dependencies = ["pandas", "xarray", "dask", "scipy"]
[[project.authors]]
name = "Olivier D'Hondt"
email = "dhondt.olivier@gmail.com"
+[project.optional-dependencies]
+netcdf = ["netcdf4"]
+plotting = ["matplotlib"]
+
[tool.setuptools]
packages = [ "polsarpro"]
include-package-data = true
|