Commit a9c4141e authored by Sebastian Heimann's avatar Sebastian Heimann
Browse files

Merge branch 'master' of gitext:heimann/lassie

Conflicts:
	src/core.py
	src/ifc.py
parents 84ef3e61 52a26796
......@@ -35,7 +35,7 @@ subcommand_descriptions = {
subcommand_usages = {
'init': 'init',
'scan': 'scan <configfile> [options]',
'map-geometry': 'map-geometry <configfile> [options]',
'map-geometry': 'map-geometry <configfile> [options] <output.(png|pdf)',
'snuffle': 'snuffle <configfile>',
}
......
import logging
from pyrocko.guts import Object, String, Float, Timestamp, List, Bool, load
from pyrocko.guts import Object, String, Float, Timestamp, List, Bool
from pyrocko.guts import load
from pyrocko import model
from pyrocko.fdsn import station as fs
from pyrocko.gf import TPDef
......
......@@ -67,6 +67,12 @@ class IFC(Object):
def get_table(self, grid, receivers):
return self.shifter.get_table(grid, receivers)
weights = Dict.T(
String.T(),
Float.T(),
optional=True,
help='give weight (default is 1) to selected stations.')
def get_tpad(self):
return 4. / self.fmin
......@@ -111,6 +117,7 @@ class WavePacketIFC(IFC):
fsmooth = Float.T(optional=True)
fsmooth_factor = Float.T(default=0.1)
trace_selector = TraceSelector.T(optional=True)
def get_tpad(self):
return 4. / self.get_fsmooth()
......@@ -127,6 +134,9 @@ class WavePacketIFC(IFC):
def preprocess(self, trs, wmin, wmax, tpad_new, deltat_cf):
fsmooth = self.get_fsmooth()
if self.trace_selector:
trs = self.trace_selector(trs)
if not trs:
return []
......@@ -554,4 +564,5 @@ __all__ = [
'WavePacketIFC',
'OnsetIFC',
'TemplateMatchingIFC',
'TraceSelector',
]
......@@ -34,8 +34,9 @@ def map_gmt(
*map.jxyr)
if grid:
surf_points = grid.surface_points()
map.gmt.psxy(
in_columns=(grid.lons, grid.lats),
in_columns=(surf_points[1], surf_points[0]),
S='c1p',
G='black',
*map.jxyr)
......
Markdown is supported
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