In [43]:
matplotlib inline
In [44]:
import matplotlib.pyplot as plt
import pandas as pd
import matplotlib.dates as mdates
In [45]:
from __future__ import print_function

%matplotlib inline
import matplotlib.pyplot as plt
#plt.style.use('ggplot')
plt.rcParams['figure.figsize'] = 11, 4
In [46]:
#sta = "IBUH01" # velocity decrease, direction change, but increase aniso coeff, but  rms_coeff increase
#sta = "IBUH02" # velocoty degrease, no change direction, no change anino coeff. no increase aniso rms_coeff
sta = "IBUH03"# Hokkaido velocoty degrease, change direction, no change anino coeff. no increase aniso rms_coeff
                           # Tohoku-oki velocity degrease, no change direction, no change anino coeff. no increase aniso rms_coeff
#sta = "IBUH04" # seismic data are not good
#sta = "IBUH05" # no change
#sta = "IBUH06" # velocity increase, az all direction. but why az_coeff increase? all parameters are messy
#sta = "IBUH07" # no change


#sta = "SRCH09"  # velocoty degrease, no change direction, no change anino coeff. no increase aniso rms_coeff
#sta = "SRCH10" #  no change
#sta = "SRCH08" # no change
#sta = "SRCH07" # no chnage
 
#sta = "SBSH08" # no many data
#sta = "SBSH07" # small change?
#sta = "SBSH03" # no change? no many data


#sta = "HDKH04" # iso change no azimuth change, no coeff change
#sta = "HDKH01" # large variability, unclear velocity change
#sta = "HDKH03" # no change?
#sta = "HDKH05" # no change. 
#sta = "HDKH06" # no change?

#sta = "IKRH01"  # 
#sta = "IKRH02"# 
#sta = "IKRH03"# 
In [47]:
#IBUH01 2003-04-17T15:40:54.9600 42.55450 143.50700 72.40 4.40 0.0006361000 20030418004000 516.48 541.09 491.87 126.17 36.17 9.10 3.71 7 5 -1 0 1 15

aniso_fi = "http://ncedc.org/ftp/outgoing/taira/"+sta+".out2"
aniso_data = pd.read_csv(aniso_fi,   
                       sep=" ",names=["sta", "time", "lat", "long", "depth", "mag", "elapse_diff", "evid", "viso", "vfast", "vslow", "azfast", "azslow", "azcoeff", "rms_coeff", "leng", "ddeg", "ns", "ne", "f1", "f2", "viso_pvel","vpvs","elapse_days"],header=None)
In [48]:
#print (aniso_data['lat'])
In [49]:
aniso_data['time'] = pd.to_datetime(aniso_data['time'])
In [50]:
aniso_data['vp2'] = aniso_data['viso_pvel']*aniso_data['viso_pvel']
aniso_data['vs2'] = aniso_data['viso']*aniso_data['viso']
In [51]:
aniso_data['poisson_ratio'] =   ( aniso_data['vp2'] - 2 * aniso_data['vs2']  )  / (   2 * (aniso_data['vp2'] - aniso_data['vs2']) )  
In [52]:
aniso_data.describe()
Out[52]:
lat long depth mag elapse_diff evid viso vfast vslow azfast ... ns ne f1 f2 viso_pvel vpvs elapse_days vp2 vs2 poisson_ratio
count 802.000000 802.000000 802.000000 802.000000 802.000000 8.020000e+02 802.000000 802.000000 802.000000 802.000000 ... 802.0 802.0 802.0 802.0 802.000000 802.000000 802.000000 8.020000e+02 802.000000 802.000000
mean 41.720195 142.890036 51.179439 4.858479 0.000264 2.011715e+13 220.729950 222.138978 219.321110 71.034352 ... -1.0 0.0 1.0 15.0 1023.373541 4.638980 -2369.305514 1.310286e+06 48745.535046 0.454601
std 1.880387 1.783830 51.017823 0.999368 0.000243 4.982447e+10 4.884046 4.800266 5.191589 55.588751 ... 0.0 0.0 0.0 0.0 513.148111 2.314874 1827.455819 2.795828e+06 2129.405379 3.608396
min 27.052000 131.064000 0.000000 2.500000 -0.000969 2.002062e+13 199.830000 205.620000 194.040000 0.000000 ... -1.0 0.0 1.0 15.0 154.520000 0.689206 -5924.483602 2.387643e+04 39932.028900 -92.796000
25% 41.332675 141.989250 30.042500 4.100000 0.000092 2.008062e+13 217.442500 219.087500 216.005000 30.480000 ... -1.0 0.0 1.0 15.0 1043.547500 4.710605 -3732.768015 1.088991e+06 47281.240825 0.476710
50% 42.204000 142.506500 42.600000 4.800000 0.000273 2.012031e+13 222.795000 224.065000 221.415000 49.645000 ... -1.0 0.0 1.0 15.0 1059.935000 4.798457 -2366.339632 1.123462e+06 49637.612250 0.477467
75% 42.675825 143.293250 63.647500 5.500000 0.000450 2.016119e+13 224.370000 225.610000 223.177500 112.310000 ... -1.0 0.0 1.0 15.0 1074.452500 4.902984 -640.443665 1.154448e+06 50341.896900 0.478640
max 49.183300 155.168000 681.710000 9.000000 0.000693 2.018122e+13 227.350000 240.150000 226.660000 179.810000 ... -1.0 0.0 1.0 15.0 6816.060000 30.729273 108.356364 4.645867e+07 51688.022500 27.338786

