Commit 05d3ee16 authored by Marius Kriegerowski's avatar Marius Kriegerowski
Browse files

snuffling: correct receiver locations

parent 88935f12
......@@ -2,6 +2,7 @@ import copy
import numpy as num
from pyrocko import util, gui_util, model, orthodrome, pile, snuffler
from pyrocko.snuffling import Snuffling, Param, Choice, Switch
from lassie import receiver
kind_default = '1 (green)'
......@@ -18,7 +19,7 @@ def detections_to_event_markers(fn_detections):
float(latpeak), float(lonpeak), float(xpeak), float(ypeak))
t = util.str_to_time("%s %s" % (t_d, t_t))
label = "%s-%s" % (i, apeak)
e = model.Event(lat=lat, lon=lon, depth=float(zpeak)*1000.,
e = model.Event(lat=lat, lon=lon, depth=float(zpeak),
name=label, time=t)
m = gui_util.EventMarker(e, kind=int(kind_default[0]))
......@@ -259,10 +260,12 @@ def snuffle(config):
receivers = config.get_receivers()
stations = set()
for r in receivers:
n, s, l =[:3]
stations.add(model.Station(, lon=r.lon,
network=n, station=s, location=l))
lats, lons = receiver.receivers_coords(receivers, system='latlon')
for ir, (lat, lon) in enumerate(zip(lats, lons)):
n, s, l = receivers[ir].codes[:3]
lat=lat, lon=lon, network=n, station=s, location=l))
paths = config.data_paths
p = pile.make_pile(paths=paths, fileformat='detect')
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