From 86819f6b4af12fa29e981248bfe1ee478903be35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludger=20K=C3=BCperkoch?= Date: Wed, 25 Jan 2017 14:02:14 +0100 Subject: [PATCH] In read_metadata: Removed raise IOError if no station-meta info are available, instead print info and leave parameters as None. In restitute_data: break if no station-meta info are available. --- pylot/core/util/dataprocessing.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pylot/core/util/dataprocessing.py b/pylot/core/util/dataprocessing.py index 61ecd2aa..5cac31d4 100644 --- a/pylot/core/util/dataprocessing.py +++ b/pylot/core/util/dataprocessing.py @@ -180,8 +180,9 @@ def read_metadata(path_to_inventory): invtype = key_for_set_value(inv) if invtype is None: - raise IOError("Neither dataless-SEED file, inventory-xml file nor " - "RESP-file found!") + print("Neither dataless-SEED file, inventory-xml file nor " + "RESP-file found!") + robj = None, elif invtype == 'dless': # prevent multiple read of large dlsv print("Reading metadata information from dataless-SEED file ...") if len(inv[invtype]) == 1: @@ -250,6 +251,9 @@ def restitute_data(data, invtype, inobj, unit='VEL', force=False): else: finv = invlist[0] inventory = read_inventory(finv, format='STATIONXML') + elif invtype == None: + print("No restitution possible, as there are no station-meta data available!") + break else: data.remove(tr) continue