def moveout_correction(self):
####################################################################################
'''
Moveout correction relative to a reference ray parameter of 6.4 s/deg. This stretches
the time axis for smaller ray parameters (larger epicentral distances), and
shrinks the time axis for larger ray parameters (smaller epicentral distances).
#NOTE 3-16-16, Moveout correction doesn't work properly... The time axis seems
to be stretching in the opposite way that it should.
'''
p = self.slowness_table[:,0]
s = self.slowness_table[:,1]
#interpolate with np.interp. make sure values in the first vector are increasing
scale = np.interp(self.ray_param,p[::-1],s[::-1])
#print "ray parameter, scale = ",self.ray_param,scale
#scale the receiver function and interpolate new time axis
new_time = self.time * scale
f = interp1d(new_time,self.rf_st[0].data,bounds_error=False,fill_value=0)
self.rf_st[0].data = f(self.time)
f = interp1d(new_time,self.rf_st[1].data,bounds_error=False,fill_value=0)
self.rf_st[1].data = f(self.time)
f = interp1d(new_time,self.rf_st[2].data,bounds_error=False,fill_value=0)
self.rf_st[2].data = f(self.time)
####################################################################################
评论列表
文章目录