SeismicRecording3C
- class SeismicRecording3C(ns, ew, vt, degrees_from_north=0.0, meta=None)
Class for creating and manipulating 3-component seismic records.
- 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, degrees_from_north=0.0, meta=None)
Initialize a 3-component seismic recording object.
- Parameters:
ns, ew, vt (TimeSeries) –
TimeSeriesobject for each component.degrees_from_north (float, optional) – Orientation of the
nscomponent (i.e., station north) relative to magnetic north measured in decimal degrees (clockwise positive). The default value is0. indicating station north and magnetic north are aligned.meta (dict, optional) – Meta information for object, default is
None.
- Returns:
SeismicRecording3C – Initialized 3-component sensor object.
- butterworth_filter(fcs_in_hz, order=5)
Butterworth filter component
TimeSeries.- Parameters:
fcs_in_hz (tuple) – Butterworth filter’s corner frequencies in Hz.
Nonecan be used to specify a one-sided filter. For example a high pass filter at 3 Hz would be specified asfcs_in_hz=(3, None).order (int, optional) – Butterworth filter order, default is
5.
- Returns:
None – Filters
amplitudeattribute in-place.
- detrend(type='linear')
Remove trend from component
TimeSeries.- Parameters:
type ({“constant”, “linear”}, optional) – Type of detrending. If
type == "linear"(default), the result of a linear least-squares fit to data is subtracted from data. Iftype == "constant", only the mean of data is subtracted.- Returns:
None – Performs inplace detrend on the
amplitudeattribute.
- classmethod from_seismic_recording_3c(seismic_recording_3c)
Copy constructor for
SeismicRecording3Cobject.- Parameters:
seismic_recording_3c (SeismicRecording3C) –
SeismicRecording3Cto be copied.- Returns:
SeismicRecording3C – Copy of the provided
SeismicRecording3Cobject.
- is_similar(other)
Check if
otheris similar toself.
- orient_sensor_to(degrees_from_north)
Orient sensor’s horizontal components.
- Parameters:
degrees_from_north (float) – New sensor orientation in degrees from north (clockwise positive). The sensor’s north component will be oriented such that it is aligned with the defined orientation.
- Returns:
None – Modifies the objects internal state.
- split(window_length_in_seconds)
Split component
TimeSeriesinto time windows.- Parameters:
window_length_in_seconds (float) – Duration of each split in seconds.
- Returns:
list – List of
SeismicRecording3Cobjects, one per split.
Notes
The last sample of each window is repeated as the first sample of the following time window to ensure an intuitive number of windows. Without this, for example, a 10-minute record could not be broken into 10, 1-minute records.
- trim(start_time, end_time)
Trim component
TimeSeries.- Parameters:
start_time (float) – New time zero in seconds.
end_time (float) – New end time in seconds.
- Returns:
None – Updates the attributes
amplitudeandn_samples.- Raises:
IndexError – If the
start_timeand/orend_timeis illogical. Checks includestart_timeis less than zero,start_timeis afterend_time, orend_timeis after the end of the record.
- window(type='tukey', width=0.1)
Window component
TimeSeries.- Parameters:
width ({0.-1.}) – Fraction of the time series to be windowed.
type ({“tukey”}, optional) – If
type="tukey", a width of0is a rectangular window and1is a Hann window, default is0.1indicating a 5% taper off of both ends of the time series.
- Returns:
None – Applies window to the
amplitudeattribute in-place.