Sensor3c

Class definition for Sensor3c, a 3-component sensor.

class Sensor3c(ns, ew, vt, meta=None)

Bases: object

Class for creating and manipulating 3-component sensor objects.

Variables
  • ns (TimeSeries) – North-south component, time domain.

  • ew (TimeSeries) – East-west component, time domain.

  • vt (TimeSeries) – Vertical component, time domain.

__init__(ns, ew, vt, meta=None)

Initialize a 3-component sensor (Sensor3c) object.

Parameters
  • ns, ew, vt (TimeSeries) – TimeSeries object for each component.

  • meta (dict, optional) – Meta information for object, default is None.

Returns

Sensor3c – Initialized 3-component sensor object.

bandpassfilter(flow, fhigh, order)

Bandpassfilter components.

Refer to SigProPy documentation for details.

cosine_taper(width)

Cosine taper components.

Refer to SigProPy documentation for details.

detrend()

Detrend components.

Refer to SigProPy documentation for details.

classmethod from_dict(dictionary)

Create Sensor3c object from dictionary representation.

Parameters

dictionary (dict) – Must contain keys “ns”, “ew”, “vt”, and may also contain the optional key “meta”. “ns”, “ew”, and “vt” must be dictionary representations of TimeSeries objects, see SigProPy documentation for details.

Returns

Sensor3c – Instantiated Sensor3c object.

classmethod from_json(json_str)

Create Sensor3c object from Json-string representation.

Parameters

json_str (str) – Json-style string, which must contain keys “ns”, “ew”, and “vt”, and may also contain the optional key “meta”. “ns”, “ew”, and “vt” must be Json-style string representations of TimeSeries objects, see SigProPy documentation for details.

Returns

Sensor3c – Instantiated Sensor3c object.

classmethod from_mseed(fname=None, fnames_1c=None)

Create from .mseed file(s).

Parameters
  • fname (str, optional) – Name of miniseed file, full path may be used if desired. The file should contain three traces with the appropriate channel names. Refer to the SEED Manual here. for specifics, default is None.

  • fnames_1c (dict, optional) – Some data acquisition systems supply three separate miniSEED files rather than a single combined file. To use those types of files, simply specify the three files in a dict of the form {‘e’:’east.mseed’, ‘n’:’north.mseed’, ‘z’:’vertical.mseed’}, default is None.

Returns

Sensor3c – Initialized 3-component sensor object.

Raises

ValueError – If both fname and fname_verbose are None.

hv(windowlength, bp_filter, taper_width, bandwidth, resampling, method, f_low=None, f_high=None, azimuth=None)

Prepare time series and Fourier transforms then compute H/V.

Parameters
  • windowlength (float) – Length of time windows in seconds.

  • bp_filter (dict) – Bandpass filter settings, of the form {‘flag’:bool, ‘flow’:float, ‘fhigh’:float, ‘order’:int}.

  • taper_width (float) – Width of cosine taper, value between 0. and 1..

  • bandwidth (float) – Bandwidth (b) of the Konno and Ohmachi (1998) smoothing window.

  • resampling (dict) – Resampling settings, of the form {‘minf’:float, ‘maxf’:float, ‘nf’:int, ‘res_type’:str}.

  • method ({‘squared-average’, ‘geometric-mean’, ‘single-azimuth’, ‘multiple-azimuths’}) – Refer to combine_horizontals for details.

  • f_low, f_high (float, optional) – Upper and lower frequency limits to restrict peak selection, default is None meaning search range will not be restricted.

  • azimuth (float, optional) – Refer to combine_horizontals for details.

Returns

Hvsr – Instantiated Hvsr object.

property normalization_factor

Time history normalization factor across all components.

split(windowlength)

Split component TimeSeries.

Refer to SigProPy documentation for details.

to_dict()

Sensor3c object as dict.

Returns

dict – Dictionary representation of a Sensor3c.

to_json()

Sensor3c object as JSON-string.

Returns

str – JSON-string representation of Sensor3c.

transform(**kwargs)

Perform Fourier transform on components.

Returns

dict – With FourierTransform-like objects, one for for each component, indicated by the key ‘ew’,’ns’, ‘vt’.