Skip to content

Commit

Permalink
gh-260: remove glass.core.constants (#261)
Browse files Browse the repository at this point in the history
Removed the `constants` module and ported the definition of
`ARCMIN2_SPHERE` in the modules/notebooks it is used.

Closes: #260 
Removed: `glass.core.constants`
Co-authored-by: Nicolas Tessore <[email protected]>
  • Loading branch information
Saransh-cpp and ntessore authored Sep 24, 2024
1 parent 9353975 commit fccd246
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion examples/1-basic/photoz.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"import glass\n",
"\n",
"# how many arcmin2 over the entire sphere\n",
"from glass.core.constants import ARCMIN2_SPHERE\n",
"ARCMIN2_SPHERE = 60**6 // 100 / np.pi\n",
"\n",
"# galaxy density\n",
"n_arcmin2 = 1e-4\n",
Expand Down
4 changes: 3 additions & 1 deletion examples/2-advanced/cosmic_shear.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@
"\n",
"# GLASS modules: cosmology and everything in the glass namespace\n",
"import glass\n",
"from glass.core.constants import ARCMIN2_SPHERE\n",
"\n",
"# how many arcmin2 over the entire sphere\n",
"ARCMIN2_SPHERE = 60**6 // 100 / np.pi\n",
"\n",
"# cosmology for the simulation\n",
"h = 0.7\n",
Expand Down
9 changes: 0 additions & 9 deletions glass/core/constants.py

This file was deleted.

3 changes: 2 additions & 1 deletion glass/points.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
import numpy as np

from glass.core.array import broadcast_first, broadcast_leading_axes, trapz_product
from glass.core.constants import ARCMIN2_SPHERE

ARCMIN2_SPHERE = 60**6 // 100 / np.pi


def effective_bias(z, bz, w):
Expand Down

0 comments on commit fccd246

Please sign in to comment.