Florian, this may not be the prettiest code, but it did the job to make Figure 6 in http://pal.auckland.ac.nz/files//2017/01/vanwijkEJP17.pdf
fig = plt.figure(figsize=(25, 10))
for tr in st:
tr.stats[“coordinates”] = {}
tr.stats.coordinates.latitude = tr.stats.sac.stla
tr.stats.coordinates.longitude = tr.stats.sac.stlo
tr.stats.network=‘RU’
delta = locations2degrees(lat, lon, tr.stats.coordinates.latitude, tr.stats.coordinates.longitude)
tr.stats.picks= AttribDict({‘epic_dist’:delta})
plt.text(tr.stats.picks.epic_dist,20,tr.stats.station)
plot travel time predictions onto the data:
st.plot(fig=fig,type=‘section’,time_down=False,norm_method=‘trace’,dist_degree=‘True’,ev_coord =(lat,lon),show=False)
plot the synthetic arrival time curves:
for key, value in data.items():
if key==‘s’:
lines, = plt.plot(np.array(value[0]), value[1],’–r’,linewidth=2)
else:
linep, = plt.plot(np.array(value[0]), value[1],‘b’,linewidth=2)
plt.grid()
plt.xlabel(‘Epicentral distance (degrees)’)
plt.ylabel(‘Time (seconds)’)
plt.xlim([0,10])
plt.legend([linep,lines],[‘P’,‘S’])
#plt.savefig(‘rotoruaSP.pdf’,bbox_inches=‘tight’)
plt.show()