diff --git a/src/theory.jl b/src/theory.jl index 36ed00d..5893e5f 100755 --- a/src/theory.jl +++ b/src/theory.jl @@ -3,8 +3,7 @@ function Theory(cosmology::Cosmology, idx, files; Nuisances=Dict(), res_wl=350, res_gc=1000, - int_wl="linear", int_gc="linear", - smooth_gc=0) + int_wl="linear", int_gc="linear") nui_type = eltype(valtype(Nuisances)) if !(nui_type <: Float64) & (nui_type != Any) @@ -26,8 +25,7 @@ function Theory(cosmology::Cosmology, dz = get(Nuisances, string(name, "_", "dz"), 0.0) tracer = NumberCountsTracer(cosmology, zs .+ dz, nz; b=b, res=res_gc, - nz_interpolation=int_gc, - smooth=smooth_gc) + nz_interpolation=int_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 748f670..abcb98e 100755 --- a/src/tracers.jl +++ b/src/tracers.jl @@ -37,9 +37,6 @@ NumberCountsTracer(cosmo::Cosmology, z_n, nz; hz = Hmpc(cosmo, z_w) w_arr = @. (nz_w*hz/nz_norm) - if smooth != 0 - w_arr = smooth_w_neighbors(w_arr, k=smooth) - end wint = linear_interpolation(chi, b .* w_arr, extrapolation_bc=0.0) F::Function = ℓ -> 1 NumberCountsTracer(wint, F) @@ -178,21 +175,3 @@ function nz_interpolate(z, nz, res; mode="linear") return z, nz end end - -function smooth_w_neighbors(arr; k::Int = 5) - N = length(arr) - neighbors = Vector{}(undef, N) # Create an array to hold neighbor arrays - - half_k = div(k, 2) # This is 2 if k=5, so we look at two neighbors on each side - - for i in 1:N - # Define the range around the current element, clamping to avoid out-of-bounds - start_idx = max(1, i - half_k) - end_idx = min(N, i + half_k) - - # Collect neighbors and assign to the current position - neighbors[i] = mean(arr[start_idx:end_idx]) - end - - return neighbors -end