8 rows × 25 columns

In [53]:
#print(aniso_data[aniso_data['vslow'] < 100])
In [54]:
#aniso_data['azslow']
In [55]:
statsOUT = aniso_data.describe()
In [56]:
statsOUT = aniso_data.describe(percentiles=[0.01, 0.05, 0.1, 0.25, 0.75, 0.9, 0.95, 0.99])
In [57]:
statsOUT.viso
Out[57]:
count    802.000000
mean     220.729950
std        4.884046
min      199.830000
1%       207.351000
5%       211.178000
10%      213.168000
25%      217.442500
50%      222.795000
75%      224.370000
90%      225.360000
95%      225.680000
99%      226.420000
max      227.350000
Name: viso, dtype: float64
In [58]:
statsOUT.viso_pvel
Out[58]:
count     802.000000
mean     1023.373541
std       513.148111
min       154.520000
1%        164.869000
5%        206.829500
10%       446.941000
25%      1043.547500
50%      1059.935000
75%      1074.452500
90%      1095.255000
95%      1147.540000
99%      2816.050700
max      6816.060000
Name: viso_pvel, dtype: float64
In [59]:
statsOUT.poisson_ratio
Out[59]:
count    802.000000
mean       0.454601
std        3.608396
min      -92.796000
1%        -2.150298
5%         0.353883
10%        0.474048
25%        0.476710
50%        0.477467
75%        0.478640
90%        0.481077
95%        1.535036
99%        2.665737
max       27.338786
Name: poisson_ratio, dtype: float64
In [60]:
#print (statsOUT.viso['mean'], statsOUT.viso['10%'])
In [61]:
viso_minplot = statsOUT.viso['10%']
viso_maxplot = statsOUT.viso['90%']
In [62]:
viso_minplot = statsOUT.viso['5%']
viso_maxplot = statsOUT.viso['95%']
In [63]:
viso_minplot = statsOUT.viso['1%']
viso_maxplot = statsOUT.viso['99%']
In [64]:
viso_pvel_minplot = statsOUT.viso_pvel['10%']
viso_pvel_maxplot = statsOUT.viso_pvel['90%']
In [65]:
poisson_ratio_minplot = statsOUT.poisson_ratio['10%']
poisson_ratio_maxplot = statsOUT.poisson_ratio['90%']
In [66]:
azcoeff_minplot = statsOUT.azcoeff['5%']
azcoeff_maxplot = statsOUT.azcoeff['95%']
In [67]:
rms_coeff_minplot = statsOUT.rms_coeff['5%']
rms_coeff_maxplot = statsOUT.rms_coeff['95%']
In [68]:
azfast_minplot = statsOUT.azfast['5%']
azfast_maxplot = statsOUT.azfast['95%']
In [69]:
azslow_minplot = statsOUT.azslow['5%']
azslow_maxplot = statsOUT.azslow['95%']
In [70]:
vslow_minplot = statsOUT.vslow['5%']
vslow_maxplot = statsOUT.vslow['95%']
In [71]:
vfast_minplot = statsOUT.vfast['5%']
vfast_maxplot = statsOUT.vfast['95%']
In [72]:
viso_minplot = viso_minplot - 2
viso_maxplot = viso_maxplot + 2

vslow_minplot = vslow_minplot - 2
vslow_maxplot = vslow_maxplot + 2

vfast_minplot = vfast_minplot - 2
vfast_maxplot = vfast_maxplot + 2
In [73]:
#print(aniso_data.time)
In [74]:
fig, ax = plt.subplots()
ax.xaxis.set_major_formatter(mdates.DateFormatter('%Y/%m/%d\n%H:%M'))
    
#plt.plot(aniso_data.time, aniso_data.viso, "o", label = 'Viso')
plt.plot(aniso_data['time'], aniso_data['viso'], "o", label = 'Viso')
#plt.ylim(350,600)
plt.ylim(viso_minplot, viso_maxplot)
plt.xlabel("Time UTC")
plt.ylabel("S-wave velocity (m/s)")
plt.legend(loc="upper left") 
plt.title(""+sta+" Viso")

#plt.xlim("2011-01-01 00:00:00","2018-10-01 0:00:00")

#plt.xlim("2000-09-01 00:00:00","2018-10-01 0:00:00")
Out[74]:
<matplotlib.text.Text at 0x11dfef2e8>
In [75]:
fig, ax = plt.subplots()
ax.xaxis.set_major_formatter(mdates.DateFormatter('%Y/%m/%d\n%H:%M'))
    
#plt.plot(aniso_data.time, aniso_data.viso, "o", label = 'Viso')
plt.plot(aniso_data['time'], aniso_data['viso_pvel'], "o", label = 'Vp')
#plt.ylim(350,600)
plt.ylim(viso_pvel_minplot, viso_pvel_maxplot)
plt.ylim(1000,1100)

plt.xlabel("Time UTC")
plt.ylabel("P-wave velocity (m/s)")
plt.legend(loc="upper left") 
plt.title(""+sta+" Vp")

#plt.xlim("2002-09-01 00:00:00","2018-10-01 0:00:00")
Out[75]:
<matplotlib.text.Text at 0x11dedab00>
In [76]:
fig, ax = plt.subplots()
ax.xaxis.set_major_formatter(mdates.DateFormatter('%Y/%m/%d\n%H:%M'))
    
plt.plot(aniso_data['time'], aniso_data['poisson_ratio'], "o", label = 'Vp')
#plt.ylim(350,600)
#plt.ylim(viso_pvel_minplot, viso_pvel_maxplot)
plt.ylim(0.475,0.485)

plt.xlabel("Time UTC")
plt.ylabel("Poisson ratio")
plt.legend(loc="upper left") 
plt.title(""+sta+" Poisson ratio")

#plt.xlim("2013-05-01 00:00:00","2018-10-01 0:00:00")
Out[76]:
<matplotlib.text.Text at 0x115795d68>
In [77]:
fig, ax = plt.subplots()
ax.xaxis.set_major_formatter(mdates.DateFormatter('%Y/%m/%d\n%H:%M'))
    
plt.plot(aniso_data['time'], aniso_data['vpvs'], "o", label = 'vpvs')
#plt.ylim(350,600)
#plt.ylim(viso_pvel_minplot, viso_pvel_maxplot)
plt.ylim(4.5,5.2)

plt.xlabel("Time UTC")
plt.ylabel("Vp/Vs")
plt.legend(loc="upper left") 
plt.title(""+sta+" Vp/Vs")

