1# http://pyrocko.org - GPLv3
2#
3# The Pyrocko Developers, 21st Century
4# ---|P------/S----------~Lg----------
6import numpy as num
7from pyrocko import util
8from ..base import Generator
11class TargetGenerator(Generator):
13 def get_time_range(self, sources):
14 '''
15 Get the target's time range.
17 In the easiest case this is the sources' time range, yet for waveform
18 targets we have to consider vmin, vmax
19 '''
20 times = num.array([source.time for source in sources],
21 dtype=util.get_time_dtype())
23 return num.min(times), num.max(times)
25 def get_targets(self):
26 '''
27 Returns a list of targets, used class-internally to forward model.
28 '''
29 return []
31 def get_stations(self):
32 return []
34 def get_onsets(self, engine, sources, tmin=None, tmax=None):
35 return []
37 def get_waveforms(self, engine, sources, tmin=None, tmax=None):
38 return []
40 def get_insar_scenes(self, engine, sources, tmin=None, tmax=None):
41 return []
43 def get_gnss_campaigns(self, engine, sources, tmin=None, tmax=None):
44 return []
46 def ensure_data(self, engine, sources, path, tmin=None, tmax=None):
47 pass
49 def add_map_artists(self, engine, sources, automap):
50 pass
53class NoiseGenerator(Generator):
54 pass