scenario

The ScenarioGenerator (scenario.ScenarioGenerator)

This module bundles the TargetGenerators together. Available Scenario Target Generators

exception CannotCreate[source]

Bases: Exception

class ScenarioGenerator(**kwargs)[source]

Bases: pyrocko.scenario.base.LocationGenerator

Undocumented.

target_generators

list of pyrocko.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 0x7fa53e6fec88>

Sources to spawn in the scenario.

classmethod initialize(path, center_lat=None, center_lon=None, radius=None, targets=[<class 'pyrocko.scenario.targets.station.RandomStationGenerator'>, <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, defaults to None
  • center_lon (float, optional) – Center longitude, defaults to None
  • radius (float, optional) – Scenario’s radius in [m], defaults to None
  • targets (list of pyrocko.scenario.ScenarioTargets, optional) – Targets to thow into scenario, defaults to AVAILABLE_TARGETS
  • force (bool, optional) – Overwrite directory, defaults to False
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)