Skip to content

Commit

Permalink
Implement Pierre comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ASKabalan committed Dec 9, 2024
1 parent c32455a commit 96cb9d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/furax/operators/seds.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from furax._base.core import AbstractLinearOperator

_H_OVER_K = constants.h * 1e9 / constants.k
_TCMB = Planck15.Tcmb(0).value
_T_CMB = Planck15.Tcmb(0).value


def K_RK_2_K_CMB(nu: Array | float) -> Array:
Expand All @@ -33,8 +33,8 @@ def K_RK_2_K_CMB(nu: Array | float) -> Array:
>>> conversion = K_RK_2_K_CMB(nu)
>>> print(conversion)
"""
res = jnp.expm1(_H_OVER_K * nu / _TCMB) ** 2 / (
jnp.exp(_H_OVER_K * nu / _TCMB) * (_H_OVER_K * nu / _TCMB) ** 2
res = jnp.expm1(_H_OVER_K * nu / _T_CMB) ** 2 / (
jnp.exp(_H_OVER_K * nu / _T_CMB) * (_H_OVER_K * nu / _T_CMB) ** 2
)
return res # type: ignore [no-any-return]

Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def stokes(request: pytest.FixtureRequest) -> ValidStokesType:

@pytest.fixture(scope='session')
def get_fgbuster_data():
os.makedirs(TEST_DATA_FGBUSTER, exist_ok=True)
TEST_DATA_FGBUSTER.mkdir(exist_ok=True)
# Check if file already exists
data_filename = f'{TEST_DATA_FGBUSTER}/fgbuster_data.npz'
nside = 32
Expand Down

0 comments on commit 96cb9d2

Please sign in to comment.