1# http://pyrocko.org - GPLv3 

2# 

3# The Pyrocko Developers, 21st Century 

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

5 

6import numpy as num 

7from pyrocko import util 

8from ..base import Generator 

9 

10 

11class TargetGenerator(Generator): 

12 

13 def get_time_range(self, sources): 

14 ''' 

15 Get the target's time range. 

16 

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()) 

22 

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

24 

25 def get_targets(self): 

26 ''' 

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

28 ''' 

29 return [] 

30 

31 def get_stations(self): 

32 return [] 

33 

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

35 return [] 

36 

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

38 return [] 

39 

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

41 return [] 

42 

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

44 return [] 

45 

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

47 pass 

48 

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

50 pass 

51 

52 

53class NoiseGenerator(Generator): 

54 pass