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) – TimeSeries object for each component.

  • degrees_from_north (float, optional) – Orientation of the ns component (i.e., station north) relative to magnetic north measured in decimal degrees (clockwise positive). The default value is 0. 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. None can be used to specify a one-sided filter. For example a high pass filter at 3 Hz would be specified as fcs_in_hz=(3, None).

  • order (int, optional) – Butterworth filter order, default is 5.

Returns:

None – Filters amplitude attribute 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. If type == "constant", only the mean of data is subtracted.

Returns:

None – Performs inplace detrend on the amplitude attribute.

classmethod from_seismic_recording_3c(seismic_recording_3c)

Copy constructor for SeismicRecording3C object.

Parameters:

seismic_recording_3c (SeismicRecording3C) – SeismicRecording3C to be copied.

Returns:

SeismicRecording3C – Copy of the provided SeismicRecording3C object.

is_similar(other)

Check if other is similar to self.

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 TimeSeries into time windows.

Parameters:

window_length_in_seconds (float) – Duration of each split in seconds.

Returns:

list – List of SeismicRecording3C objects, 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 amplitude and n_samples.

Raises:

IndexError – If the start_time and/or end_time is illogical. Checks include start_time is less than zero, start_time is after end_time, or end_time is 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 of 0 is a rectangular window and 1 is a Hann window, default is 0.1 indicating a 5% taper off of both ends of the time series.

Returns:

None – Applies window to the amplitude attribute in-place.