Commit 8b56a371 authored by Marius Kriegerowski's avatar Marius Kriegerowski
Browse files

cross-check receivers and pile content

parent 59c4ebe6
......@@ -13,6 +13,33 @@ from lassie import common, plot, grid as gridmod
logger = logging.getLogger('lassie.core')
def check_data_consistency(p, receivers):
nslc_ids = p.nslc_ids.keys()
nsl_ids = [nslc_id[:3] for nslc_id in nslc_ids]
r_ids = [ for r in receivers]
r_not_in_p = []
t_not_in_r = []
for r in receivers:
if[:3] not in nsl_ids:
for nsl_id in nsl_ids:
if nsl_id not in r_ids:
if len(r_not_in_p) != 0.:
logger.warn('following receivers have no traces in data set:')
for nsl_id in r_not_in_p:
if len(t_not_in_r) != 0.:
logger.warn('following traces have no associated receivers:')
for nsl_id in t_not_in_r:
def scan(
......@@ -68,6 +95,8 @@ def scan(
if p.is_empty():
raise common.LassieError('no usable waveforms found')
check_data_consistency(p, receivers)
ngridpoints = grid.size()
idetection = 0
Supports Markdown
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