In [49]:
matplotlib inline
In [50]:
from obspy.core import read
from obspy import UTCDateTime
#from obspy.xseed import Parser
#from obspy.signal.rotate import rotate2ZNE
from obspy.core import Stream, Trace, read, AttribDict
from obspy.signal.invsim import paz_2_amplitude_value_of_freq_resp
In [51]:
import matplotlib.pyplot as plt
import pandas as pd
In [52]:
from __future__ import print_function
%matplotlib inline
import matplotlib.pyplot as plt
#plt.style.use('ggplot')
plt.rcParams['figure.figsize'] = 11, 6
In [53]:
import numpy as np
import pandas as pd
from obspy import UTCDateTime
import matplotlib.pyplot as plt
import math
from scipy.optimize import curve_fit
import numpy.random as npr
import os.path
In [54]:
#print(np.__version__)
In [55]:
import obspy as op
#print(op.__version__)
In [56]:
import sys
#print(sys.version)
In [57]:
import warnings
warnings.filterwarnings('ignore')
In [58]:
from IPython.display import HTML
HTML('''<script>
code_show=true; 
function code_toggle() {
 if (code_show){
 $('div.input').hide();
 } else {
 $('div.input').show();
 }
 code_show = !code_show
} 
$( document ).ready(code_toggle);
</script>
<form action="javascript:code_toggle()"><input type="submit" value="Click here to toggle on/off the raw code."></form>''')
Out[58]:
In [59]:
hnm_pdf =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/HNM.dat", sep=" ",header=None)
In [60]:
lnm_pdf =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/LNM.dat", sep=" ",header=None)
In [61]:
sm_100s =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/bktest_SM_0.010265_.out", 
                          sep=" ",names=["sta", "zval_med", "nval_med", "eval_med", "nz_val_med", "ez_val_med", "en_val_med"],
                          header=None, skiprows=1)
In [62]:
sm_200s =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/bktest_SM_0.005132_.out", 
                          sep=" ",names=["sta", "zval_med", "nval_med", "eval_med", "nz_val_med", "ez_val_med", "en_val_med"],
                          header=None, skiprows=1)
In [63]:
sm_50s =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/bktest_SM_0.020530_.out", 
                          sep=" ",names=["sta", "zval_med", "nval_med", "eval_med", "nz_val_med", "ez_val_med", "en_val_med"],
                          header=None, skiprows=1)
In [64]:
bk70_hnz_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK70.BK.HNZ.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk70_hnz_psd_nona = bk70_hnz_psd.dropna()
bk70_hnn_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK70.BK.HNN.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk70_hnn_psd_nona = bk70_hnn_psd.dropna()
bk70_hne_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK70.BK.HNE.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk70_hne_psd_nona = bk70_hne_psd.dropna()
bks_hnz_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BKS.BK.HNZ.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bks_hnz_psd_nona = bks_hnz_psd.dropna()
bks_hnn_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BKS.BK.HNN.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bks_hnn_psd_nona = bks_hnn_psd.dropna()
bks_hne_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BKS.BK.HNE.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bks_hne_psd_nona = bks_hne_psd.dropna()
bk63_hnz_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK63.BK.HNZ.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk63_hnz_psd_nona = bk63_hnz_psd.dropna()
bk63_hnn_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK63.BK.HNN.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk63_hnn_psd_nona = bk63_hnn_psd.dropna()
bk63_hne_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK63.BK.HNE.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk63_hne_psd_nona = bk63_hne_psd.dropna()
bk64_hnz_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK64.BK.HNZ.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk64_hnz_psd_nona = bk64_hnz_psd.dropna()
bk64_hnn_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK64.BK.HNN.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk64_hnn_psd_nona = bk64_hnn_psd.dropna()
bk64_hne_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK64.BK.HNE.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk64_hne_psd_nona = bk64_hne_psd.dropna()
bk65_hnz_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK65.BK.HNZ.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk65_hnz_psd_nona = bk65_hnz_psd.dropna()
bk65_hnn_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK65.BK.HNN.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk65_hnn_psd_nona = bk65_hnn_psd.dropna()
bk65_hne_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK65.BK.HNE.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk65_hne_psd_nona = bk65_hne_psd.dropna()
bk66_hnz_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK66.BK.HNZ.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk66_hnz_psd_nona = bk66_hnz_psd.dropna()
bk66_hnn_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK66.BK.HNN.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk66_hnn_psd_nona = bk66_hnn_psd.dropna()
bk66_hne_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK66.BK.HNE.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk66_hne_psd_nona = bk66_hne_psd.dropna()
bk67_hnz_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK67.BK.HNZ.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk67_hnz_psd_nona = bk67_hnz_psd.dropna()
bk67_hnn_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK67.BK.HNN.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk67_hnn_psd_nona = bk67_hnn_psd.dropna()
bk67_hne_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK67.BK.HNE.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk67_hne_psd_nona = bk67_hne_psd.dropna()
bk68_hnz_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK68.BK.HNZ.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk68_hnz_psd_nona = bk68_hnz_psd.dropna()
bk68_hnn_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK68.BK.HNN.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk68_hnn_psd_nona = bk68_hnn_psd.dropna()
bk68_hne_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK68.BK.HNE.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk68_hne_psd_nona = bk68_hne_psd.dropna()
bk69_hnz_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK69.BK.HNZ.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk69_hnz_psd_nona = bk69_hnz_psd.dropna()
bk69_hnn_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK69.BK.HNN.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk69_hnn_psd_nona = bk69_hnn_psd.dropna()
bk69_hne_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK69.BK.HNE.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk69_hne_psd_nona = bk69_hne_psd.dropna()
bk80_hnz_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK80.BK.HNZ.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk80_hnz_psd_nona = bk80_hnz_psd.dropna()
bk80_hnn_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK80.BK.HNN.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk80_hnn_psd_nona = bk80_hnn_psd.dropna()
bk80_hne_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK80.BK.HNE.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk80_hne_psd_nona = bk80_hne_psd.dropna()
bk81_hnz_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK81.BK.HNZ.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk81_hnz_psd_nona = bk81_hnz_psd.dropna()
bk81_hnn_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK81.BK.HNN.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk81_hnn_psd_nona = bk81_hnn_psd.dropna()
bk81_hne_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK81.BK.HNE.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk81_hne_psd_nona = bk81_hne_psd.dropna()
bk82_hnz_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK82.BK.HNZ.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk82_hnz_psd_nona = bk82_hnz_psd.dropna()
bk82_hnn_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK82.BK.HNN.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk82_hnn_psd_nona = bk82_hnn_psd.dropna()
bk82_hne_psd =pd.read_csv("http://ncedc.org/ftp/outgoing/taira/WQC/ByerlyVault_PSD/freq.stack_BK82.BK.HNE.00_.out", 
                          sep=" ",names=["freq", "med", "mean", "l95", "h95", "min", "max", "sd","var","sta","net","com","loc"],
                          header=None, skiprows=1)
