Implemented try-except in restitute_data to capture failed instrument correction. Additional output on screen.

This commit is contained in:
Ludger Küperkoch 2016-10-25 16:21:48 +02:00
parent b11a03af58
commit 4beae3bb2b

View File

@ -254,9 +254,15 @@ def restitute_data(data, invtype, inobj, unit='VEL', force=False):
data.remove(tr) data.remove(tr)
continue continue
# apply restitution to data # apply restitution to data
print("Correcting instrument at station %s" % tr.stats.station)
try: try:
if invtype in ['resp', 'dless']: if invtype in ['resp', 'dless']:
try:
tr.simulate(**kwargs) tr.simulate(**kwargs)
except ValueError as e:
vmsg = '{0}'.format(e)
print(vmsg)
else: else:
tr.attach_response(inventory) tr.attach_response(inventory)
tr.remove_response(output=unit, tr.remove_response(output=unit,