Skip to content

Commit

Permalink
Changed M_PI to PI
Browse files Browse the repository at this point in the history
  • Loading branch information
Akash265 committed Nov 4, 2024
1 parent 58b9e02 commit 7666595
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions tardis/spectrum/formal_integral.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)

Check warning on line 200 in tardis/spectrum/formal_integral.py

View check run for this annotation

Codecov / codecov/patch

tardis/spectrum/formal_integral.py#L200

Added line #L200 was not covered by tests

return L, I_nu_p

Expand Down Expand Up @@ -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])
]
)
Expand Down
4 changes: 2 additions & 2 deletions tardis/spectrum/formal_integral_cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
)


Expand Down

0 comments on commit 7666595

Please sign in to comment.