Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Fast implementation of the translation and rotation specific exp function
"""
t_val = imt_func(B_val, no.value)
phiP_val = B_val - mult_with_ninf(t_val)
phi = np.sqrt(-float(gmt_func(phiP_val, phiP_val)[0]))
P_val = phiP_val / phi
P_n_val = gmt_func(P_val, I3.value)
t_nor_val = gmt_func(imt_func(t_val, P_n_val), P_n_val)
t_par_val = t_val - t_nor_val
coef_val = np.sin(phi) * P_val
coef_val[0] += np.cos(phi)
R_val = coef_val + gmt_func(coef_val, mult_with_ninf(t_nor_val)) + \
np.sinc(phi/np.pi) * mult_with_ninf(t_par_val)
return R_val
def val_exp(B_val):
"""
Fast implementation of the translation and rotation specific exp function
"""
t_val = imt_func(B_val, no.value)
phiP_val = B_val - mult_with_ninf(t_val)
phi = np.sqrt(-float(gmt_func(phiP_val, phiP_val)[0]))
P_val = phiP_val / phi
P_n_val = gmt_func(P_val, I3.value)
t_nor_val = gmt_func(imt_func(t_val, P_n_val), P_n_val)
t_par_val = t_val - t_nor_val
coef_val = np.sin(phi) * P_val
coef_val[0] += np.cos(phi)
R_val = coef_val + gmt_func(coef_val, mult_with_ninf(t_nor_val)) + \
np.sinc(phi/np.pi) * mult_with_ninf(t_par_val)
return R_val
"""
t_val = imt_func(B_val, no.value)
phiP_val = B_val - mult_with_ninf(t_val)
phi = np.sqrt(-float(gmt_func(phiP_val, phiP_val)[0]))
P_val = phiP_val / phi
P_n_val = gmt_func(P_val, I3.value)
t_nor_val = gmt_func(imt_func(t_val, P_n_val), P_n_val)
t_par_val = t_val - t_nor_val
coef_val = np.sin(phi) * P_val
coef_val[0] += np.cos(phi)
R_val = coef_val + gmt_func(coef_val, mult_with_ninf(t_nor_val)) + \
np.sinc(phi/np.pi) * mult_with_ninf(t_par_val)
return R_val