diff --git a/src/theory.jl b/src/theory.jl index 5988772..63dd0fc 100755 --- a/src/theory.jl +++ b/src/theory.jl @@ -3,7 +3,8 @@ function Theory(cosmology::Cosmology, idx, files; Nuisances=Dict(), res_wl=350, res_gc=1000, - int_wl="linear", int_gc="linear") + int_wl="linear", int_gc="linear", + smooth_gc=0) nui_type = eltype(valtype(Nuisances)) if !(nui_type <: Float64) & (nui_type != Any) @@ -26,7 +27,7 @@ function Theory(cosmology::Cosmology, tracer = NumberCountsTracer(cosmology, zs .+ dz, nz; b=b, res=res_gc, nz_interpolation=int_gc, - smooth=true) + smooth=smooth_gc) elseif t_type == "galaxy_shear" zs_mean, nz_mean = files[string("nz_", name)] m = get(Nuisances, string(name, "_", "m"), 0.0) diff --git a/src/tracers.jl b/src/tracers.jl index fadf547..7d1291c 100755 --- a/src/tracers.jl +++ b/src/tracers.jl @@ -28,7 +28,7 @@ Returns: - `NumberCountsTracer::NumberCountsTracer` : Number counts tracer structure. """ NumberCountsTracer(cosmo::Cosmology, z_n, nz; - b=1.0, res=1000, nz_interpolation="linear", smooth=false) = begin + b=1.0, res=1000, nz_interpolation="linear", smooth=0) = begin z_w, nz_w = nz_interpolate(z_n, nz, res; mode=nz_interpolation) nz_norm = integrate(z_w, nz_w, SimpsonEven()) @@ -37,8 +37,8 @@ NumberCountsTracer(cosmo::Cosmology, z_n, nz; hz = Hmpc(cosmo, z_w) w_arr = @. (nz_w*hz/nz_norm) - if smooth - w_arr = smooth_w_neighbors(w_arr) + if smooth!=0 + w_arr = smooth_w_neighbors(w_arr, k=smooth) end wint = linear_interpolation(chi, b .* w_arr, extrapolation_bc=Line()) F::Function = ℓ -> 1