seismic.synthetics.backends package¶
Submodules¶
seismic.synthetics.backends.backend_syngine module¶
Backend for making synthetic seismograms using Syngine.
- class seismic.synthetics.backends.backend_syngine.SynthesizerSyngine(station_latlon, earth_model='iasp91')[source]¶
Bases:
Synthesizer
Class to synthesize seismograms using online Syngine service.
To write resultant stream to HDF5 format, add ‘ignore’ option:
synth_stream.write('test_synth.h5', 'h5', ignore=('mseed',))
Initialization
- Parameters:
station_latlon – See documentation for
synthesize()
earth_model (str) – String naming which standard earth model to use.
- synthesize(src_latlon, fs, time_window)[source]¶
See documentation for
synthesize()
seismic.synthetics.backends.backend_tws module¶
Backend for making synthetic seismograms using Telewavesim.
- class seismic.synthetics.backends.backend_tws.SynthesizerMatrixPropagator(station_latlon, layerprops)[source]¶
Bases:
Synthesizer
Class to synthesize seismograms from a 1D model description using Kennett’s matrix propagator method.
Initialization
- Parameters:
station_latlon – See documentation for
synthesize()
layerprops (list(seismic.model_properties.LayerProps)) – List of LayerProps. Last layer should be mantle properties.
- property kappa¶
Return ratio of Vp/Vs for each layer
- Returns:
k value per layer
- Return type:
numpy.array
- synthesize(src_latlon, fs, time_window)[source]¶
See documentation for
synthesize()
seismic.synthetics.backends.synthesizer_base module¶
Base class for seismogram synthesis class
- class seismic.synthetics.backends.synthesizer_base.Synthesizer(station_latlon)[source]¶
Bases:
object
Base class for seismogram synthesizers.
Initialization
- Parameters:
station_latlon (tuple(float, float) or str) – Either a tuple of (lat, lon) coordinates, or a station code in the format ‘NET.STA’ string.
- compute_event_stats(src_lat, src_lon, eventid_base, src_depth_m=0, earth_model='iasp91', phase='P', origin_time=None)[source]¶
Compute trace stats fields for a source single event.
- Parameters:
src_lat (float) – Source latitude
src_lon (float) – Source longitude
eventid_base (str) – Base string for event id
src_depth_m (float) – Source depth in metres
earth_model (str) – String name of earth model to use for ray tracing
phase (str) – Which phase is being modelled
origin_time (obspy.UTCDateTime) – Timestamp of the source event. If empty, will be a random offset from now.
- Returns:
Stats dictionary
- Return type:
- property station_latlon¶
Get (latitude, longitude) location of receiving station