Coverage for /opt/obspy/update-docs/src/obspy/obspy/signal/tests/test_sonic : 100%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
#!/usr/bin/env python
array_processing
""" Test fk analysis, main function is sonic() in array_analysis.py """
[-5.0, 7.0, 0.0], [5.0, 7.0, 0.0], [10.0, 0.0, 0.0], [5.0, -7.0, 0.0], [-5.0, -7.0, 0.0], [-10.0, 0.0, 0.0]])
# SNR = 100. # signal to noise ratio
# time offsets in samples geometry[:, 0]) # + amp / SNR * \ # np.random.randn(length - abs(min_dt) - abs(max_dt))) # lowpass random signal to f_nyquist / 2
(length - abs(min_dt) - abs(max_dt)) / df
semb_thres, vel_thres, frqlow, frqhigh, stime, etime) method=method) if 0: # 1 for debugging print '\n', out[:, 1:]
9.69515476e-01 1.95237117e-05 1.84349488e+01 1.26491106e+00 9.59920378e-01 1.68637467e-05 1.84349488e+01 1.26491106e+00 9.63367672e-01 1.36251275e-05 1.84349488e+01 1.26491106e+00 9.65265591e-01 1.35077292e-05 1.84349488e+01 1.26491106e+00 9.56276421e-01 1.15114010e-05 1.84349488e+01 1.26491106e+00 9.49731735e-01 9.66531018e-06 1.84349488e+01 1.26491106e+00 """
1.41116437e-01 1.95237117e-05 1.84349488e+01 1.26491106e+00 1.28633209e-01 1.68637467e-05 1.84349488e+01 1.26491106e+00 1.30422122e-01 1.36251275e-05 1.84349488e+01 1.26491106e+00 1.33438392e-01 1.35077292e-05 1.84349488e+01 1.26491106e+00 1.32708065e-01 1.15114010e-05 1.84349488e+01 1.26491106e+00 1.31982873e-01 9.66531018e-06 1.84349488e+01 1.26491106e+00 """
8.57600009e-01 8.57600009e-01 1.49314172e+01 1.55241747e+00 1.72793618e+04 1.72793618e+04 -1.48240520e+02 2.46981781e+00 4.58603016e+02 4.58603016e+02 1.54653824e+02 2.10237960e+00 7.28814121e+02 7.28814121e+02 1.58198591e+02 1.07703296e+00 9.43803974e+02 9.43803974e+02 -9.78533133e+01 2.92745623e+00 2.04031354e+02 2.04031354e+02 -7.50685828e+01 1.55241747e+00 """ # XXX relative tolerance should be lower!
1.28958194e-01 8.57600009e-01 1.49314172e+01 1.55241747e+00 8.67841733e-03 2.46878767e+00 6.11550357e+00 2.81602557e+00 1.62662506e-02 1.01472317e+02 3.55376778e+01 8.60232527e-01 1.16868438e-02 2.58679345e+01 2.65650512e+01 8.94427191e-01 1.78311467e-02 3.35905434e+01 1.97988764e+01 2.65706605e+00 2.39100818e-02 1.87168023e+02 1.68690068e+02 1.52970585e+00 """ # XXX relative tolerance should be lower!
[200., 50., 0.], [-120., 170., 0.], [-100., -150., 0.], [30., -220., 0.]])
coords[i, 1])
fstep, coordsys='xy')
fmax, fstep, coordsys='lonlat')
[[0.41915119, 0.33333333, 0.32339525, 0.24751548, 0.67660475], [0.25248452, 0.41418215, 0.34327141, 0.65672859, 0.33333333], [0.24751548, 0.25248452, 1.00000000, 0.25248452, 0.24751548], [0.33333333, 0.65672859, 0.34327141, 0.41418215, 0.25248452], [0.67660475, 0.24751548, 0.32339525, 0.33333333, 0.41915119]])
[200., 50., 0.], [-120., 170., 0.], [-100., -150., 0.], [30., -220., 0.]])
coords[i, 1])
coordsys='lonlat')
[[3.13360360e-01, 4.23775796e-02, 6.73650243e-01, 4.80470652e-01, 8.16891615e-04], [2.98941684e-01, 2.47377842e-01, 9.96352135e-02, 6.84732871e-02, 5.57078203e-01], [1.26523678e-01, 2.91010683e-01, 1.00000000e+00, 2.91010683e-01, 1.26523678e-01], [5.57078203e-01, 6.84732871e-02, 9.96352135e-02, 2.47377842e-01, 2.98941684e-01], [8.16891615e-04, 4.80470652e-01, 6.73650243e-01, 4.23775796e-02, 3.13360360e-01]])
if __name__ == '__main__': unittest.main(defaultTest='suite') |