pygeoinf 1.2.4__tar.gz → 1.2.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/PKG-INFO +1 -1
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/pygeoinf/symmetric_space/sphere.py +31 -1
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/pyproject.toml +1 -1
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/LICENSE +0 -0
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/README.md +0 -0
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/pygeoinf/__init__.py +0 -0
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/pygeoinf/backus_gilbert.py +0 -0
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/pygeoinf/checks/hilbert_space.py +0 -0
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/pygeoinf/checks/linear_operators.py +0 -0
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/pygeoinf/checks/nonlinear_operators.py +0 -0
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/pygeoinf/direct_sum.py +0 -0
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/pygeoinf/forward_problem.py +0 -0
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/pygeoinf/gaussian_measure.py +0 -0
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/pygeoinf/hilbert_space.py +0 -0
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/pygeoinf/inversion.py +0 -0
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/pygeoinf/linear_bayesian.py +0 -0
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/pygeoinf/linear_forms.py +0 -0
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/pygeoinf/linear_operators.py +0 -0
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/pygeoinf/linear_optimisation.py +0 -0
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/pygeoinf/linear_solvers.py +0 -0
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/pygeoinf/nonlinear_forms.py +0 -0
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/pygeoinf/nonlinear_operators.py +0 -0
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/pygeoinf/nonlinear_optimisation.py +0 -0
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/pygeoinf/parallel.py +0 -0
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/pygeoinf/random_matrix.py +0 -0
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/pygeoinf/symmetric_space/__init__.py +0 -0
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/pygeoinf/symmetric_space/circle.py +0 -0
- {pygeoinf-1.2.4 → pygeoinf-1.2.5}/pygeoinf/symmetric_space/symmetric_space.py +0 -0
|
@@ -225,6 +225,9 @@ class SphereHelper:
|
|
|
225
225
|
map_extent: Optional[List[float]] = None,
|
|
226
226
|
gridlines: bool = True,
|
|
227
227
|
symmetric: bool = False,
|
|
228
|
+
contour_lines: bool = False,
|
|
229
|
+
contour_lines_kwargs: Optional[dict] = None,
|
|
230
|
+
num_levels: int = 10,
|
|
228
231
|
**kwargs,
|
|
229
232
|
) -> Tuple[Figure, "GeoAxes", Any]:
|
|
230
233
|
"""
|
|
@@ -241,6 +244,11 @@ class SphereHelper:
|
|
|
241
244
|
map_extent: A list `[lon_min, lon_max, lat_min, lat_max]` to set map bounds.
|
|
242
245
|
gridlines: If True, draws latitude/longitude gridlines.
|
|
243
246
|
symmetric: If True, centers the color scale symmetrically around zero.
|
|
247
|
+
contour_lines: If True, overlays contour lines on the plot.
|
|
248
|
+
contour_lines_kwargs: A dictionary of keyword arguments for styling the
|
|
249
|
+
contour lines (e.g., {'colors': 'k', 'linewidths': 0.5})
|
|
250
|
+
num_levels: The number of levels to generate automatically if `levels`
|
|
251
|
+
is not provided directly.
|
|
244
252
|
**kwargs: Additional keyword arguments forwarded to the plotting function
|
|
245
253
|
(`ax.contourf` or `ax.pcolormesh`).
|
|
246
254
|
|
|
@@ -269,9 +277,17 @@ class SphereHelper:
|
|
|
269
277
|
kwargs.setdefault("vmin", -data_max)
|
|
270
278
|
kwargs.setdefault("vmax", data_max)
|
|
271
279
|
|
|
272
|
-
|
|
280
|
+
if "levels" in kwargs:
|
|
281
|
+
levels = kwargs.pop("levels")
|
|
282
|
+
else:
|
|
283
|
+
vmin = kwargs.get("vmin", np.nanmin(u.data))
|
|
284
|
+
vmax = kwargs.get("vmax", np.nanmax(u.data))
|
|
285
|
+
levels = np.linspace(vmin, vmax, num_levels)
|
|
286
|
+
|
|
273
287
|
im: Any
|
|
274
288
|
if contour:
|
|
289
|
+
kwargs.pop("vmin", None)
|
|
290
|
+
kwargs.pop("vmax", None)
|
|
275
291
|
im = ax.contourf(
|
|
276
292
|
lons,
|
|
277
293
|
lats,
|
|
@@ -285,6 +301,20 @@ class SphereHelper:
|
|
|
285
301
|
lons, lats, u.data, transform=ccrs.PlateCarree(), **kwargs
|
|
286
302
|
)
|
|
287
303
|
|
|
304
|
+
if contour_lines:
|
|
305
|
+
cl_kwargs = contour_lines_kwargs if contour_lines_kwargs is not None else {}
|
|
306
|
+
cl_kwargs.setdefault("colors", "k")
|
|
307
|
+
cl_kwargs.setdefault("linewidths", 0.5)
|
|
308
|
+
|
|
309
|
+
ax.contour(
|
|
310
|
+
lons,
|
|
311
|
+
lats,
|
|
312
|
+
u.data,
|
|
313
|
+
transform=ccrs.PlateCarree(),
|
|
314
|
+
levels=levels,
|
|
315
|
+
**cl_kwargs,
|
|
316
|
+
)
|
|
317
|
+
|
|
288
318
|
if gridlines:
|
|
289
319
|
lat_interval = kwargs.pop("lat_interval", 30)
|
|
290
320
|
lon_interval = kwargs.pop("lon_interval", 30)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|