lsforce.lsdata module
- class lsforce.lsdata.LSData(st, source_lat, source_lon, remove_response=True, skip_zne_rotation=False)[source]
Bases:
object
Class for force inversion data that is an extension of an ObsPy Stream.
- st_proc
Stream rotated into RTZ (radial, transverse, vertical) relative to source_lat, source_lon.
- Type
Create an LSData object.
- Parameters
st (
Stream
) – Stream object withtr.stats.latitude
andtr.stats.longitude
defined and station response info attached to each trace in the Stream.source_lat (float) – Latitude in decimal degrees of centroid of landslide source location
source_lon (float) – Longitude in decimal degrees of centroid of landslide source location
remove_response (bool) – Correct for station response to displacement units. Set to False to handle response removal manually at an earlier step.
skip_zne_rotation (bool) – If True, then the ->ZNE rotation step is skipped. This is a necessary flag if the stations used do not have metadata in the irisws-fedcatalog (e.g., for synthetic cases)
- plot_data(equal_scale=True, period_range=None)[source]
Create a record section plot of waveforms in st_proc.
- plot_stations(region=None, label_stations=False, gshhs_scale='auto')[source]
Create a map showing stations and event location.
- Parameters
region (list or tuple) – Array of the form [lonmin, lonmax, latmin, latmax] specifying the desired map region in decimal degrees. If None, we automatically pick a region that includes the event and stations
label_stations (bool) – If True, label stations with their codes
gshhs_scale (str) – Resolution for coastlines; one of ‘auto’, ‘coarse’, ‘low’, ‘intermediate’, ‘high’, or ‘full’
- Returns
Output figure handle
- Return type
- lsforce.lsdata.make_lsdata_syn(inv, fake_station_dict, source_lat, source_lon, data_length_seconds)[source]
Wrapper which creates an
LSData
object for forward modeling applications.- Parameters
inv (
Inventory
) – ObsPy Inventory object containing the real stations for which synthetics should be computedfake_station_dict (dict) – Dictionary with keys specifying station names, and values as two-element lists [latitude, longitude], of fake stations for which synthetics should be computed
source_lat (float) – Latitude in decimal degrees of centroid of landslide source location
source_lon (float) – Longitude in decimal degrees of centroid of landslide source location
data_length_seconds (int or float) – [s] Length of synthetic data