scenario
¶
The ScenarioGenerator (scenario.ScenarioGenerator
)¶
This module bundles the TargetGenerators
together.
Available Scenario Target Generators
-
class
ScenarioGenerator
(**kwargs)[source]¶ Bases:
pyrocko.scenario.base.LocationGenerator
Generator for synthetic seismo-geodetic scenarios.
-
♦
target_generators
¶ list
ofpyrocko.scenario.targets.base.TargetGenerator
objects, default:[]
Targets to spawn in the scenario.
-
♦
source_generator
¶ pyrocko.scenario.sources.base.SourceGenerator
, default:<pyrocko.scenario.sources.dcsource.DCSourceGenerator object at 0x7fa19b3fa5f8>
Sources to spawn in the scenario.
-
dump_data
(path, overwrite=False)[source]¶ Invoke generators and dump the complete scenario.
Parameters: Wrapper to call
prepare_data()
followed byensure_data()
with default arguments.
-
ensure_data
(path, tmin=None, tmax=None)[source]¶ Generate and output scenario content to files, as needed.
Parameters: - path (str) – Output directory
- tmin (timestamp, optional) – Start of time interval to generate
- tmax (timestamp, optional) – End of time interval to generate
This method only generates the files which are relevant for the given time interval, and which have not yet been generated. It is safe to call this method several times, for different time windows, as needed.
If no time interval is given, the origin times of the generated sources and signal propagation times are taken into account to estimate a reasonable default.
-
classmethod
initialize
(path, center_lat=None, center_lon=None, radius=None, targets=[<class 'pyrocko.scenario.targets.waveform.WaveformGenerator'>, <class 'pyrocko.scenario.targets.insar.InSARGenerator'>, <class 'pyrocko.scenario.targets.gnss_campaign.GNSSCampaignGenerator'>], force=False)[source]¶ Initialize a Scenario and create a
scenario.yml
Parameters: - path (str) – Path to create the scenerio in
- center_lat (float, optional) – Center latitude [deg]
- center_lon (float, optional) – Center longitude [deg]
- radius (float, optional) – Scenario’s radius in [m]
- targets (list of
pyrocko.scenario.TargetGenerator
objects, optional) – Targets to throw into scenario, defaults to AVAILABLE_TARGETS - force (bool) – If set to
True
, overwrite directory
Returns: Scenario
Return type: pyrocko.scenario.ScenarioGenerator
-
♦
The ScenarioCollection (scenario.ScenarioCollection
)¶
A collection acts like an archive for a
pyrocko.scenario.ScenarioGenerator
-
class
ScenarioCollectionItem
(**kwargs)[source]¶ Bases:
pyrocko.guts.Object
Undocumented.
-
♦
scenario_id
¶ builtins.str
(pyrocko.gf.meta.StringID
)
-
♦
time_created
¶ builtins.float
(pyrocko.guts.Timestamp
)
-
♦