def __init__(self, params):
super(GaussianRandomField, self).__init__(params) # don't forget this line in our classes!
# value of the correlation function at the origin
self.corr_func_at_origin = self.frac_volume * (1.0 - self.frac_volume)
# inverse slope of the normalized correlation function at the origin
beta = np.sqrt(2) * erfinv(2 * (1-self.frac_volume) - 1)
# second derivative of the field acf at the origin
acf_psi_doubleprime = -1.0 / 2 * ( (1.0/self.corr_length)**2 + 1.0 / 3 * (2 * np.pi / self.repeat_distance)**2 )
SSA_tilde = 2.0 / np.pi * np.exp( - beta**2 / 2) * np.sqrt( -acf_psi_doubleprime ) / self.frac_volume
self.inv_slope_at_origin = 4.0 * (1 - self.frac_volume) / SSA_tilde
评论列表
文章目录