tiskitpy.CleanRotator

class tiskitpy.CleanRotator(stream, avoid_spans=None, plot=False, quickTest=False, remove_eqs=True, uselogvar=False, verbose=True, filt_band=(0.001, 0.01), save_eq_file=True, H_over_Z=1.0, N_E_comps=('1', '2'))

Bases: object

Clean tilt noise from OBS vertical channel using non-deforming rotation

Because earthquakes can swamp the noise-based variance, downloads a list of earthquakes from the time period and only uses windows outside of the earthquakes’ influence (using .TimeSpans.from_eqs). Saves the earthquake file locally to speed up future runs

angle

angle by which Z (or Z-X-Y) was rotated

Type:

float

azimuth

azimuth by which Z (or Z-X-Y) was rotated

Type:

float

variance_reduction

amount by which variance was reduced during calculation (0 to 1)

Type:

float

avoided_spans

avoided time spans

Type:

TimeSpans

H_over_Z

Horizontal channel gain over Z gain.

Type:

float

trans_code

code to enter into stats to indicate that data have been rotated

Type:

str

apply(stream, horiz_too=False, rot_limit=20.0, set_dtype=True)

Rotates vertical channel to minimize noise

Parameters:
  • stream (Stream) – data, must have *Z, *[1|N] and *[2|E] channels

  • horiz_too – (bool) rotate horizontals also (use if you believe channels are truly orthogonal, probably a bad idea anyway as long as we use a 2-value rotation)

  • rot_limit – Raise ValueError if self.angle is greater than this value

Returns:

rotated stream

Return type:

strm_rot (Stream)

tfs()

Return the Z-1 and Z-2 transfer functions equal to the given rotation

Designed to be used with the output of rotate_clean() I DID THIS ON THE FLY, HAVE NOT VERIFIED THE VALUES

Returns:

2-tuple containing:

(float): Z-1 ratio (float): Z-2 ration

Return type:

(tuple)