bk82_hne_psd_nona = bk82_hne_psd.dropna()
In [65]:
ref_hnz_pasd_nona = bks_hnz_psd_nona.copy()
ref_hnn_pasd_nona = bks_hnn_psd_nona.copy()
ref_hne_pasd_nona = bks_hne_psd_nona.copy()
bk63_hnz_psd_nona.rmed = bk63_hnz_psd_nona.med - ref_hnz_pasd_nona.med
bk63_hnn_psd_nona.rmed = bk63_hnn_psd_nona.med - ref_hnn_pasd_nona.med
bk63_hne_psd_nona.rmed = bk63_hne_psd_nona.med - ref_hne_pasd_nona.med
bk64_hnz_psd_nona.rmed = bk64_hnz_psd_nona.med - ref_hnz_pasd_nona.med
bk64_hnn_psd_nona.rmed = bk64_hnn_psd_nona.med - ref_hnn_pasd_nona.med
bk64_hne_psd_nona.rmed = bk64_hne_psd_nona.med - ref_hne_pasd_nona.med
bk65_hnz_psd_nona.rmed = bk65_hnz_psd_nona.med - ref_hnz_pasd_nona.med
bk65_hnn_psd_nona.rmed = bk65_hnn_psd_nona.med - ref_hnn_pasd_nona.med
bk65_hne_psd_nona.rmed = bk65_hne_psd_nona.med - ref_hne_pasd_nona.med
bk66_hnz_psd_nona.rmed = bk66_hnz_psd_nona.med - ref_hnz_pasd_nona.med
bk66_hnn_psd_nona.rmed = bk66_hnn_psd_nona.med - ref_hnn_pasd_nona.med
bk66_hne_psd_nona.rmed = bk66_hne_psd_nona.med - ref_hne_pasd_nona.med
bk67_hnz_psd_nona.rmed = bk67_hnz_psd_nona.med - ref_hnz_pasd_nona.med
bk67_hnn_psd_nona.rmed = bk67_hnn_psd_nona.med - ref_hnn_pasd_nona.med
bk67_hne_psd_nona.rmed = bk67_hne_psd_nona.med - ref_hne_pasd_nona.med
bk68_hnz_psd_nona.rmed = bk68_hnz_psd_nona.med - ref_hnz_pasd_nona.med
bk68_hnn_psd_nona.rmed = bk68_hnn_psd_nona.med - ref_hnn_pasd_nona.med
bk68_hne_psd_nona.rmed = bk68_hne_psd_nona.med - ref_hne_pasd_nona.med
bk69_hnz_psd_nona.rmed = bk69_hnz_psd_nona.med - ref_hnz_pasd_nona.med
bk69_hnn_psd_nona.rmed = bk69_hnn_psd_nona.med - ref_hnn_pasd_nona.med
bk69_hne_psd_nona.rmed = bk69_hne_psd_nona.med - ref_hne_pasd_nona.med
bk70_hnz_psd_nona.rmed = bk70_hnz_psd_nona.med - ref_hnz_pasd_nona.med
bk70_hnn_psd_nona.rmed = bk70_hnn_psd_nona.med - ref_hnn_pasd_nona.med
bk70_hne_psd_nona.rmed = bk70_hne_psd_nona.med - ref_hne_pasd_nona.med
bk80_hnz_psd_nona.rmed = bk80_hnz_psd_nona.med - ref_hnz_pasd_nona.med
bk80_hnn_psd_nona.rmed = bk80_hnn_psd_nona.med - ref_hnn_pasd_nona.med
bk80_hne_psd_nona.rmed = bk80_hne_psd_nona.med - ref_hne_pasd_nona.med
bk81_hnz_psd_nona.rmed = bk81_hnz_psd_nona.med - ref_hnz_pasd_nona.med
bk81_hnn_psd_nona.rmed = bk81_hnn_psd_nona.med - ref_hnn_pasd_nona.med
bk81_hne_psd_nona.rmed = bk81_hne_psd_nona.med - ref_hne_pasd_nona.med
bk82_hnz_psd_nona.rmed = bk82_hnz_psd_nona.med - ref_hnz_pasd_nona.med
bk82_hnn_psd_nona.rmed = bk82_hnn_psd_nona.med - ref_hnn_pasd_nona.med
bk82_hne_psd_nona.rmed = bk82_hne_psd_nona.med - ref_hne_pasd_nona.med
In [66]:
plt.rcParams['figure.figsize'] = 14, 6

