lsforce.lsdata module
- class lsforce.lsdata.LSData(st, source_lat, source_lon, remove_response=True, remove_response_kwargs=None, 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 with- tr.stats.latitudeand- tr.stats.longitudedefined 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. 
- remove_response_kwargs (dict) – Dictionary of keyword arguments to pass to - remove_response(). No effect if remove_response is False. Note that ObsPy’s default value for the water_level kwarg is 60 dB, but this may inadvertently remove some long period energy that the user wants to keep, so set this parameter carefully. Try a higher number (e.g., 100 dB) to preserve more longer period energy. Setting to None is recommended if pre-filtering is applied or if fine control on the frequency limits is desired
- 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, filter_order=2, zerophase=True)[source]
- Create a record section plot of waveforms in st_proc. - Parameters:
- equal_scale (bool) – If True, all plots will share the same y-axis scale 
- period_range (list or tuple) – If not None, filter the data between period_range[0] and period_range[1], given in seconds 
- filter_order (int) – Order of filter applied over period_range (no effect if period_range is None) 
- zerophase (bool) – If True, zero-phase filtering will be used (no effect if period_range is None) 
 
- Returns:
- Output figure handle 
- Return type:
 
 - 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, skip_zne_rotation=True, fake_start_time=None, dummy_sampling_rate=100.0)[source]
- Wrapper which creates an - LSDataobject for forward modeling applications.- Parameters:
- inv ( - Inventory) – ObsPy Inventory object containing the real stations for which synthetics should be computed
- fake_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 
- skip_zne_rotation (bool) – Should be True if stations are entirely fake, but set to False if using a real station inventory and some stations might have BH1/BH2 channels instead of E and N. 
- fake_start_time ( - UTCDateTimeor None) – Fake start time to use if using real stations and skip_zne_rotation is set to False. This is needed so the right ‘real’ inventory data is fetched.
- dummy_sampling_rate (float) – Samples per second for dummy data. If not defined, will use 100. Default is set artificially high, this determines the SEED band code of “H”