Skip to content

Commit

Permalink
Unify argument names for RMSE plotting functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Pechnikov committed Jun 27, 2024
1 parent 4c5f1b8 commit f8deea1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pygmtsar/pygmtsar/Stack_sbas.py
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ def plot_velocity_los_mm(self, data, caption='Velocity, [mm/year]',
caption=caption, aspect=aspect, alpha=alpha,
quantile=quantile, vmin=vmin, vmax=vmax, symmetrical=symmetrical, **kwargs)

def plot_rmse(self, rmse, caption='RMSE, [rad]', cmap='turbo',
def plot_rmse(self, data, caption='RMSE, [rad]', cmap='turbo',
quantile=None, vmin=None, vmax=None, symmetrical=False, **kwargs):
import numpy as np
import matplotlib.pyplot as plt
Expand All @@ -1049,7 +1049,7 @@ def plot_rmse(self, rmse, caption='RMSE, [rad]', cmap='turbo',
assert vmin is None and vmax is None, "ERROR: arguments 'quantile' and 'vmin', 'vmax' cannot be used together"

if quantile is not None:
vmin, vmax = np.nanquantile(rmse, quantile)
vmin, vmax = np.nanquantile(data, quantile)

# define symmetrical boundaries
if symmetrical is True and vmax > 0:
Expand All @@ -1058,13 +1058,13 @@ def plot_rmse(self, rmse, caption='RMSE, [rad]', cmap='turbo',
vmax = minmax

plt.figure()
rmse.plot.imshow(cmap=cmap, vmin=vmin, vmax=vmax)
data.plot.imshow(cmap=cmap, vmin=vmin, vmax=vmax)
self.plot_AOI(**kwargs)
self.plot_POI(**kwargs)
plt.title(caption)

def plot_rmse_los_mm(self, rmse, caption='RMSE, [mm]', cmap='turbo',
def plot_rmse_los_mm(self, data, caption='RMSE, [mm]', cmap='turbo',
quantile=None, vmin=None, vmax=None, symmetrical=False, **kwargs):
self.plot_rmse(abs(self.los_displacement_mm(rmse)),
self.plot_rmse(abs(self.los_displacement_mm(data)),
caption=caption, cmap=cmap,
quantile=quantile, vmin=vmin, vmax=vmax, symmetrical=symmetrical, **kwargs)

0 comments on commit f8deea1

Please sign in to comment.