1# http://pyrocko.org - GPLv3 

2# 

3# The Pyrocko Developers, 21st Century 

4# ---|P------/S----------~Lg---------- 

5from __future__ import absolute_import, division, print_function 

6 

7import numpy as num 

8from pyrocko import util 

9from ..base import Generator 

10 

11 

12class TargetGenerator(Generator): 

13 

14 def get_time_range(self, sources): 

15 ''' 

16 Get the target's time range. 

17 

18 In the easiest case this is the sources' time range, yet for waveform 

19 targets we have to consider vmin, vmax 

20 ''' 

21 times = num.array([source.time for source in sources], 

22 dtype=util.get_time_dtype()) 

23 

24 return num.min(times), num.max(times) 

25 

26 def get_targets(self): 

27 ''' 

28 Returns a list of targets, used class-internally to forward model. 

29 ''' 

30 return [] 

31 

32 def get_stations(self): 

33 return [] 

34 

35 def get_onsets(self, engine, sources, tmin=None, tmax=None): 

36 return [] 

37 

38 def get_waveforms(self, engine, sources, tmin=None, tmax=None): 

39 return [] 

40 

41 def get_insar_scenes(self, engine, sources, tmin=None, tmax=None): 

42 return [] 

43 

44 def get_gnss_campaigns(self, engine, sources, tmin=None, tmax=None): 

45 return [] 

46 

47 def ensure_data(self, engine, sources, path, tmin=None, tmax=None): 

48 pass 

49 

50 def add_map_artists(self, engine, sources, automap): 

51 pass 

52 

53 

54class NoiseGenerator(Generator): 

55 pass