import matplotlib.pyplot as plt
import matplotlib.dates as mdates
fig, ax = plt.subplots()
ticks = [10,20,50,100,200,500,1000]
ax.set_xticks(ticks, minor=False)
cmap = plt.get_cmap("tab20c") 


plt.plot(1/bks_hnz_psd_nona.freq, bks_hnz_psd_nona.med, color=cmap(0), linestyle='solid',linewidth = 3.0, label='BKS')

plt.plot(1/bk63_hnz_psd_nona.freq, bk63_hnz_psd_nona.med, color=cmap(0), linestyle='solid',linewidth = 3.0, label='BK63')
plt.plot(1/bk64_hnz_psd_nona.freq, bk64_hnz_psd_nona.med, color=cmap(1), linestyle='solid',linewidth = 3.0, label='BK64')
plt.plot(1/bk65_hnz_psd_nona.freq, bk65_hnz_psd_nona.med, color=cmap(2), linestyle='solid',linewidth = 3.0, label='BK65')
plt.plot(1/bk66_hnz_psd_nona.freq, bk66_hnz_psd_nona.med, color=cmap(3), linestyle='solid',linewidth = 3.0, label='BK66')
plt.plot(1/bk67_hnz_psd_nona.freq, bk67_hnz_psd_nona.med, color=cmap(4), linestyle='solid',linewidth = 3.0, label='BK67')
plt.plot(1/bk68_hnz_psd_nona.freq, bk68_hnz_psd_nona.med, color=cmap(5), linestyle='solid',linewidth = 3.0, label='BK68')
plt.plot(1/bk69_hnz_psd_nona.freq, bk69_hnz_psd_nona.med, color=cmap(6), linestyle='solid',linewidth = 3.0, label='BK69')


plt.plot(1/bk70_hnz_psd_nona.freq, bk70_hnz_psd_nona.med, color=cmap(7), linestyle='solid',linewidth = 3.0, label='BK70')
plt.plot(1/bk80_hnz_psd_nona.freq, bk80_hnz_psd_nona.med, color=cmap(8), linestyle='solid',linewidth = 3.0, label='BK80')
plt.plot(1/bk81_hnz_psd_nona.freq, bk81_hnz_psd_nona.med, color=cmap(9), linestyle='solid',linewidth = 3.0, label='BK81')
plt.plot(1/bk82_hnz_psd_nona.freq, bk82_hnz_psd_nona.med, color=cmap(10), linestyle='solid',linewidth = 3.0, label='BK82')
plt.plot(hnm_pdf[0], hnm_pdf[1], color='black',linestyle='dashed',linewidth = 2.0,label='HNM')
plt.plot(lnm_pdf[0], lnm_pdf[1], color='black',linestyle='solid',linewidth = 2.0,label='LNM')
plt.xscale("log")
plt.xlim(0.01,10000)
plt.ylim(-150,-60)

plt.grid(which='major',color='black',linestyle='-',linewidth = 0.5)
plt.grid(which='minor',color='black',linestyle='-',linewidth = 0.25)

plt.xlabel("Periods (s)", fontsize=16)
plt.ylabel("PSD Power [10log(m**2/sec**4/Hz)] (dB)", fontsize=16)
plt.title("Byerly Vault PSD Com=HNZ",fontsize=16)

plt.tick_params(labelsize=14)
plt.xticks([0.01,0.02,0.05,0.1,0.2,0.5,1,2,5,10,20, 50,100,200,500,1000,2000,5000,10000], 
           ["0.01","0.02","0.05","0.1","0.2","0.5","1","2","5","10","20","50","100","200","500","1000","2000","5000","10000"])

#plt.legend([p3, p2, p1, p4, p5, p6, p7], ["BK.JEPS.LHN", "BK.JEPS.LHE", "High Noise Model", "TA-Mean (LHN,LHE)", "BDSN-RefTek-Mean (LHN,LHE)", "USGS-Crest-Mean (HHN,HHE)","BDSN-STS1-Mean (LHN,LHE)"], loc="upper right", fontsize=14)
#plt.legend([p33, p22, p3, p2, p1, p4, p5], ["BK.OAKV.LHN", "BK.OAKV.LHE", "BK.JEPS.LHN", "BK.JEPS.LHE", "High Noise Model", "TA-Mean (LHN,LHE)", "BDSN-RefTek-Mean (LHN,LHE)"], loc="upper right", fontsize=14)

plt.legend(loc="upper right", fontsize=14) # 凡例を表示

print("Figure 1: PSD of strong-motion data in the vertical component")
Figure 1: PSD of strong-motion data in the vertical component
In [67]:
plt.rcParams['figure.figsize'] = 14, 6

import matplotlib.pyplot as plt
import matplotlib.dates as mdates
fig, ax = plt.subplots()
ticks = [10,20,50,100,200,500,1000]
ax.set_xticks(ticks, minor=False)
cmap = plt.get_cmap("tab20c") 


plt.plot(1/bks_hnn_psd_nona.freq, bks_hnn_psd_nona.med, color=cmap(0), linestyle='solid',linewidth = 3.0, label='BKS')

plt.plot(1/bk63_hnn_psd_nona.freq, bk63_hnn_psd_nona.med, color=cmap(0), linestyle='solid',linewidth = 3.0, label='BK63')
plt.plot(1/bk64_hnn_psd_nona.freq, bk64_hnn_psd_nona.med, color=cmap(1), linestyle='solid',linewidth = 3.0, label='BK64')
plt.plot(1/bk65_hnn_psd_nona.freq, bk65_hnn_psd_nona.med, color=cmap(2), linestyle='solid',linewidth = 3.0, label='BK65')
plt.plot(1/bk66_hnn_psd_nona.freq, bk66_hnn_psd_nona.med, color=cmap(3), linestyle='solid',linewidth = 3.0, label='BK66')
plt.plot(1/bk67_hnn_psd_nona.freq, bk67_hnn_psd_nona.med, color=cmap(4), linestyle='solid',linewidth = 3.0, label='BK67')
plt.plot(1/bk68_hnn_psd_nona.freq, bk68_hnn_psd_nona.med, color=cmap(5), linestyle='solid',linewidth = 3.0, label='BK68')
plt.plot(1/bk69_hnn_psd_nona.freq, bk69_hnn_psd_nona.med, color=cmap(6), linestyle='solid',linewidth = 3.0, label='BK69')


plt.plot(1/bk70_hnn_psd_nona.freq, bk70_hnn_psd_nona.med, color=cmap(7), linestyle='solid',linewidth = 3.0, label='BK70')
plt.plot(1/bk80_hnn_psd_nona.freq, bk80_hnn_psd_nona.med, color=cmap(8), linestyle='solid',linewidth = 3.0, label='BK80')
plt.plot(1/bk81_hnn_psd_nona.freq, bk81_hnn_psd_nona.med, color=cmap(9), linestyle='solid',linewidth = 3.0, label='BK81')
plt.plot(1/bk82_hnn_psd_nona.freq, bk82_hnn_psd_nona.med, color=cmap(10), linestyle='solid',linewidth = 3.0, label='BK82')
plt.plot(hnm_pdf[0], hnm_pdf[1], color='black',linestyle='dashed',linewidth = 2.0,label='HNM')
plt.plot(lnm_pdf[0], lnm_pdf[1], color='black',linestyle='solid',linewidth = 2.0,label='LNM')
plt.xscale("log")
plt.xlim(0.01,10000)
plt.ylim(-150,-60)

plt.grid(which='major',color='black',linestyle='-',linewidth = 0.5)
plt.grid(which='minor',color='black',linestyle='-',linewidth = 0.25)

plt.xlabel("Periods (s)", fontsize=16)
plt.ylabel("PSD Power [10log(m**2/sec**4/Hz)] (dB)", fontsize=16)
plt.title("Byerly Vault PSD Com=HNN",fontsize=16)

plt.tick_params(labelsize=14)
plt.xticks([0.01,0.02,0.05,0.1,0.2,0.5,1,2,5,10,20, 50,100,200,500,1000,2000,5000,10000], 
           ["0.01","0.02","0.05","0.1","0.2","0.5","1","2","5","10","20","50","100","200","500","1000","2000","5000","10000"])

#plt.legend([p3, p2, p1, p4, p5, p6, p7], ["BK.JEPS.LHN", "BK.JEPS.LHE", "High Noise Model", "TA-Mean (LHN,LHE)", "BDSN-RefTek-Mean (LHN,LHE)", "USGS-Crest-Mean (HHN,HHE)","BDSN-STS1-Mean (LHN,LHE)"], loc="upper right", fontsize=14)
#plt.legend([p33, p22, p3, p2, p1, p4, p5], ["BK.OAKV.LHN", "BK.OAKV.LHE", "BK.JEPS.LHN", "BK.JEPS.LHE", "High Noise Model", "TA-Mean (LHN,LHE)", "BDSN-RefTek-Mean (LHN,LHE)"], loc="upper right", fontsize=14)

plt.legend(loc="upper right", fontsize=14) # 凡例を表示

print("Figure 2: PSD of strong-motion data in the N-S component")
Figure 2: PSD of strong-motion data in the N-S component
In [68]:
plt.rcParams['figure.figsize'] = 14, 6

import matplotlib.pyplot as plt
import matplotlib.dates as mdates
fig, ax = plt.subplots()
ticks = [10,20,50,100,200,500,1000]
ax.set_xticks(ticks, minor=False)
cmap = plt.get_cmap("tab20c") 


plt.plot(1/bks_hne_psd_nona.freq, bks_hne_psd_nona.med, color=cmap(0), linestyle='solid',linewidth = 3.0, label='BKS')

plt.plot(1/bk63_hne_psd_nona.freq, bk63_hne_psd_nona.med, color=cmap(0), linestyle='solid',linewidth = 3.0, label='BK63')
plt.plot(1/bk64_hne_psd_nona.freq, bk64_hne_psd_nona.med, color=cmap(1), linestyle='solid',linewidth = 3.0, label='BK64')
plt.plot(1/bk65_hne_psd_nona.freq, bk65_hne_psd_nona.med, color=cmap(2), linestyle='solid',linewidth = 3.0, label='BK65')
plt.plot(1/bk66_hne_psd_nona.freq, bk66_hne_psd_nona.med, color=cmap(3), linestyle='solid',linewidth = 3.0, label='BK66')
plt.plot(1/bk67_hne_psd_nona.freq, bk67_hne_psd_nona.med, color=cmap(4), linestyle='solid',linewidth = 3.0, label='BK67')
plt.plot(1/bk68_hne_psd_nona.freq, bk68_hne_psd_nona.med, color=cmap(5), linestyle='solid',linewidth = 3.0, label='BK68')
plt.plot(1/bk69_hne_psd_nona.freq, bk69_hne_psd_nona.med, color=cmap(6), linestyle='solid',linewidth = 3.0, label='BK69')


plt.plot(1/bk70_hne_psd_nona.freq, bk70_hne_psd_nona.med, color=cmap(7), linestyle='solid',linewidth = 3.0, label='BK70')
plt.plot(1/bk80_hne_psd_nona.freq, bk80_hne_psd_nona.med, color=cmap(8), linestyle='solid',linewidth = 3.0, label='BK80')
plt.plot(1/bk81_hne_psd_nona.freq, bk81_hne_psd_nona.med, color=cmap(9), linestyle='solid',linewidth = 3.0, label='BK81')
plt.plot(1/bk82_hne_psd_nona.freq, bk82_hne_psd_nona.med, color=cmap(10), linestyle='solid',linewidth = 3.0, label='BK82')
plt.plot(hnm_pdf[0], hnm_pdf[1], color='black',linestyle='dashed',linewidth = 2.0,label='HNM')
plt.plot(lnm_pdf[0], lnm_pdf[1], color='black',linestyle='solid',linewidth = 2.0,label='LNM')
plt.xscale("log")
plt.xlim(0.01,10000)
plt.ylim(-150,-60)

plt.grid(which='major',color='black',linestyle='-',linewidth = 0.5)
plt.grid(which='minor',color='black',linestyle='-',linewidth = 0.25)

plt.xlabel("Periods (s)", fontsize=16)
plt.ylabel("PSD Power [10log(m**2/sec**4/Hz)] (dB)", fontsize=16)
plt.title("Byerly Vault PSD Com=HNE",fontsize=16)

plt.tick_params(labelsize=14)
plt.xticks([0.01,0.02,0.05,0.1,0.2,0.5,1,2,5,10,20, 50,100,200,500,1000,2000,5000,10000], 
           ["0.01","0.02","0.05","0.1","0.2","0.5","1","2","5","10","20","50","100","200","500","1000","2000","5000","10000"])

#plt.legend([p3, p2, p1, p4, p5, p6, p7], ["BK.JEPS.LHN", "BK.JEPS.LHE", "High Noise Model", "TA-Mean (LHN,LHE)", "BDSN-RefTek-Mean (LHN,LHE)", "USGS-Crest-Mean (HHN,HHE)","BDSN-STS1-Mean (LHN,LHE)"], loc="upper right", fontsize=14)
#plt.legend([p33, p22, p3, p2, p1, p4, p5], ["BK.OAKV.LHN", "BK.OAKV.LHE", "BK.JEPS.LHN", "BK.JEPS.LHE", "High Noise Model", "TA-Mean (LHN,LHE)", "BDSN-RefTek-Mean (LHN,LHE)"], loc="upper right", fontsize=14)

plt.legend(loc="upper right", fontsize=14) # 凡例を表示

print("Figure 3: PSD of strong-motion data in the E-W component")
Figure 3: PSD of strong-motion data in the E-W component
In [69]:
plt.rcParams['figure.figsize'] = 14, 6

import matplotlib.pyplot as plt
import matplotlib.dates as mdates
fig, ax = plt.subplots()
ticks = [10,20,50,100,200,500,1000]
ax.set_xticks(ticks, minor=False)
cmap = plt.get_cmap("tab20c") 


#plt.plot(1/bks_hnz_psd_nona.freq, bks_hnz_psd_nona.rmed, color=cmap(0), linestyle='solid',linewidth = 3.0, label='BKS')

plt.plot(1/bk63_hnz_psd_nona.freq, bk63_hnz_psd_nona.rmed, color=cmap(0), linestyle='solid',linewidth = 3.0, label='BK63')
plt.plot(1/bk64_hnz_psd_nona.freq, bk64_hnz_psd_nona.rmed, color=cmap(1), linestyle='solid',linewidth = 3.0, label='BK64')
plt.plot(1/bk65_hnz_psd_nona.freq, bk65_hnz_psd_nona.rmed, color=cmap(2), linestyle='solid',linewidth = 3.0, label='BK65')
plt.plot(1/bk66_hnz_psd_nona.freq, bk66_hnz_psd_nona.rmed, color=cmap(3), linestyle='solid',linewidth = 3.0, label='BK66')
plt.plot(1/bk67_hnz_psd_nona.freq, bk67_hnz_psd_nona.rmed, color=cmap(4), linestyle='solid',linewidth = 3.0, label='BK67')
plt.plot(1/bk68_hnz_psd_nona.freq, bk68_hnz_psd_nona.rmed, color=cmap(5), linestyle='solid',linewidth = 3.0, label='BK68')
plt.plot(1/bk69_hnz_psd_nona.freq, bk69_hnz_psd_nona.rmed, color=cmap(6), linestyle='solid',linewidth = 3.0, label='BK69')


plt.plot(1/bk70_hnz_psd_nona.freq, bk70_hnz_psd_nona.rmed, color=cmap(7), linestyle='solid',linewidth = 3.0, label='BK70')
plt.plot(1/bk80_hnz_psd_nona.freq, bk80_hnz_psd_nona.rmed, color=cmap(8), linestyle='solid',linewidth = 3.0, label='BK80')
plt.plot(1/bk81_hnz_psd_nona.freq, bk81_hnz_psd_nona.rmed, color=cmap(9), linestyle='solid',linewidth = 3.0, label='BK81')
plt.plot(1/bk82_hnz_psd_nona.freq, bk82_hnz_psd_nona.rmed, color=cmap(10), linestyle='solid',linewidth = 3.0, label='BK82')
#plt.plot(hnm_pdf[0], hnm_pdf[1], color='black',linestyle='dashed',linewidth = 2.0,label='HNM')
#plt.plot(lnm_pdf[0], lnm_pdf[1], color='black',linestyle='solid',linewidth = 2.0,label='LNM')
plt.xscale("log")
plt.xlim(0.01,10000)
plt.ylim(-10,50)

plt.grid(which='major',color='black',linestyle='-',linewidth = 0.5)
plt.grid(which='minor',color='black',linestyle='-',linewidth = 0.25)

plt.xlabel("Periods (s)", fontsize=16)
plt.ylabel("Relative PSD Power [10log(m**2/sec**4/Hz)] (dB)", fontsize=16)
plt.title("Byerly Vault rPSD (ref:BKS) Com=HNZ",fontsize=16)

plt.tick_params(labelsize=14)
plt.xticks([0.01,0.02,0.05,0.1,0.2,0.5,1,2,5,10,20, 50,100,200,500,1000,2000,5000,10000], 
           ["0.01","0.02","0.05","0.1","0.2","0.5","1","2","5","10","20","50","100","200","500","1000","2000","5000","10000"])

#plt.legend([p3, p2, p1, p4, p5, p6, p7], ["BK.JEPS.LHN", "BK.JEPS.LHE", "High Noise Model", "TA-Mean (LHN,LHE)", "BDSN-RefTek-Mean (LHN,LHE)", "USGS-Crest-Mean (HHN,HHE)","BDSN-STS1-Mean (LHN,LHE)"], loc="upper right", fontsize=14)
#plt.legend([p33, p22, p3, p2, p1, p4, p5], ["BK.OAKV.LHN", "BK.OAKV.LHE", "BK.JEPS.LHN", "BK.JEPS.LHE", "High Noise Model", "TA-Mean (LHN,LHE)", "BDSN-RefTek-Mean (LHN,LHE)"], loc="upper right", fontsize=14)

plt.legend(loc="upper right", fontsize=14) # 凡例を表示

print("Figure 4: Relative PSD (BKS as reference) of strong-motion data in the vertical component")
Figure 4: Relative PSD (BKS as reference) of strong-motion data in the vertical component
In [70]:
plt.rcParams['figure.figsize'] = 14, 6

import matplotlib.pyplot as plt
import matplotlib.dates as mdates
fig, ax = plt.subplots()
ticks = [10,20,50,100,200,500,1000]
ax.set_xticks(ticks, minor=False)
cmap = plt.get_cmap("tab20c") 


#plt.plot(1/bks_hnn_psd_nona.freq, bks_hnn_psd_nona.rmed, color=cmap(0), linestyle='solid',linewidth = 3.0, label='BKS')

plt.plot(1/bk63_hnn_psd_nona.freq, bk63_hnn_psd_nona.rmed, color=cmap(0), linestyle='solid',linewidth = 3.0, label='BK63')
plt.plot(1/bk64_hnn_psd_nona.freq, bk64_hnn_psd_nona.rmed, color=cmap(1), linestyle='solid',linewidth = 3.0, label='BK64')
plt.plot(1/bk65_hnn_psd_nona.freq, bk65_hnn_psd_nona.rmed, color=cmap(2), linestyle='solid',linewidth = 3.0, label='BK65')
plt.plot(1/bk66_hnn_psd_nona.freq, bk66_hnn_psd_nona.rmed, color=cmap(3), linestyle='solid',linewidth = 3.0, label='BK66')
plt.plot(1/bk67_hnn_psd_nona.freq, bk67_hnn_psd_nona.rmed, color=cmap(4), linestyle='solid',linewidth = 3.0, label='BK67')
plt.plot(1/bk68_hnn_psd_nona.freq, bk68_hnn_psd_nona.rmed, color=cmap(5), linestyle='solid',linewidth = 3.0, label='BK68')
plt.plot(1/bk69_hnn_psd_nona.freq, bk69_hnn_psd_nona.rmed, color=cmap(6), linestyle='solid',linewidth = 3.0, label='BK69')


plt.plot(1/bk70_hnn_psd_nona.freq, bk70_hnn_psd_nona.rmed, color=cmap(7), linestyle='solid',linewidth = 3.0, label='BK70')
plt.plot(1/bk80_hnn_psd_nona.freq, bk80_hnn_psd_nona.rmed, color=cmap(8), linestyle='solid',linewidth = 3.0, label='BK80')
plt.plot(1/bk81_hnn_psd_nona.freq, bk81_hnn_psd_nona.rmed, color=cmap(9), linestyle='solid',linewidth = 3.0, label='BK81')
plt.plot(1/bk82_hnn_psd_nona.freq, bk82_hnn_psd_nona.rmed, color=cmap(10), linestyle='solid',linewidth = 3.0, label='BK82')
#plt.plot(hnm_pdf[0], hnm_pdf[1], color='black',linestyle='dashed',linewidth = 2.0,label='HNM')
#plt.plot(lnm_pdf[0], lnm_pdf[1], color='black',linestyle='solid',linewidth = 2.0,label='LNM')
plt.xscale("log")
plt.xlim(0.01,10000)
plt.ylim(-10,50)

plt.grid(which='major',color='black',linestyle='-',linewidth = 0.5)
plt.grid(which='minor',color='black',linestyle='-',linewidth = 0.25)

plt.xlabel("Periods (s)", fontsize=16)
plt.ylabel("Relative PSD Power [10log(m**2/sec**4/Hz)] (dB)", fontsize=16)
plt.title("Byerly Vault rPSD (ref:BKS) Com=HNN",fontsize=16)

plt.tick_params(labelsize=14)
plt.xticks([0.01,0.02,0.05,0.1,0.2,0.5,1,2,5,10,20, 50,100,200,500,1000,2000,5000,10000], 
           ["0.01","0.02","0.05","0.1","0.2","0.5","1","2","5","10","20","50","100","200","500","1000","2000","5000","10000"])

#plt.legend([p3, p2, p1, p4, p5, p6, p7], ["BK.JEPS.LHN", "BK.JEPS.LHE", "High Noise Model", "TA-Mean (LHN,LHE)", "BDSN-RefTek-Mean (LHN,LHE)", "USGS-Crest-Mean (HHN,HHE)","BDSN-STS1-Mean (LHN,LHE)"], loc="upper right", fontsize=14)
#plt.legend([p33, p22, p3, p2, p1, p4, p5], ["BK.OAKV.LHN", "BK.OAKV.LHE", "BK.JEPS.LHN", "BK.JEPS.LHE", "High Noise Model", "TA-Mean (LHN,LHE)", "BDSN-RefTek-Mean (LHN,LHE)"], loc="upper right", fontsize=14)

