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.
This commit is contained in:
parent
c502f26c88
commit
86819f6b4a
@ -180,8 +180,9 @@ def read_metadata(path_to_inventory):
|
|||||||
invtype = key_for_set_value(inv)
|
invtype = key_for_set_value(inv)
|
||||||
|
|
||||||
if invtype is None:
|
if invtype is None:
|
||||||
raise IOError("Neither dataless-SEED file, inventory-xml file nor "
|
print("Neither dataless-SEED file, inventory-xml file nor "
|
||||||
"RESP-file found!")
|
"RESP-file found!")
|
||||||
|
robj = None,
|
||||||
elif invtype == 'dless': # prevent multiple read of large dlsv
|
elif invtype == 'dless': # prevent multiple read of large dlsv
|
||||||
print("Reading metadata information from dataless-SEED file ...")
|
print("Reading metadata information from dataless-SEED file ...")
|
||||||
if len(inv[invtype]) == 1:
|
if len(inv[invtype]) == 1:
|
||||||
@ -250,6 +251,9 @@ def restitute_data(data, invtype, inobj, unit='VEL', force=False):
|
|||||||
else:
|
else:
|
||||||
finv = invlist[0]
|
finv = invlist[0]
|
||||||
inventory = read_inventory(finv, format='STATIONXML')
|
inventory = read_inventory(finv, format='STATIONXML')
|
||||||
|
elif invtype == None:
|
||||||
|
print("No restitution possible, as there are no station-meta data available!")
|
||||||
|
break
|
||||||
else:
|
else:
|
||||||
data.remove(tr)
|
data.remove(tr)
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user