Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sebastian Heimann
lassie
Commits
b3bb2e54
Commit
b3bb2e54
authored
Apr 23, 2018
by
Marius Kriegerowski
Browse files
snuffling: handle missing marker files in ifc
parent
791535d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/snuffling.py
View file @
b3bb2e54
import
copy
import
copy
import
os
import
os
import
numpy
as
num
import
numpy
as
num
import
logging
from
pyrocko
import
util
,
model
,
orthodrome
,
pile
from
pyrocko
import
util
,
model
,
orthodrome
,
pile
from
pyrocko.gui
import
snuffler
from
pyrocko.gui
import
snuffler
from
pyrocko.gui
import
marker
as
pmarker
from
pyrocko.gui
import
marker
as
pmarker
...
@@ -9,6 +11,9 @@ from pyrocko.gui.snuffling import Snuffling, Param, Choice, Switch
...
@@ -9,6 +11,9 @@ from pyrocko.gui.snuffling import Snuffling, Param, Choice, Switch
from
lassie
import
geo
,
ifc
from
lassie
import
geo
,
ifc
logger
=
logging
.
getLogger
(
'lassie.snuffling'
)
kind_default
=
'1 (green)'
kind_default
=
'1 (green)'
...
@@ -280,7 +285,11 @@ def snuffle(config):
...
@@ -280,7 +285,11 @@ def snuffle(config):
elif
isinstance
(
_ifc
,
ifc
.
TemplateMatchingIFC
):
elif
isinstance
(
_ifc
,
ifc
.
TemplateMatchingIFC
):
markers_path_extra
=
_ifc
.
template_markers_path
markers_path_extra
=
_ifc
.
template_markers_path
s
.
add_markers
(
pmarker
.
load_markers
(
markers_path_extra
))
if
os
.
path
.
exists
(
markers_path_extra
):
s
.
add_markers
(
pmarker
.
load_markers
(
markers_path_extra
))
else
:
logger
.
warn
(
'No such file: %s (referenced in %s, named %s)'
%
(
markers_path_extra
,
_ifc
.
__class__
.
__name__
,
_ifc
.
name
))
receivers
=
config
.
get_receivers
()
receivers
=
config
.
get_receivers
()
stations
=
set
()
stations
=
set
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment