-
Notifications
You must be signed in to change notification settings - Fork 25
41 spherical lensing #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 32 commits
0a60877
efcfcf2
8ce412d
e21ebe4
1c036ec
6f9b02b
f5507ae
36ce358
e8264cc
c692638
8f60be6
b746fe8
70d661e
72647d9
5ca4caa
e56ccca
5336b36
491e0ae
ada5187
0e41e9a
0bf8059
e99502c
0d4e2f0
a129acd
7351fc9
ae7c04e
d0d29c9
ec1af7d
a430f4e
b9eff44
9ff2eae
81cd08a
76b7713
9a672ad
abd66a5
1622e9f
21ba798
3aecf0b
7017b33
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -51,12 +51,15 @@ jobs: | |||||
| python -m pip install --upgrade pip setuptools wheel | ||||||
| # Install JAX first as it's a key dependency | ||||||
| pip install jax | ||||||
| # Install packages with test dependencies | ||||||
| pip install -e .[test] | ||||||
| # Install build dependencies | ||||||
| pip install setuptools cython mpi4py | ||||||
| # Install test requirements with no-build-isolation for faster builds | ||||||
| # Install test requirements with no-build-isolation for PFFT | ||||||
| pip install -r requirements-test.txt --no-build-isolation | ||||||
| # Install additional test dependencies | ||||||
| pip install pytest diffrax 'glass[examples] @ git+https://github.com/glass-dev/glass' | ||||||
|
||||||
| pip install pytest diffrax 'glass[examples] @ git+https://github.com/glass-dev/glass' | |
| pip install diffrax 'glass[examples] @ git+https://github.com/glass-dev/glass' |
Copilot
AI
Nov 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment 'Install packages with test dependencies' appears twice (lines 54 and 62) with different actual operations, which is confusing. The second occurrence at line 62 should be removed as it's followed by a simple echo statement, not another pip install command.
| # Install packages with test dependencies |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,82 +1,213 @@ | ||||||||||
| import jax | ||||||||||
| import jax.numpy as jnp | ||||||||||
| import jax_cosmo | ||||||||||
| import jax_cosmo as jc | ||||||||||
| import jax_cosmo.constants as constants | ||||||||||
| from jax.scipy.ndimage import map_coordinates | ||||||||||
|
|
||||||||||
| from jaxpm.painting import cic_paint_2d | ||||||||||
| from jaxpm.distributed import uniform_particles | ||||||||||
| from jaxpm.painting import cic_paint, cic_paint_2d, cic_paint_dx | ||||||||||
|
||||||||||
| from jaxpm.painting import cic_paint, cic_paint_2d, cic_paint_dx | |
| from jaxpm.painting import cic_paint_2d |
Copilot
AI
Nov 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When rho_mean is exactly 0, safe_rho_mean is set to eps, making delta = density_planes/eps - 1. If density_planes contains zeros (which is expected when rho_mean is 0), this results in -1.0. However, if density_planes contains non-zero values while rho_mean is 0, this will create artificially large delta values. Consider using jnp.where(rho_mean == 0, 0.0, density_planes / rho_mean - 1) to handle the zero-mean case more directly.
| safe_rho_mean = jnp.where(rho_mean == 0, eps, rho_mean) | |
| delta = density_planes / safe_rho_mean - 1 | |
| # Use jnp.where to set delta=0 when rho_mean==0, avoiding artificially large values | |
| delta = jnp.where(rho_mean == 0, 0.0, density_planes / rho_mean - 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The installation order may cause issues:
pip install -e .[test]is run before installing requirements-test.txt which contains numpy==2.2.6. This could lead to dependency conflicts if the project dependencies have numpy version constraints. Consider installing requirements-test.txt before runningpip install -e .[test]to establish the numpy version first.