|
|
|
@ -348,12 +348,23 @@ class SourceInjector(Object):
|
|
|
|
|
mags = mt.magnitude if mt is not None else event.magnitude
|
|
|
|
|
mags = num.ones(nsamples) * mags
|
|
|
|
|
|
|
|
|
|
if gronf is not None and 'magnitude' in gronf.problem_config.ranges:
|
|
|
|
|
mg_range = gronf.problem_config.ranges['magnitude']
|
|
|
|
|
mags = self._state.uniform(
|
|
|
|
|
size=(nsamples,),
|
|
|
|
|
low=mg_range.start,
|
|
|
|
|
high=mg_range.stop)
|
|
|
|
|
durations = 0. if event.duration is None else num.ones(event.duration)
|
|
|
|
|
durations = num.ones(nsamples) * durations
|
|
|
|
|
|
|
|
|
|
if gronf is not None:
|
|
|
|
|
if 'magnitude' in gronf.problem_config.ranges:
|
|
|
|
|
mg_range = gronf.problem_config.ranges['magnitude']
|
|
|
|
|
mags = self._state.uniform(
|
|
|
|
|
size=(nsamples,),
|
|
|
|
|
low=mg_range.start,
|
|
|
|
|
high=mg_range.stop)
|
|
|
|
|
|
|
|
|
|
if 'duration' in gronf.problem_config.ranges:
|
|
|
|
|
dur_range = gronf.problem_config.ranges['duration']
|
|
|
|
|
durations = self._state.uniform(
|
|
|
|
|
size=(nsamples,),
|
|
|
|
|
low=dur_range.start,
|
|
|
|
|
high=dur_range.stop)
|
|
|
|
|
|
|
|
|
|
depth_min = store.config.source_depth_min
|
|
|
|
|
depth_max = store.config.source_depth_max
|
|
|
|
@ -409,7 +420,8 @@ class SourceInjector(Object):
|
|
|
|
|
dips,
|
|
|
|
|
rakes,
|
|
|
|
|
lengths,
|
|
|
|
|
widths]
|
|
|
|
|
widths,
|
|
|
|
|
durations]
|
|
|
|
|
|
|
|
|
|
dataset = num.zeros(shape=(nsamples, len(data)))
|
|
|
|
|
|
|
|
|
@ -761,9 +773,6 @@ class SourceInjector(Object):
|
|
|
|
|
if event.duration is not None and conf.time_reference == 'origin':
|
|
|
|
|
base_source.time += event.duration / 2.
|
|
|
|
|
|
|
|
|
|
base_source.stf = gf.HalfSinusoidSTF(
|
|
|
|
|
duration=event.duration or 0.0)
|
|
|
|
|
|
|
|
|
|
payload = [(
|
|
|
|
|
dataset[i, 0],
|
|
|
|
|
dataset[i, 1],
|
|
|
|
@ -772,7 +781,8 @@ class SourceInjector(Object):
|
|
|
|
|
dataset[i, 4],
|
|
|
|
|
dataset[i, 5],
|
|
|
|
|
dataset[i, 6],
|
|
|
|
|
dataset[i, 7])
|
|
|
|
|
dataset[i, 7],
|
|
|
|
|
dataset[i, 10])
|
|
|
|
|
for i in range(dataset.shape[0])]
|
|
|
|
|
|
|
|
|
|
payload = list(set(payload))
|
|
|
|
@ -792,6 +802,8 @@ class SourceInjector(Object):
|
|
|
|
|
depth=p[3],
|
|
|
|
|
m6=mt_src.m6())
|
|
|
|
|
|
|
|
|
|
source.stf = gf.HalfSinusoidSTF(duration=p[8])
|
|
|
|
|
|
|
|
|
|
sources.append(source)
|
|
|
|
|
|
|
|
|
|
return sources
|
|
|
|
|