def calculate_fourier_trasform_primitive(l: int, ks: Vector, alpha: float) -> complex:
"""
calculate 1D Fourier transform of single gausian primitive function centred in zero
for given ste of kpoints "ks"
"""
gauss = np.exp(-(pi ** 2 / alpha) * ks ** 2)
if l == 0:
return np.sqrt(pi / alpha) * gauss
elif l == 1:
c = -1j * np.sqrt((pi / alpha) ** 3)
return c * ks * gauss
elif l == 2:
c = np.sqrt(pi / alpha ** 5)
return c * ((alpha / 2.0) - (pi ** 2) * (ks ** 2)) * gauss
else:
msg = ("there is not implementation for the primivite fourier "
"transform of l: {}".format(l))
raise NotImplementedError(msg)
评论列表
文章目录