SplitPy Classes¶
splitpy
defines the following base classes:
The class Split
contains attributes
and methods for the analysis of teleseismic shear-wave splitting
from three-component seismograms.
The class PickPlot
contains figure handles
for a picking window showing the seismograms and the predicted teleseismic
shear-wave phase arrivals. This figure is interactive and new picks can
be generated to refine the analysis.
The class DiagPlot
contains figure handles
for a diagnostic figure showing a summary of the splitting results. It can
be called after each application of the split.analyze method to show
the summary of the analysis as a figure. This figure can also be saved as
a .png file.
Split¶
-
class
splitpy.classes.
Split
(sta, maxdt, ddt, dphi)¶ A Split object contains dictionary attributes that associate station information with single event (i.e., earthquake) metadata, corresponding raw and rotated seismograms and splitting results.
Note
The object is initialized with the
sta
field only, and other attributes are added to the object as the analysis proceeds.-
sta
¶ Object containing station information - from
stdb
database.- Type
object
-
err
¶ Whether or not the get_data_NEZ successfully retrieved waveforms
- Type
bool
-
null
¶ Whether or not estiamate is null result
- Type
bool
-
quality
¶ Quality of estimate (‘good’, ‘fair’, ‘poor’)
- Type
str
-
ts
¶ Predicted travel time for SKS phase
- Type
float
-
ph
¶ Name of SKS phase (‘SKS’)
- Type
str
-
snrq
¶ Signal-to-noise ratio for radial (Q) component
- Type
float
-
snrt
¶ Signal-to-noise ratio for tangential (T) component
- Type
float
-
maxdt
¶ Max delay time between slow and fast axes in search
- Type
float
-
ddt
¶ Sampling distance (in sec) for delay time search
- Type
float
-
dphi
¶ Sampling distance (in degrees) for azimuth search
- Type
float
-
add_event
(event)¶ Adds event metadata to Split object.
- Parameters
event (
event
) – Event metadata
-
meta
Object containing metadata information
-
add_phase
(t, vp)¶ Adds phase information for SKS arrival from taup model
- Parameters
t (
TaupPyModel
) – Travel-time table metadata
-
ts
Travel time between earthquake and station (sec)
- Type
float
-
ph
Phase name (‘SKS’)
- Type
str
-
meta.
slow
¶ Horizontal slowness of phase
- Type
float
-
meta.
inc
¶ Incidence angle of phase at surface
- Type
float
-
add_NEZ
(stream)¶ Adds seismograms from available stream
- Parameters
stream (
Stream
) – Stream container for NEZ seismograms
-
data
Object containing
obspy.core.Trace
objects- Type
-
add_LQT
(stream)¶ Adds seismograms from available stream
- Parameters
stream (
Stream
) – Stream container for NEZ seismograms
-
data
Object containing
Trace
objects- Type
-
get_data_NEZ
(client, dts, stdata, ndval)¶ Downloads seismograms based on event origin time and SKS phase arrival.
- Parameters
client (
Client
) – Client objectdts (float) – Time duration (?)
stdata (
stdb.classes.StDbElement
) – Station metadatandval (float) – Fill in value for missing data
-
data
Object containing
Trace
objects- Type
-
rotate_ZEN_LQT
()¶ Rotates 3-component seismograms from vertical (Z), east (E) and north (N) to longitudinal (L), radial (Q) and tangential (T) components of motion
-
data
Object containing
Trace
objects- Type
-
-
calc_snrq
(t1=None, dt=30.0)¶ Calculates signal-to-noise ration on radial (Q) component
- Parameters
t1 (
UTCDateTime
) – Predicted arrival time of phasedt (float) – Duration (sec)
-
snrq
Signal-to-noise ratio (dB)
- Type
float
-
calc_snrt
(t1=None, dt=30.0)¶ Calculates signal-to-noise ration on tangential (T) component
- Parameters
t1 (
UTCDateTime
) – Predicted arrival time of phasedt (float) – Duration (sec)
-
snrt
Signal-to-noise ratio (dB)
- Type
float
-
analyze
(t1=None, t2=None)¶ Calculates the shear-wave splitting parameters based on two alternative method: the Rotation-Correlation (RC) method and the Silver-Chan (SC) method. Each set of results is stored in a Dictionary as attributes of the split object.
- Parameters
t1 (
UTCDateTime
) – Start time of picking windowt2 (
UTCDateTime
) – End time of picking window
-
RC_res
Object containing results of Rotation-Correlation method
- Type
-
SC_res
Object containing results of Silver-Chan method
- Type
-
is_null
(snrTlim=3.0, ds=-1)¶ Determines if splitting result is a Null result
- Parameters
snrTlim (float) – Threshold for snr on T component
ds (int) – Number of stars to print out to screen (verbiage)
-
null
Boolean for Null result
- Type
bool
-
get_quality
(ds)¶ Determines the quality of the estimate (either Null or non-Null) based on ratio of delay times and difference in fast axis directions between Rotation-Correlation and Silver-Chan methods
- Parameters
ds (int) – Number of stars to print out to screen (verbiage)
-
quality
String representing quality of estimate (‘Good’, ‘Fair’, ‘Poor’)
- Type
str
-
display_results
(ds=0)¶ Prints out best fitting results to screen
- Parameters
ds (int) – Number of stars to print out to screen (verbiage)
-
display_meta
(ds=0)¶ Prints out content of metadata to screen
- Parameters
ds (int) – Number of stars to print out to screen (verbiage)
-
display_null_quality
(ds=0)¶ Prints out null and quality estimates to screen
- Parameters
ds (int) – Number of stars to print out to screen (verbiage)
-
save
(file)¶ Saves Split object to file
- Parameters
file (str) – File name for split object
-
Meta¶
-
class
splitpy.classes.
Meta
(time, dep, lon, lat, mag, gac, epi_dist, baz, az)¶ A Result object contains attributes associated with the result of a single splitting analysis. These are equally applicable to the RC or SC method - see
analyze()
.-
time
¶ Origin time of earthquake
- Type
UTCDateTime
-
dep
¶ Depth of hypocenter (km)
- Type
float
-
lon
¶ Longitude coordinate of epicenter
- Type
float
-
lat
¶ Latitude coordinate of epicenter
- Type
float
-
mag
¶ Magnitude of earthquake
- Type
float
-
gac
¶ Great arc circle between station and epicenter (degrees)
- Type
float
-
epi_dist
¶ Epicentral distance between station and epicenter (km)
- Type
float
-
baz
¶ Back-azimuth - pointing to earthquake from station (degrees)
- Type
float
-
az
¶ Azimuth - pointing to station from earthquake (degrees)
- Type
float
-
slow
¶ Horizontal slowness of phase
- Type
float
-
inc
¶ Incidence angle of phase at surface
- Type
float
-
Data¶
-
class
splitpy.classes.
Data
(trE, trN, trZ)¶ A Data object contains three-component raw (NEZ) and rotated (LQT) waveforms centered on the arrival time of interest.
-
trN
¶ Trace of North component of motion
- Type
Trace
-
trE
¶ Trace of East component of motion
- Type
Trace
-
trZ
¶ Trace of Vertical component of motion
- Type
Trace
-
trL
¶ Trace of longitudinal component of motion
- Type
Trace
-
trQ
¶ Trace of radial component of motion
- Type
Trace
-
trT
¶ Trace of tangential component of motion
- Type
Trace
-
Result¶
-
class
splitpy.classes.
Result
(Emat, trQ_c, trT_c, trFast, trSlow, phi, dtt, phi_min, edtt, ephi, errc)¶ A Result object contains attributes associated with the result of a single splitting analysis. These are equally applicable to the RC or SC method - see
analyze()
.-
Emat
¶ Error minimization matrix
- Type
ndarray
-
trQ_c
¶ Corrected radial (Q) component
- Type
Trace
-
trT_c
¶ Corrected transverse (T) component
- Type
Trace
-
trFast
¶ Corrected Fast component
- Type
Trace
-
trSlow
¶ Corrected Slow component
- Type
Trace
-
phi
¶ Azimuth of fast axis (deg)
- Type
float
-
dtt
¶ Delay time between fast and slow axes (sec)
- Type
float
-
phi_min
¶ Azimuth used in plotting method
- Type
float
-
ephi
¶ Error on azimuth of fast axis (deg)
- Type
float
-
edtt
¶ Error on delay time between fast and slow axes (sec)
- Type
float
-
errc
¶ Error contours on Emat
- Type
float
-
PickPlot¶
-
class
splitpy.classes.
PickPlot
(split)¶ A PickPlot object contains figure handles and method to plot seismic data for picking/refining the SKS time window. The figure displays the LQT seismograms and predicted arrival times for common shear-wave arrivals in the time window. The figure can be picked to refine the time window for calculating the splitting results.
Note
The object is initialized with a
Split
object, which is temporarily stored as an attribute. All the split attributes are therefore available to thePickPlot
object for plotting.-
fp
¶ List of figure handles ([fig, ax1, ax2, ax3])
- Type
List
-
plot_LQT_phases
(tt, dts, t1=None, t2=None)¶ Plots rotated three-components of motion for picking.
- Parameters
tt (
TauPyModel
) – Taup object containing travel time and phase infodts (float) – Time interval (?)
t1 (
UTCDateTime
) – Start time of picking windowt2 (
UTCDateTime
) – End time of picking window
-
ll
¶ List of
axvline
objects for plotting the start and end times of the picking window.- Type
List
-
update_LQT
(tp1, tp2)¶ Updates LQT figure with newly picked times
- Parameters
tp1 (float) – New start time of picking window
tp2 (float) – New end time of picking window
-
DiagPlot¶
-
class
splitpy.classes.
DiagPlot
(split)¶ A DiagPlot object contains figure handles and methods to plot the diagnostic figure, which displays the LQT seismograms, the corrected/un-corrected seismograms, the particle motions, the minimization matrix and a text box with a summary of the analysis - for each of the two analysis methods (‘RC’ or ‘SC’)
Note
The object is initialized with a
Split
object, which is temporarily stored as an attribute. All the split attributes are therefore available to theDiagPlot
object for plotting.-
fd
¶ List of figure handles ([fig, ax0, axt, axRC1, axRC2, axRC3, axRC4, axSC1, axSC2, axSC3, axSC4])
- Type
List
-
plot_diagnostic
(t1=None, t2=None)¶ Plots diagnostic window with estimates from both ‘RC’ and ‘SC’ methods
- Parameters
t1 (
UTCDateTime
) – Start time of picking windowt2 (
UTCDateTime
) – End time of picking window
-
save
(file)¶ Saves current figure into file
- Parameters
file (str) – File name for diagnostic figure
-