#plt.xlim("2013-05-01 00:00:00","2018-10-01 0:00:00")
Out[77]:
<matplotlib.text.Text at 0x11dc251d0>
In [78]:
fig, ax = plt.subplots()
ax.xaxis.set_major_formatter(mdates.DateFormatter('%Y/%m/%d\n%H:%M'))
    
#plt.plot(aniso_data.time, aniso_data.viso, "o", label = 'Viso')
plt.plot(aniso_data['time'], aniso_data['rms_coeff'], "o", label = 'rms_coeff')
plt.ylim(rms_coeff_minplot, rms_coeff_maxplot)
plt.xlabel("Time UTC")
plt.ylabel("RMS_Coeff(%)")
plt.legend(loc="upper left") 
plt.title(""+sta+" RMS_Coeff")
Out[78]:
<matplotlib.text.Text at 0x11e1d8470>
In [79]:
fig, ax = plt.subplots()
ax.xaxis.set_major_formatter(mdates.DateFormatter('%Y/%m/%d\n%H:%M'))
    
#plt.plot(aniso_data.time, aniso_data.viso, "o", label = 'Viso')
plt.plot(aniso_data['time'], aniso_data['azcoeff'], "o", label = 'azcoeff')
plt.ylim(azcoeff_minplot, azcoeff_maxplot)
plt.xlabel("Time UTC")
plt.ylabel("Az coeff(%)")
plt.legend(loc="upper left") 
plt.title(""+sta+" AzCoeff")
Out[79]:
<matplotlib.text.Text at 0x11e4c0f60>
In [80]:
fig, ax = plt.subplots()
ax.xaxis.set_major_formatter(mdates.DateFormatter('%Y/%m/%d\n%H:%M'))
    
#plt.plot(aniso_data.time, aniso_data.viso, "o", label = 'Viso')
plt.plot(aniso_data['time'], aniso_data['azfast'], "o", label = 'azfast')
plt.ylim(azfast_minplot, azfast_maxplot)
plt.xlabel("Time UTC")
plt.ylabel("Az fast(deg)")
plt.legend(loc="upper left") 
plt.title(""+sta+" Az fast")
Out[80]:
<matplotlib.text.Text at 0x11e5715c0>
In [81]:
fig, ax = plt.subplots()
ax.xaxis.set_major_formatter(mdates.DateFormatter('%Y/%m/%d\n%H:%M'))
    
#plt.plot(aniso_data.time, aniso_data.viso, "o", label = 'Viso')
plt.plot(aniso_data['time'], aniso_data['azslow'], "o", label = 'azslow')
plt.ylim(azslow_minplot, azslow_maxplot)
plt.xlabel("Time UTC")
plt.ylabel("Az slow(deg)")
plt.legend(loc="upper left") 
plt.title(""+sta+" Az slow")
Out[81]:
<matplotlib.text.Text at 0x11e779208>
In [82]:
fig, ax = plt.subplots()
ax.xaxis.set_major_formatter(mdates.DateFormatter('%Y/%m/%d\n%H:%M'))
    
#plt.plot(aniso_data.time, aniso_data.viso, "o", label = 'Viso')
plt.plot(aniso_data['time'], aniso_data['vfast'], "o", label = 'vfast')
plt.ylim(vfast_minplot, vfast_maxplot)
plt.xlabel("Time UTC")
plt.ylabel("v fast (m/s)")
plt.legend(loc="upper left") 
plt.title(""+sta+" v fast")
Out[82]:
<matplotlib.text.Text at 0x11e82aba8>
In [83]:
fig, ax = plt.subplots()
ax.xaxis.set_major_formatter(mdates.DateFormatter('%Y/%m/%d\n%H:%M'))
    
#plt.plot(aniso_data.time, aniso_data.viso, "o", label = 'Viso')
plt.plot(aniso_data['time'], aniso_data['vslow'], "o", label = 'vslow')
plt.ylim(vslow_minplot, vslow_maxplot)
plt.xlabel("Time UTC")
plt.ylabel("v slow (m/s)")
plt.legend(loc="upper left") 
plt.title(""+sta+" v slow")
Out[83]:
<matplotlib.text.Text at 0x11ea5aef0>