From de1a30c2122adacb9027129590daf434dc9cfa2c Mon Sep 17 00:00:00 2001 From: Andrea Zonca Date: Mon, 22 Jul 2024 23:10:21 -0500 Subject: [PATCH] fix: remove unused import --- pysm3/models/websky.py | 1 - pysm3/tests/test_websky.py | 10 +++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pysm3/models/websky.py b/pysm3/models/websky.py index 6fa543c9..d72d7d57 100644 --- a/pysm3/models/websky.py +++ b/pysm3/models/websky.py @@ -1,5 +1,4 @@ import os.path -from pathlib import Path from numba import njit import numpy as np diff --git a/pysm3/tests/test_websky.py b/pysm3/tests/test_websky.py index 630008c2..8214c72d 100644 --- a/pysm3/tests/test_websky.py +++ b/pysm3/tests/test_websky.py @@ -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:])