def xy_theta_xy_theta(lib, x1, y1, theta1, x2, y2, theta2): return xy_z_xy_z( lib, x.xy(lib, x1, y1), y.xy(lib, x1, y1), z.xy_theta(lib, x1, y1, theta1), x.xy(lib, x2, y2), y.xy(lib, x2, y2), z.xy_theta(lib, x2, y2, theta2), )
def xy_theta_t(lib, beta, x, y, theta, t): gam = (1 - beta**2)**-0.5 bgam = beta * gam exx = x why = y zee = z.xy_theta(lib, x, y, theta) tee = t return (exx, gam * why + bgam * tee, zee, bgam * why + gam * tee)
def xy_theta_t(lib, gamma, x, y, theta, t): gam = lib.absolute(gamma) bgam = lib.copysign(lib.sqrt(gam**2 - 1), gamma) exx = x why = y zee = z.xy_theta(lib, x, y, theta) tee = t return (exx, gam * why + bgam * tee, zee, bgam * why + gam * tee)
def xy_theta_tau(lib, beta, x, y, theta, tau): gam = (1 - beta**2)**-0.5 bgam = beta * gam exx = x why = y zee = z.xy_theta(lib, x, y, theta) tee = t.xy_theta_tau(lib, x, y, theta, tau) return (gam * exx + bgam * tee, why, zee, tau)
def xy_theta_tau(lib, gamma, x, y, theta, tau): gam = lib.absolute(gamma) bgam = lib.copysign(lib.sqrt(gam ** 2 - 1), gamma) exx = x why = y zee = z.xy_theta(lib, x, y, theta) tee = t.xy_theta_tau(lib, x, y, theta, tau) return (gam * exx + bgam * tee, why, zee, tau)
def rhophi_z_xy_theta(lib, rho1, phi1, z1, x2, y2, theta2): return xy_z_xy_z( lib, x.rhophi(lib, rho1, phi1), y.rhophi(lib, rho1, phi1), z1, x2, y2, z.xy_theta(lib, x2, y2, theta2), )
def rhophi_eta_xy_theta(lib, rho1, phi1, eta1, x2, y2, theta2): return xy_z_xy_z( lib, x.rhophi(lib, rho1, phi1), y.rhophi(lib, rho1, phi1), z.rhophi_eta(lib, rho1, phi1, eta1), x.xy(lib, x2, y2), y.xy(lib, x2, y2), z.xy_theta(lib, x2, y2, theta2), )
def xy_theta_rhophi_eta(lib, x1, y1, theta1, rho2, phi2, eta2): return xy_z_xy_z( lib, x.xy(lib, x1, y1), y.xy(lib, x1, y1), z.xy_theta(lib, x1, y1, theta1), x.rhophi(lib, rho2, phi2), y.rhophi(lib, rho2, phi2), z.rhophi_eta(lib, rho2, phi2, eta2), )
def xy_theta_rhophi_z(lib, x1, y1, theta1, rho2, phi2, z2): return xy_z_xy_z( lib, x1, y1, z.xy_theta(lib, x1, y1, theta1), x.rhophi(lib, rho2, phi2), y.rhophi(lib, rho2, phi2), z2, )
def xy_theta_xy_eta(lib, x1, y1, theta1, x2, y2, eta2): return xy_z_xy_z( lib, x1, y1, z.xy_theta(lib, x1, y1, theta1), x2, y2, z.xy_eta(lib, x2, y2, eta2), )
def rhophi_z_xy_theta(lib, rtol, atol, equal_nan, rho1, phi1, z1, x2, y2, theta2): return xy_z_xy_z( lib, rtol, atol, equal_nan, x.rhophi(lib, rho1, phi1), y.rhophi(lib, rho1, phi1), z1, x2, y2, z.xy_theta(lib, x2, y2, theta2), )
def cartesian_tau_xy_theta_t(lib, x1, y1, z1, tau1, x2, y2, theta2, t2): energy = t2 energy2 = energy**2 mass2 = energy2 - mag2.xy_theta(lib, x2, y2, theta2) mass = lib.sqrt(mass2) # NaN for spacelike boosts propagates everywhere! return cartesian_tau( lib, x1, y1, z1, tau1, energy, mass, mass2, x2, y2, z.xy_theta(lib, x2, y2, theta2), )
def cartesian_tau_xy_theta_tau(lib, x1, y1, z1, tau1, x2, y2, theta2, tau2): mass = tau2 mass2 = mass**2 energy2 = mass2 + mag2.xy_theta(lib, x2, y2, theta2) energy = lib.sqrt( energy2) # NaN for spacelike boosts propagates everywhere! return cartesian_tau( lib, x1, y1, z1, tau1, energy, mass, mass2, x2, y2, z.xy_theta(lib, x2, y2, theta2), )
def xy_theta_t(lib, beta, x, y, theta, t): gam = (1 - beta ** 2) ** -0.5 bgam = beta * gam zee = z.xy_theta(lib, x, y, theta) tee = t return (x, y, gam * zee + bgam * tee, bgam * zee + gam * tee)
def xy_theta_tau(lib, x, y, theta, tau): return xy_z_t( lib, x, y, z.xy_theta(lib, x, y, theta), t.xy_theta_tau(lib, x, y, theta, tau) )
def xy_theta_xy_theta(lib, x1, y1, theta1, x2, y2, theta2): x = x1 - x2 y = y1 - y2 z1 = z.xy_theta(lib, x1, y1, theta1) z2 = z.xy_theta(lib, x2, y2, theta2) return (x, y, theta.xy_z(lib, x, y, z1 - z2))
def cartesian_t_xy_theta(lib, x1, y1, z1, t1, x2, y2, theta2): return cartesian_t(lib, x1, y1, z1, t1, x2, y2, z.xy_theta(lib, x2, y2, theta2))
def cartesian_tau_xy_theta(lib, x1, y1, z1, tau1, x2, y2, theta2): return cartesian_tau(lib, x1, y1, z1, tau1, x2, y2, z.xy_theta(lib, x2, y2, theta2))
def xy_z_xy_theta(lib, x1, y1, z1, x2, y2, theta2): return xy_z_xy_z(lib, x1, y1, z1, x2, y2, z.xy_theta(lib, x2, y2, theta2))
def xy_theta(lib, xx, xy, xz, yx, yy, yz, zx, zy, zz, x, y, theta): return cartesian( lib, xx, xy, xz, yx, yy, yz, zx, zy, zz, x, y, z.xy_theta(lib, x, y, theta) )
def xy_theta_t(lib, x, y, theta, t): return xy_z_t(lib, x, y, z.xy_theta(lib, x, y, theta), t)
def xy_theta(lib, angle, x, y, theta): return xy_z(lib, angle, x, y, z.xy_theta(lib, x, y, theta))
def xy_theta_xy_z(lib, rtol, atol, equal_nan, x1, y1, theta1, x2, y2, z2): return xy_z_xy_z( lib, rtol, atol, equal_nan, x1, y1, z.xy_theta(lib, x1, y1, theta1), x2, y2, z2 )
def xy_theta_tau(lib, gamma, x, y, theta, tau): gam = lib.absolute(gamma) bgam = lib.copysign(lib.sqrt(gam ** 2 - 1), gamma) zee = z.xy_theta(lib, x, y, theta) tee = t.xy_theta_tau(lib, x, y, theta, tau) return (x, y, gam * zee + bgam * tee, tau)
def xy_theta_tau(lib, beta, x, y, theta, tau): gam = (1 - beta ** 2) ** -0.5 bgam = beta * gam zee = z.xy_theta(lib, x, y, theta) tee = t.xy_theta_tau(lib, x, y, theta, tau) return (x, y, gam * zee + bgam * tee, tau)