Skip to content

Commit

Permalink
trying something
Browse files Browse the repository at this point in the history
  • Loading branch information
JaimeRZP committed Oct 17, 2024
1 parent 90c19bc commit c387ed1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/tracers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ Returns:
- `NumberCountsTracer::NumberCountsTracer` : Number counts tracer structure.
"""
NumberCountsTracer(cosmo::Cosmology, z_n, nz; b=1.0, res=1000) = begin

z_w, nz_w = nz_interpolate(z_n, nz, res)
nz_norm = integrate(z_w, nz_w, SimpsonEven())

Expand Down Expand Up @@ -62,13 +61,11 @@ end

WeakLensingTracer(cosmo::Cosmology, z_n, nz;
IA_params = [0.0, 0.0], m=0.0, res=350, kwargs...) = begin

cosmo_type = cosmo.settings.cosmo_type
z_w, nz_w = nz_interpolate(z_n, nz, res)
chi = cosmo.chi(z_w)

#nz_norm = sum(0.5 .* (nz_w[1:res-1] .+ nz_w[2:res]) .* dz_w)
res = length(z_w)
nz_norm = integrate(z_w, nz_w, SimpsonEven())
chi = cosmo.chi(z_w)

# Calculate chis at which to precalculate the lensing kernel
# OPT: perhaps we don't need to sample the lensing kernel
Expand Down Expand Up @@ -164,6 +161,7 @@ function nz_interpolate(z, nz, res=nothing)
else
L = z[end] - z[1]
dzz = L/res
println("dzz: ", dzz)
end
zz_range = z[1]:dzz:z[end]
nzz = nz_int(zz_range)
Expand Down
Binary file modified test/test_output.npz
Binary file not shown.

0 comments on commit c387ed1

Please sign in to comment.