From af393d511808da21ba62f115ae71cddf9f89f207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludger=20K=C3=BCperkoch?= Date: Thu, 25 Jan 2018 11:34:37 +0100 Subject: [PATCH] Take into account that dip/azimut might be 0 when not available. --- pylot/RELEASE-VERSION | 2 +- pylot/core/util/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pylot/RELEASE-VERSION b/pylot/RELEASE-VERSION index 33a2193d..12afd1d6 100644 --- a/pylot/RELEASE-VERSION +++ b/pylot/RELEASE-VERSION @@ -1 +1 @@ -98f7-dirty +97de-dirty diff --git a/pylot/core/util/utils.py b/pylot/core/util/utils.py index 6de1e8e4..239f3c8d 100644 --- a/pylot/core/util/utils.py +++ b/pylot/core/util/utils.py @@ -977,7 +977,7 @@ def check4rotated(data, metadata=None, verbosity=1): dip = blockette_.dip azimut = blockette_.azimuth break - if dip is None or azimut is None: + if (dip is None or azimut is None) or (dip == 0 and azimut == 0): error_msg = 'Dip and azimuth not available for trace_id {}'.format(trace_id) raise ValueError(error_msg) return dip, azimut