IndexError: cannot do a non-empty take from an empty axes.
This happens in case COREG_LOCAL cannot find a single match:
Calculating footprint polygon and actual data corner coordinates for reference image...
Bounding box of calculated footprint for reference image:
(632070.0, 5709840.0, 691020.0, 5767800.0)
Calculating footprint polygon and actual data corner coordinates for image to be shifted...
Polygonize progress |==================================================| 100.0% Complete => 0:00:00
Bounding box of calculated footprint for image to be shifted:
(634155.0, 5765145.0, 644715.0, 5767815.0)
Matching window position (X,Y): 640951.0959692898/5766910.7005758155
Target window size (256, 256) not possible due to too small overlap area or window position too close to an image edge. New matching window size: (50, 48).
Initializing tie points grid...
Calculating tie point grid (4 points) using 32 CPU cores...
progress: |==================================================| 100.0% Complete => 0:00:00
Found 0 matches.
Performing validity checks...
../findr_homo/homogenization/homogenizer.py:185: in homogenize_landsat8
self._run_homogenization(l8, paths_ref_ims, path_outdir)
../findr_homo/homogenization/homogenizer.py:143: in _run_homogenization
.apply_spatial_homogenization(
../findr_homo/homogenization/spatial.py:105: in apply_spatial_homogenization
self._CRL.calculate_spatial_shifts()
../../../../mambaforge/envs/findr_homo/lib/python3.11/site-packages/arosics/CoReg_local.py:490: in calculate_spatial_shifts
self._tiepoint_grid.get_CoRegPoints_table()
../../../../mambaforge/envs/findr_homo/lib/python3.11/site-packages/arosics/Tie_Point_Grid.py:446: in get_CoRegPoints_table
GDF_filt, new_columns = TPR.run_filtering(level=self.tieP_filter_level)
../../../../mambaforge/envs/findr_homo/lib/python3.11/site-packages/arosics/Tie_Point_Grid.py:1062: in run_filtering
perc40 = np.percentile(self.GDF.RELIABILITY, 40)
<__array_function__ internals>:200: in percentile
???
../../../../mambaforge/envs/findr_homo/lib/python3.11/site-packages/numpy/lib/function_base.py:4205: in percentile
return _quantile_unchecked(
../../../../mambaforge/envs/findr_homo/lib/python3.11/site-packages/numpy/lib/function_base.py:4473: in _quantile_unchecked
return _ureduce(a,
../../../../mambaforge/envs/findr_homo/lib/python3.11/site-packages/numpy/lib/function_base.py:3752: in _ureduce
r = func(a, **kwargs)
../../../../mambaforge/envs/findr_homo/lib/python3.11/site-packages/numpy/lib/function_base.py:4639: in _quantile_ureduce_func
result = _quantile(arr,
../../../../mambaforge/envs/findr_homo/lib/python3.11/site-packages/numpy/lib/function_base.py:4750: in _quantile
previous = np.take(arr, previous_indexes, axis=DATA_AXIS)
<__array_function__ internals>:200: in take
???
../../../../mambaforge/envs/findr_homo/lib/python3.11/site-packages/numpy/core/fromnumeric.py:190: in take
return _wrapfunc(a, 'take', indices, axis=axis, out=out, mode=mode)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
obj = array([], dtype=int64), method = 'take', args = (array(0),)
kwds = {'axis': 0, 'mode': 'raise', 'out': None}
bound = <built-in method take of numpy.ndarray object at 0x7f42e473b7b0>
def _wrapfunc(obj, method, *args, **kwds):
bound = getattr(obj, method, None)
if bound is None:
return _wrapit(obj, method, *args, **kwds)
try:
> return bound(*args, **kwds)
E IndexError: cannot do a non-empty take from an empty axes.
../../../../mambaforge/envs/findr_homo/lib/python3.11/site-packages/numpy/core/fromnumeric.py:57: IndexError
Process finished with exit code 1