plt.legend(loc="upper right", fontsize=14) # 凡例を表示

print("Figure 5: Relative PSD (BKS as reference) of strong-motion data in the N-S component")
Figure 5: Relative PSD (BKS as reference) of strong-motion data in the N-S component
In [71]:
plt.rcParams['figure.figsize'] = 14, 6

import matplotlib.pyplot as plt
import matplotlib.dates as mdates
fig, ax = plt.subplots()
ticks = [10,20,50,100,200,500,1000]
ax.set_xticks(ticks, minor=False)
cmap = plt.get_cmap("tab20c") 


#plt.plot(1/bks_hne_psd_nona.freq, bks_hne_psd_nona.rmed, color=cmap(0), linestyle='solid',linewidth = 3.0, label='BKS')

plt.plot(1/bk63_hne_psd_nona.freq, bk63_hne_psd_nona.rmed, color=cmap(0), linestyle='solid',linewidth = 3.0, label='BK63')
plt.plot(1/bk64_hne_psd_nona.freq, bk64_hne_psd_nona.rmed, color=cmap(1), linestyle='solid',linewidth = 3.0, label='BK64')
plt.plot(1/bk65_hne_psd_nona.freq, bk65_hne_psd_nona.rmed, color=cmap(2), linestyle='solid',linewidth = 3.0, label='BK65')
plt.plot(1/bk66_hne_psd_nona.freq, bk66_hne_psd_nona.rmed, color=cmap(3), linestyle='solid',linewidth = 3.0, label='BK66')
plt.plot(1/bk67_hne_psd_nona.freq, bk67_hne_psd_nona.rmed, color=cmap(4), linestyle='solid',linewidth = 3.0, label='BK67')
plt.plot(1/bk68_hne_psd_nona.freq, bk68_hne_psd_nona.rmed, color=cmap(5), linestyle='solid',linewidth = 3.0, label='BK68')
plt.plot(1/bk69_hne_psd_nona.freq, bk69_hne_psd_nona.rmed, color=cmap(6), linestyle='solid',linewidth = 3.0, label='BK69')


plt.plot(1/bk70_hne_psd_nona.freq, bk70_hne_psd_nona.rmed, color=cmap(7), linestyle='solid',linewidth = 3.0, label='BK70')
plt.plot(1/bk80_hne_psd_nona.freq, bk80_hne_psd_nona.rmed, color=cmap(8), linestyle='solid',linewidth = 3.0, label='BK80')
plt.plot(1/bk81_hne_psd_nona.freq, bk81_hne_psd_nona.rmed, color=cmap(9), linestyle='solid',linewidth = 3.0, label='BK81')
plt.plot(1/bk82_hne_psd_nona.freq, bk82_hne_psd_nona.rmed, color=cmap(10), linestyle='solid',linewidth = 3.0, label='BK82')
#plt.plot(hnm_pdf[0], hnm_pdf[1], color='black',linestyle='dashed',linewidth = 2.0,label='HNM')
#plt.plot(lnm_pdf[0], lnm_pdf[1], color='black',linestyle='solid',linewidth = 2.0,label='LNM')
plt.xscale("log")
plt.xlim(0.01,10000)
plt.ylim(-10,50)

plt.grid(which='major',color='black',linestyle='-',linewidth = 0.5)
plt.grid(which='minor',color='black',linestyle='-',linewidth = 0.25)

plt.xlabel("Periods (s)", fontsize=16)
plt.ylabel("Relative PSD Power [10log(m**2/sec**4/Hz)] (dB)", fontsize=16)
plt.title("Byerly Vault rPSD (ref:BKS) Com=HNE",fontsize=16)

plt.tick_params(labelsize=14)
plt.xticks([0.01,0.02,0.05,0.1,0.2,0.5,1,2,5,10,20, 50,100,200,500,1000,2000,5000,10000], 
           ["0.01","0.02","0.05","0.1","0.2","0.5","1","2","5","10","20","50","100","200","500","1000","2000","5000","10000"])

#plt.legend([p3, p2, p1, p4, p5, p6, p7], ["BK.JEPS.LHN", "BK.JEPS.LHE", "High Noise Model", "TA-Mean (LHN,LHE)", "BDSN-RefTek-Mean (LHN,LHE)", "USGS-Crest-Mean (hhe,HHE)","BDSN-STS1-Mean (LHN,LHE)"], loc="upper right", fontsize=14)
#plt.legend([p33, p22, p3, p2, p1, p4, p5], ["BK.OAKV.LHN", "BK.OAKV.LHE", "BK.JEPS.LHN", "BK.JEPS.LHE", "High Noise Model", "TA-Mean (LHN,LHE)", "BDSN-RefTek-Mean (LHN,LHE)"], loc="upper right", fontsize=14)

plt.legend(loc="upper right", fontsize=14) # 凡例を表示

print("Figure 6: Relative PSD (BKS as reference) of strong-motion data in the E-W component")
Figure 6: Relative PSD (BKS as reference) of strong-motion data in the E-W component
In [72]:
#plt.rcParams['figure.figsize'] = 11, 6
plt.rcParams['figure.figsize'] = 15, 5
plt.xlabel('Station',fontsize=16)

sta_list = sm_100s.sta.as_matrix()
zval_med = sm_100s.zval_med.as_matrix()
nval_med = sm_100s.nval_med.as_matrix()
eval_med = sm_100s.eval_med.as_matrix()

