Post-processing package#

seispy.hk module#

seispy.hk.ci(allstack, h, kappa, ev_num)[source]#

Search best H and kappa from stacked matrix. Calculate error for H and kappa :param allstack: stacked HK matrix :param h: 1-D array of H :param kappa: 1-D array of kappa :param ev_num: event number :return:

seispy.hk.hk()[source]#
seispy.hk.hk_sta_test()[source]#
seispy.hk.hksta(hpara, isplot=False, isdisplay=False)[source]#
seispy.hk.hkstack(seis, t0, dt, p, h, kappa, vp=6.3, weight=(0.7, 0.2, 0.1))[source]#
seispy.hk.hktest()[source]#
seispy.hk.plot(stack, allstack, h, kappa, besth, bestk, cvalue, cmap=<matplotlib.colors.ListedColormap object>, title=None, path=None)[source]#
seispy.hk.print_result(besth, bestk, maxhsig, maxksig, print_comment=True)[source]#
seispy.hk.time2idx(times, ti0, dt)[source]#
seispy.hk.tppps(depth, eta_p, eta_s)[source]#
seispy.hk.tps(depth, eta_p, eta_s)[source]#
seispy.hk.tpsps(depth, eta_s)[source]#
seispy.hk.transarray(array, axis=0)[source]#
seispy.hk.vslow(v, rayp)[source]#
class seispy.hkpara.HKPara[source]#

Bases: object

Attributes
hrange
krange
property hrange#
property krange#
seispy.hkpara.hkpara(cfg_file)[source]#

seispy.slantstack module#

class seispy.slantstack.SlantStack(seis, timeaxis, dis)[source]#

Bases: object

Methods

plot([cmap, xlim, vmin, vmax, figpath, colorbar])

Imaging for slant stacking

stack

syn_tps

plot(cmap='jet', xlim=None, vmin=None, vmax=None, figpath=None, colorbar=True)[source]#

Imaging for slant stacking

Parameters
cmapstr, optional

The colormap to use, by default ‘jet’

xlim_type_, optional

Set the x limits of the current axes., by default None

vmin_type_, optional

Normalize the minium value data to the vmin, by default None

vmax_type_, optional

Normalize the maximum value data to the vmax, by default None

figpath_type_, optional

Output path to the image, by default None

colorbarbool, optional

Wether plot the colorbar, by default True

stack(ref_dis=None, rayp_range=None, tau_range=None)[source]#
syn_tps(phase_list, velmodel='iasp91', focal_dep=10)[source]#

seispy.rfani module#

class seispy.rfani.RFAni(sacdatar, tb, te, tlen=3, val=10, rayp=0.06, model='iasp91')[source]#

Bases: object

Methods

plot_polar([cmap, show, outpath])

Polar map of crustal anisotropy inverted by a joint method.

baz_stack

cut_energy_waveform

init_ani_para

joint_ani

plot_correct

plot_stack_baz

radial_energy_max

rotate_to_fast_slow

search_peak

search_peak_amp

search_peak_list

xyz2grd

baz_stack(val=10)[source]#
cut_energy_waveform(idx, nb, ne)[source]#
init_ani_para()[source]#
joint_ani(weight=[0.5, 0.3, 0.2])[source]#
plot_correct(fvd=0, dt=0.44, enf=80, outpath=None)[source]#
plot_polar(cmap=<matplotlib.colors.ListedColormap object>, show=False, outpath='./')[source]#

Polar map of crustal anisotropy inverted by a joint method. See Liu and Niu (2012, doi: 10.1111/j.1365-246X.2011.05249.x) in detail.

Parameters
  • cmap (optional) – Colormap of matplotlib, defaults to ‘rainbow’

  • show (bool, optional) – If show the polar map in the Matplotlib window, defaults to True

  • outpath (str, optional) – Output path to saving the figure. If show the figure in the Matplotlib window, this option will be invalid, defaults to current directory.

plot_stack_baz(enf=60, outpath='./')[source]#
radial_energy_max()[source]#
rotate_to_fast_slow()[source]#
search_peak(energy, opt='max')[source]#
search_peak_amp()[source]#
search_peak_list(energy, opt='max')[source]#
xyz2grd(energy)[source]#
seispy.rfani.average_delay(fd, td)[source]#
seispy.rfani.joint_stack(energy_r, energy_cc, energy_tc, weight=[0.4, 0.3, 0.3])[source]#

seispy.harmonics module#

class seispy.harmonics.Harmonics(rfsta, tmin=- 5, tmax=10)[source]#

Bases: object

Methods

cut_trace()

Trim RFs from tmin to tmax

plot([outpath, enf])

Plot harmonic and unmodeled components

write_constant([out_sac_path])

Write constant component to SAC file.

harmo_trans

cut_trace()[source]#

Trim RFs from tmin to tmax

harmo_trans()[source]#
plot(outpath='./', enf=2.0)[source]#

Plot harmonic and unmodeled components

Parameters
  • outpath (str, optional) – Output path, defaults to ‘./’

  • enf (float, optional) – Amplification factor, defaults to 2.0

write_constant(out_sac_path='./')[source]#

Write constant component to SAC file.

Parameters

out_sac_path (str, optional) – Output path, defaults to ‘./’