Commit b20492bf authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fixed an issue causing SSIM computation to fail (due to float coordinates).

parent a8b71e9b
Pipeline #3314 failed with stages
in 1 minute and 48 seconds
......@@ -3,6 +3,7 @@
import collections
import time
import warnings
import numpy as np
# internal modules
from geoarray import GeoArray
......@@ -246,10 +247,11 @@ class DESHIFTER(object):
# snap clipextent to output grid
# (in case of odd input coords the output coords are moved INSIDE the input array)
xmin, ymin, xmax, ymax = self.clipextent
xmin = find_nearest(self.out_grid[0], xmin, roundAlg='on', extrapolate=True)
ymin = find_nearest(self.out_grid[1], ymin, roundAlg='on', extrapolate=True)
xmax = find_nearest(self.out_grid[0], xmax, roundAlg='off', extrapolate=True)
ymax = find_nearest(self.out_grid[1], ymax, roundAlg='off', extrapolate=True)
x_tol, y_tol = float(np.ptp(self.out_grid[0]) / 10000), float(np.ptp(self.out_grid[1]) / 10000) # 10.000th pix
xmin = find_nearest(self.out_grid[0], xmin, roundAlg='on', extrapolate=True, tolerance=x_tol)
ymin = find_nearest(self.out_grid[1], ymin, roundAlg='on', extrapolate=True, tolerance=y_tol)
xmax = find_nearest(self.out_grid[0], xmax, roundAlg='off', extrapolate=True, tolerance=x_tol)
ymax = find_nearest(self.out_grid[1], ymax, roundAlg='off', extrapolate=True, tolerance=y_tol)
return xmin, ymin, xmax, ymax
def correct_shifts(self):
......
......@@ -18,7 +18,7 @@ with open("arosics/version.py") as version_file:
exec(version_file.read(), version)
requirements = ['numpy', 'gdal', 'shapely', 'scikit-image', 'matplotlib', 'geopandas', 'geoarray>=0.8.0',
'py_tools_ds>=0.12.1', 'plotly', 'cmocean', 'six', 'folium>=0.6.0', 'geojson'
'py_tools_ds>=0.13.4', 'plotly', 'cmocean', 'six', 'folium>=0.6.0', 'geojson'
# 'pykrige' # conda install --yes -c conda-forge pykrige
# 'pyfftw', # conda install --yes -c conda-forge pyfftw=0.10.4 ; \
# 'basemap', # conda install --yes -c conda-forge basemap; \
......
......@@ -47,4 +47,4 @@ dependencies:
- cmocean
- plotly
- geoarray>=0.8.0
- py_tools_ds>=0.12.1
- py_tools_ds>=0.13.4
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment