Skip to content

Commit

Permalink
negative zs bug
Browse files Browse the repository at this point in the history
  • Loading branch information
JaimeRZP committed Nov 18, 2024
1 parent a55115a commit 2c4f3ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/tracers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ Returns:
- `NumberCountsTracer::NumberCountsTracer` : Number counts tracer structure.
"""
NumberCountsTracer(cosmo::Cosmology, z, nz; b=1.0) = begin
sel = @. (z > 0.0)
z = z[sel]
nz = nz[sel]
nz_norm = integrate(z, nz, SimpsonEven())
chi = cosmo.chi(z)
hz = Hmpc(cosmo, z)
Expand Down Expand Up @@ -58,6 +61,9 @@ end

WeakLensingTracer(cosmo::Cosmology, z, nz;
IA_params = [0.0, 0.0], m=0.0) = begin
sel = @. (z > 0.0)
z = z[sel]
nz = nz[sel]
cosmo_type = cosmo.settings.cosmo_type
res = length(z)
nz_norm = integrate(z, nz, SimpsonEven())
Expand Down
Binary file modified test/test_output.npz
Binary file not shown.

0 comments on commit 2c4f3ab

Please sign in to comment.