Commit 3f177960 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fixed KeyError 'ABS_SHIFT' in Tie_Point_Grid.plot_shift_distribution() in...


Fixed KeyError 'ABS_SHIFT' in  Tie_Point_Grid.plot_shift_distribution() in case no tie points have been found at all. Updated version info.
Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent 27e049c4
Pipeline #15623 passed with stages
in 2 minutes and 21 seconds
......@@ -479,6 +479,9 @@ class Tie_Point_Grid(object):
if unit not in ['m', 'px']:
raise ValueError("Parameter 'unit' must have the value 'm' (meters) or 'px' (pixels)! Got %s." % unit)
if self.CoRegPoints_table.empty:
raise RuntimeError('Shift distribution cannot be plotted because no tie points were found at all.')
tbl = self.CoRegPoints_table
tbl = tbl[tbl['ABS_SHIFT'] != self.outFillVal]
tbl_il = tbl[tbl['OUTLIER'] == 0].copy() if 'OUTLIER' in tbl.columns else tbl
......
......@@ -22,5 +22,5 @@
# with this program. If not, see <http://www.gnu.org/licenses/>.
__version__ = '1.2.2'
__versionalias__ = '2020-11-11_02'
__version__ = '1.2.3'
__versionalias__ = '2020-11-12_01'
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