Skip to content

Commit 1c4cc8d

Browse files
fixed None comparison in cosmo (error in pytest); added pyccl package, finally working
1 parent 48c6f95 commit 1c4cc8d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cs_util/cosmo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ def sigma_crit(z_lens, z_source, cos, d_lens=None, d_source=None):
7979

8080
a_lens = 1 / (1 + z_lens)
8181
a_source = 1 / (1 + z_source)
82-
if not d_lens:
82+
if d_lens is None:
8383
d_lens = cos.angular_diameter_distance(a_lens) * units.Mpc
84-
if not d_source:
84+
if d_source is None:
8585
d_source = cos.angular_diameter_distance(a_source) * units.Mpc
8686

8787
d_lens_source = cos.angular_diameter_distance(a_lens, a_source) * units.Mpc

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ numpy = "^1.26.4"
1414
matplotlib = "^3.8.4"
1515
swig = "^4.2.1"
1616
scipy = "^1.13.0"
17-
# Install pyccl via pip
1817
vos = "^3.6.1"
1918
keyring = "^25.2.0"
19+
pyccl = "^3.0.2"
2020

2121
[tool.poetry.dev-dependencies]
2222
pytest = "^6.2.5"

0 commit comments

Comments
 (0)