x_position = np.arange(len(sta_list))
plt.bar(x_position - 0.3, zval_med, width=0.3, label='HNZ')
plt.bar(x_position, nval_med, width=0.3, label='HNN')                    
plt.bar(x_position + 0.3, eval_med, width=0.3, label='HNE')

plt.legend(fontsize=16)
#plt.xticks(x_position + 0.2, x)
plt.xticks(x_position + 0.1, sta_list)

plt.ylabel('PSD at 100-s period', fontsize=16)
#plt.ylabel('PSD at 200-s period', fontsize=16)
plt.title("Byerly Vault PSDs at 100 s period",fontsize=16)

# HN
plt.ylim(-80, -120)
# HH
#plt.ylim(-120, -180)
plt.legend(loc="upper right", fontsize=14) # 凡例を表示
plt.tick_params(labelsize=14)


print("Figure 7: PSD of strong-motion data at 100-s period")

plt.show()
Figure 7: PSD of strong-motion data at 100-s period
In [73]:
#plt.rcParams['figure.figsize'] = 11, 6
plt.rcParams['figure.figsize'] = 15, 5
plt.xlabel('Station',fontsize=16)

sta_list = sm_200s.sta.as_matrix()
zval_med = sm_200s.zval_med.as_matrix()
nval_med = sm_200s.nval_med.as_matrix()
eval_med = sm_200s.eval_med.as_matrix()

x_position = np.arange(len(sta_list))
plt.bar(x_position - 0.3, zval_med, width=0.3, label='HNZ')
plt.bar(x_position, nval_med, width=0.3, label='HNN')                    
plt.bar(x_position + 0.3, eval_med, width=0.3, label='HNE')

plt.legend(fontsize=16)
#plt.xticks(x_position + 0.2, x)
plt.xticks(x_position + 0.1, sta_list)

plt.ylabel('PSD at 200-s period', fontsize=16)
#plt.ylabel('PSD at 200-s period', fontsize=16)
plt.title("Byerly Vault PSDs at 200 s period",fontsize=16)

# HN
plt.ylim(-80, -120)
# HH
#plt.ylim(-120, -180)
plt.legend(loc="upper right", fontsize=14) # 凡例を表示
plt.tick_params(labelsize=14)


print("Figure 8: PSD of strong-motion data at 100-s period")


plt.show()
Figure 8: PSD of strong-motion data at 100-s period
In [74]:
#plt.rcParams['figure.figsize'] = 11, 6
plt.rcParams['figure.figsize'] = 15, 5
plt.xlabel('Station',fontsize=16)

sta_list = sm_50s.sta.as_matrix()
zval_med = sm_50s.zval_med.as_matrix()
nval_med = sm_50s.nval_med.as_matrix()
eval_med = sm_50s.eval_med.as_matrix()

x_position = np.arange(len(sta_list))
plt.bar(x_position - 0.3, zval_med, width=0.3, label='HNZ')
plt.bar(x_position, nval_med, width=0.3, label='HNN')                    
plt.bar(x_position + 0.3, eval_med, width=0.3, label='HNE')

plt.legend(fontsize=16)
#plt.xticks(x_position + 0.2, x)
plt.xticks(x_position + 0.1, sta_list)

plt.ylabel('PSD at 50-s period', fontsize=16)
#plt.ylabel('PSD at 200-s period', fontsize=16)
plt.title("Byerly Vault PSDs at 50 s period",fontsize=16)

# HN
plt.ylim(-80, -120)
# HH
#plt.ylim(-120, -180)
plt.legend(loc="upper right", fontsize=14) # 凡例を表示
plt.tick_params(labelsize=14)


print("Figure 9: PSD of strong-motion data at 50-s period")


plt.show()
Figure 9: PSD of strong-motion data at 50-s period
In [75]:
#plt.rcParams['figure.figsize'] = 11, 6
plt.rcParams['figure.figsize'] = 15, 5
plt.xlabel('Station',fontsize=16)

#ew_20db = pd.DataFrame({'x': [-9999, 99999],
#                   'val': [20, 20]})
#plt.plot(ew_20db.x, ew_20db.val, label = 'Erhard Wielandt 20dB', color='black', linestyle='dashed')

sta_list = sm_100s.sta.as_matrix()
nz_val_med = sm_100s.nz_val_med.as_matrix()
ez_val_med = sm_100s.ez_val_med.as_matrix()
en_val_med = sm_100s.en_val_med.as_matrix()

x_position = np.arange(len(sta_list))
#print(x_position)
plt.bar(x_position - 0.3, np.abs(nz_val_med), width=0.3, label='abs. diff N-Z')
plt.bar(x_position, np.abs(ez_val_med), width=0.3, label='abs. diff E-Z')                    
plt.bar(x_position + 0.3, np.abs(en_val_med), width=0.3, label='abs. diff E-N')

#plt.bar(x_position, y_HNN, width=0.4, label='HNN')
#plt.bar(x_position + 0.4, y_HNE, width=0.4, label='HNE')

plt.legend(fontsize=16)
#plt.xticks(x_position + 0.2, x)
plt.xticks(x_position + 0.1, sta_list)

plt.ylabel('Relative PSD at 100-s period', fontsize=16)
#plt.ylabel('PSD at 200-s period', fontsize=16)
plt.title("Byerly Vault Relative PSDs at 100 s period",fontsize=16)



# HN
#plt.ylim(-85, -120)
# HH
plt.ylim(0, 30)
plt.legend(loc="upper right", fontsize=14) # 凡例を表示
plt.tick_params(labelsize=14)

print("Figure 10: Relative PSD of strong-motion data at 100-s period")

plt.show()
Figure 10: Relative PSD of strong-motion data at 100-s period