1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

# http://pyrocko.org - GPLv3 

# 

# The Pyrocko Developers, 21st Century 

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

from __future__ import absolute_import, division, print_function 

 

import numpy as num 

from ..base import Generator 

 

 

class TargetGenerator(Generator): 

 

def get_time_range(self, sources): 

''' Get the target's time range. 

 

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

targets we have to consider vmin, vmax 

''' 

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

dtype=num.float) 

 

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

 

def get_targets(self): 

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

''' 

return [] 

 

def get_stations(self): 

return [] 

 

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

return [] 

 

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

return [] 

 

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

return [] 

 

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

return [] 

 

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

pass 

 

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

pass 

 

 

class NoiseGenerator(Generator): 

pass