From a6c2d95d9797c12f232d90a57a3ac25329f69e12 Mon Sep 17 00:00:00 2001 From: Whyjay Zheng Date: Wed, 12 Jun 2019 17:22:38 -0400 Subject: [PATCH] Fixed small bugs --- Utilities/Python/UtilRaster.py | 3 ++- Utilities/Python/UtilXYZ.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Utilities/Python/UtilRaster.py b/Utilities/Python/UtilRaster.py index fd84f8a..a2cfd92 100644 --- a/Utilities/Python/UtilRaster.py +++ b/Utilities/Python/UtilRaster.py @@ -374,7 +374,8 @@ def ClippedByPolygon(self, polygon_shapefile): # PROBABLY HAVE TO CHANGE TO out_image[0] HERE # extract the valid values # and return them as a numpy 1-D array - return np.extract(clipped_data != nodata, clipped_data) + # return np.extract(clipped_data != nodata, clipped_data) + return clipped_data def GaussianHighPass(self, sigma=3, truncate=1.0): diff --git a/Utilities/Python/UtilXYZ.py b/Utilities/Python/UtilXYZ.py index 0ca5ec8..ae2b64b 100644 --- a/Utilities/Python/UtilXYZ.py +++ b/Utilities/Python/UtilXYZ.py @@ -48,8 +48,8 @@ def OutlierDetection2D(self, thres_sigma=3.0, plot=True): plt.axis('scaled') plt.xlim([ax_center[0] - ax_halfwidth, ax_center[0] + ax_halfwidth]) plt.ylim([ax_center[1] - ax_halfwidth, ax_center[1] + ax_halfwidth]) - plt.ylabel('Offset-X (pixels)') - plt.xlabel('Offset-Y (pixels)') + plt.ylabel('Offset-Y (pixels)') + plt.xlabel('Offset-X (pixels)') plt.subplot(122) plt.scatter(x, y, c=z, **pt_style) plt.scatter(x[~idx], y[~idx], c='xkcd:red', **pt_style)