Commit 523523ed authored by Sebastian Heimann's avatar Sebastian Heimann
Browse files

avoid import of gui_util to avoid hard dependency on qt

parent c0d17379
......@@ -14,7 +14,7 @@ import numpy as num
from pyrocko.guts import load, Object, String, Float, Int, Bool, List, \
StringChoice, Dict, Timestamp
from pyrocko import orthodrome as od, gf, trace, guts, util, weeding
from pyrocko import parimap, model, gui_util
from pyrocko import parimap, model, marker as pmarker
from pyrocko.guts_array import Array
from grond import dataset
......@@ -1545,7 +1545,7 @@ def forward(rundir_or_config_path, event_names=None):
markers = []
for ev in events:
markers.append(gui_util.EventMarker(ev))
markers.append(pmarker.EventMarker(ev))
trace.snuffle(all_trs, markers=markers, stations=ds.get_stations())
......
......@@ -3,7 +3,8 @@ import copy
import logging
from collections import defaultdict
import numpy as num
from pyrocko import util, pile, model, config, trace, snuffling, gui_util
from pyrocko import util, pile, model, config, trace, snuffling, \
marker as pmarker
from pyrocko.fdsn import enhanced_sacpz, station as fs
from pyrocko.guts import Object, Tuple, String, Float, dump_all, load_all
......@@ -207,7 +208,7 @@ class Dataset(object):
def add_picks(self, filename):
self.pick_markers.extend(
gui_util.load_markers(filename))
pmarker.load_markers(filename))
self._picks = None
......@@ -639,7 +640,7 @@ class Dataset(object):
hash_to_name = {}
names = set()
for marker in self.pick_markers:
if isinstance(marker, gui_util.EventMarker):
if isinstance(marker, pmarker.EventMarker):
name = marker.get_event().name
if name in names:
raise DatasetError(
......@@ -650,7 +651,7 @@ class Dataset(object):
picks = {}
for marker in self.pick_markers:
if isinstance(marker, gui_util.PhaseMarker):
if isinstance(marker, pmarker.PhaseMarker):
ehash = marker.get_event_hash()
nsl = marker.one_nslc()[:3]
......
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