pyrocko.scenario.scenario¶
Implementation of the scenario generator’s main class.
Classes
|
Generator for synthetic seismo-geodetic scenarios. |
- class ScenarioGenerator(**kwargs)[source]¶
Bases:
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:DCSourceGenerator()
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 (
get_time_float()
) – Start of time interval to generatetmax (
get_time_float()
) – 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'>], stationxml=None, force=False)[source]¶
Initialize a Scenario and create a
scenario.yml
- Parameters:
path (str) – Path to create the scenerio in
center_lat (float) – Center latitude [deg]
center_lon (float) – Center longitude [deg]
radius (float) – Scenario’s radius in [m]
targets (list of
pyrocko.scenario.targets.base.TargetGenerator
objects) – Targets to throw into scenario, defaults to AVAILABLE_TARGETSforce (bool) – If set to
True
, overwrite directorystationxml (str) – path to a StationXML to be used by the
pyrocko.scenario.targets.waveform.WaveformGenerator
.
- Returns:
Scenario
- Return type: