diff --git a/src/tracers.jl b/src/tracers.jl index 4a1a435..81c8171 100755 --- a/src/tracers.jl +++ b/src/tracers.jl @@ -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) @@ -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()) diff --git a/test/test_output.npz b/test/test_output.npz index 9520d46..754369e 100644 Binary files a/test/test_output.npz and b/test/test_output.npz differ