dsigma 1.2.2__tar.gz → 1.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dsigma-1.2.2 → dsigma-1.2.3}/PKG-INFO +1 -1
- {dsigma-1.2.2 → dsigma-1.2.3}/dsigma/__init__.py +1 -1
- {dsigma-1.2.2 → dsigma-1.2.3}/dsigma/physics.py +2 -1
- {dsigma-1.2.2 → dsigma-1.2.3}/dsigma.egg-info/PKG-INFO +1 -1
- {dsigma-1.2.2 → dsigma-1.2.3}/tests/test_physics.py +24 -0
- {dsigma-1.2.2 → dsigma-1.2.3}/LICENSE +0 -0
- {dsigma-1.2.2 → dsigma-1.2.3}/README.md +0 -0
- {dsigma-1.2.2 → dsigma-1.2.3}/dsigma/helpers.py +0 -0
- {dsigma-1.2.2 → dsigma-1.2.3}/dsigma/jackknife.py +0 -0
- {dsigma-1.2.2 → dsigma-1.2.3}/dsigma/precompute.py +0 -0
- {dsigma-1.2.2 → dsigma-1.2.3}/dsigma/precompute_engine.pyx +0 -0
- {dsigma-1.2.2 → dsigma-1.2.3}/dsigma/scripts/process_decade.py +0 -0
- {dsigma-1.2.2 → dsigma-1.2.3}/dsigma/scripts/process_des_y3.py +0 -0
- {dsigma-1.2.2 → dsigma-1.2.3}/dsigma/scripts/process_hsc_y3.py +0 -0
- {dsigma-1.2.2 → dsigma-1.2.3}/dsigma/scripts/process_kids_legacy.py +0 -0
- {dsigma-1.2.2 → dsigma-1.2.3}/dsigma/stacking.py +0 -0
- {dsigma-1.2.2 → dsigma-1.2.3}/dsigma.egg-info/SOURCES.txt +0 -0
- {dsigma-1.2.2 → dsigma-1.2.3}/dsigma.egg-info/dependency_links.txt +0 -0
- {dsigma-1.2.2 → dsigma-1.2.3}/dsigma.egg-info/entry_points.txt +0 -0
- {dsigma-1.2.2 → dsigma-1.2.3}/dsigma.egg-info/requires.txt +0 -0
- {dsigma-1.2.2 → dsigma-1.2.3}/dsigma.egg-info/top_level.txt +0 -0
- {dsigma-1.2.2 → dsigma-1.2.3}/pyproject.toml +0 -0
- {dsigma-1.2.2 → dsigma-1.2.3}/setup.cfg +0 -0
- {dsigma-1.2.2 → dsigma-1.2.3}/tests/test_full.py +0 -0
- {dsigma-1.2.2 → dsigma-1.2.3}/tests/test_jackknife.py +0 -0
- {dsigma-1.2.2 → dsigma-1.2.3}/tests/test_precompute.py +0 -0
- {dsigma-1.2.2 → dsigma-1.2.3}/tests/test_stacking.py +0 -0
|
@@ -133,7 +133,8 @@ def effective_critical_surface_density(
|
|
|
133
133
|
n_s = np.tile(n_s, len(z_l)).reshape(z_l.shape)
|
|
134
134
|
|
|
135
135
|
sigma_crit_eff_inv = 1.0 / critical_surface_density(
|
|
136
|
-
z_l=z_l, d_l=d_l, z_s=z_s, d_s=d_s,
|
|
136
|
+
z_l=z_l, d_l=d_l, z_s=z_s, d_s=d_s, cosmology=cosmology,
|
|
137
|
+
comoving=comoving)
|
|
137
138
|
sigma_crit_eff_inv = np.average(sigma_crit_eff_inv, weights=n_s, axis=-1)
|
|
138
139
|
|
|
139
140
|
with np.errstate(divide='ignore'):
|
|
@@ -108,3 +108,27 @@ def test_lens_magnification():
|
|
|
108
108
|
[4.49, 4.80, 4.99, 5.00, 4.74, 4.19, 3.41, 2.56, 1.78, 1.52])(theta)
|
|
109
109
|
|
|
110
110
|
assert np.allclose(gt, gt_unruh, rtol=0.1, atol=0)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def test_sigma_crit_little_h():
|
|
114
|
+
|
|
115
|
+
cosmo70 = FlatLambdaCDM(Om0=0.3, H0=70)
|
|
116
|
+
cosmo100 = FlatLambdaCDM(Om0=0.3, H0=100)
|
|
117
|
+
z_l = 0.3
|
|
118
|
+
z_s = 0.5
|
|
119
|
+
|
|
120
|
+
sigma_crit_1 = physics.critical_surface_density(
|
|
121
|
+
z_l, z_s, cosmology=cosmo70)
|
|
122
|
+
sigma_crit_2 = physics.critical_surface_density(
|
|
123
|
+
z_l, z_s, cosmology=cosmo100)
|
|
124
|
+
z_s = np.linspace(z_s, z_s, 10)
|
|
125
|
+
n_s = np.ones(len(z_s))
|
|
126
|
+
sigma_crit_3 = physics.effective_critical_surface_density(
|
|
127
|
+
z_l, z_s, n_s, cosmology=cosmo70)
|
|
128
|
+
sigma_crit_4 = physics.effective_critical_surface_density(
|
|
129
|
+
z_l, z_s, n_s, cosmology=cosmo70)
|
|
130
|
+
print(sigma_crit_1)
|
|
131
|
+
|
|
132
|
+
assert np.isclose(sigma_crit_1.value, sigma_crit_2.value)
|
|
133
|
+
assert np.isclose(sigma_crit_1.value, sigma_crit_3.value)
|
|
134
|
+
assert np.isclose(sigma_crit_1.value, sigma_crit_4.value)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|