Skip to content

Commit

Permalink
fix: remove unused import
Browse files Browse the repository at this point in the history
  • Loading branch information
zonca committed Jul 23, 2024
1 parent 6adf375 commit de1a30c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 0 additions & 1 deletion pysm3/models/websky.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os.path
from pathlib import Path

from numba import njit
import numpy as np
Expand Down
10 changes: 7 additions & 3 deletions pysm3/tests/test_websky.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,15 @@ def test_sz(tmp_path, monkeypatch, sz_type):
test_map *= 1e-6
hp.write_map(path / filename, test_map)

tsz = SimpleSZ(nside, template_name=str(path/filename), sz_type=sz_type, max_nside=8192)
tsz = SimpleSZ(
nside, template_name=str(path / filename), sz_type=sz_type, max_nside=8192
)

freq = 100 * u.GHz
tsz_map = tsz.get_emission(freq).to(u.uK_CMB, equivalencies=u.cmb_equivalencies(freq))
value = -4.109055 * u.uK_CMB if sz_type == "thermal" else 1. * u.uK_CMB
tsz_map = tsz.get_emission(freq).to(
u.uK_CMB, equivalencies=u.cmb_equivalencies(freq)
)
value = -4.109055 * u.uK_CMB if sz_type == "thermal" else 1.0 * u.uK_CMB
np.testing.assert_allclose(np.ones(len(tsz_map[0])) * value, tsz_map[0], rtol=1e-4)
np.testing.assert_allclose(np.zeros((2, len(tsz_map[0]))) * u.uK_CMB, tsz_map[1:])

Expand Down

0 comments on commit de1a30c

Please sign in to comment.