Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
samueldmcdermott committed Sep 1, 2023
1 parent 2bef647 commit 2d2196f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions tests/test_camb_ps_maker.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"""

import numpy as np
from simcmb.params_io import config_obj
from simcmb.camb_power_spectrum import CAMBPowerSpectrum
from deepcmbsim.params_io import config_obj
from deepcmbsim.camb_power_spectrum import CAMBPowerSpectrum


def test_get_noise():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_clplotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest
nmt = pytest.importorskip("pymaster") # skips tests if pymaster not installed
import numpy as np
from simcmb.cl_plotting import flatmap
from deepcmbsim.cl_plotting import flatmap


def test_flatmap_scalar():
Expand Down
6 changes: 3 additions & 3 deletions tests/test_noise.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"""

import numpy as np
import simcmb.noise
import deepcmbsim.noise
from pytest import approx


def test_max_multipole():
fwhm_arcmin = 5
additional_factor = 3
max_multipole_5_3 = simcmb.noise.max_multipole(fwhm_arcmin, additional_factor=additional_factor)
max_multipole_5_3 = deepcmbsim.noise.max_multipole(fwhm_arcmin, additional_factor=additional_factor)
assert max_multipole_5_3 == 180*60*additional_factor/fwhm_arcmin


Expand All @@ -20,6 +20,6 @@ def test_white_noise():
noise_uK_arcmin = 10
fwhm_arcmin = 1
out = (noise_uK_arcmin * arcmin_to_rad)**2 * np.exp( ell * (ell + 1) * (fwhm_arcmin * arcmin_to_rad)**2 / (8 * np.log(2)) )
final_wn_10_1_1e4 = simcmb.noise.white_noise(noise_uK_arcmin, fwhm_arcmin, ell, TT=True, units_uK = True)[-1]
final_wn_10_1_1e4 = deepcmbsim.noise.white_noise(noise_uK_arcmin, fwhm_arcmin, ell, TT=True, units_uK = True)[-1]
assert final_wn_10_1_1e4 == approx(out)

2 changes: 1 addition & 1 deletion tests/test_yam_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
tests yam_io.py
"""

from simcmb.params_io import config_obj
from deepcmbsim.params_io import config_obj


def test_update_val():
Expand Down

0 comments on commit 2d2196f

Please sign in to comment.