From 7666595455a641d9ecaa69d2cdca6632b15d103b Mon Sep 17 00:00:00 2001 From: Akash265 Date: Tue, 5 Nov 2024 02:40:46 +0530 Subject: [PATCH] Changed M_PI to PI --- tardis/spectrum/formal_integral.py | 6 +++--- tardis/spectrum/formal_integral_cuda.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tardis/spectrum/formal_integral.py b/tardis/spectrum/formal_integral.py index 9b71fc07c66..fdbef19ebf8 100644 --- a/tardis/spectrum/formal_integral.py +++ b/tardis/spectrum/formal_integral.py @@ -24,7 +24,7 @@ ) C_INV = 3.33564e-11 -M_PI = np.pi +PI = np.pi KB_CGS = 1.3806488e-16 H_CGS = 6.62606957e-27 @@ -197,7 +197,7 @@ def numba_formal_integral( pJred_lu += direction pJblue_lu += direction I_nu[p_idx] *= p - L[nu_idx] = 8 * M_PI * M_PI * trapezoid_integration(I_nu, R_max / N) + L[nu_idx] = 8 * PI * PI * trapezoid_integration(I_nu, R_max / N) return L, I_nu_p @@ -640,7 +640,7 @@ def formal_integral(self, nu, N): I_nu = self.transport.I_nu_p * ps L_test = np.array( [ - 8 * M_PI * M_PI * trapezoid_integration((I_nu)[i, :], R_max / N) + 8 * PI * PI * trapezoid_integration((I_nu)[i, :], R_max / N) for i in range(nu.shape[0]) ] ) diff --git a/tardis/spectrum/formal_integral_cuda.py b/tardis/spectrum/formal_integral_cuda.py index 31de2572312..d398dc25fd5 100644 --- a/tardis/spectrum/formal_integral_cuda.py +++ b/tardis/spectrum/formal_integral_cuda.py @@ -6,7 +6,7 @@ from tardis.transport.montecarlo.configuration.constants import SIGMA_THOMSON C_INV = 3.33564e-11 -M_PI = np.pi +PI = np.pi KB_CGS = 1.3806488e-16 H_CGS = 6.62606957e-27 @@ -28,7 +28,7 @@ def cuda_vector_integrator(L, I_nu, N, R_max): """ nu_idx = cuda.grid(1) L[nu_idx] = ( - 8 * M_PI * M_PI * trapezoid_integration_cuda(I_nu[nu_idx], R_max / N) + 8 * PI * PI * trapezoid_integration_cuda(I_nu[nu_idx], R_max / N) )