From d40612d30fdebe7a3abdad80e235dcab18364b39 Mon Sep 17 00:00:00 2001 From: CompatHelper Julia Date: Sun, 29 Oct 2023 00:57:38 +0000 Subject: [PATCH 1/2] CompatHelper: add new compat entry for LazyArtifacts at version 1, (keep existing compat) --- Project.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Project.toml b/Project.toml index 6885c86..53fcfd6 100644 --- a/Project.toml +++ b/Project.toml @@ -46,6 +46,7 @@ HDF5 = "0.15, 0.16, 0.17" Healpix = "3, 4" Interpolations = "0.13, 0.14" JLD2 = "0.4" +LazyArtifacts = "1" NonlinearSolve = "1, 2" Parameters = "0.12" PhysicalConstants = "0.2" From 4030af1cb91ee7ff895c475415855055eeac5315 Mon Sep 17 00:00:00 2001 From: xzackli Date: Thu, 9 Nov 2023 16:25:14 -0800 Subject: [PATCH 2/2] profile szpack table reading --- src/profiles_szp.jl | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/profiles_szp.jl b/src/profiles_szp.jl index a3bdd42..a535dd6 100644 --- a/src/profiles_szp.jl +++ b/src/profiles_szp.jl @@ -10,21 +10,13 @@ using DelimitedFiles using Interpolations -# write a function that makes szpack_interp (i.e. set_up_szpack_table(file_name)) and pass it to SZpack -#function setup_szpack_table(file_name) -# table = readdlm("/home/lkuhn/CITA-2023/Notes/szpack_interp.dat") -# nu_vector = LinRange(log(35.6888844460172*1e9),log(5353.33266690298*1e9),3000) -# temp_vector = LinRange(1.0e-3,30.0,100) -# szpack_interp = scale(Interpolations.interpolate(table, BSpline(Cubic(Line(OnGrid())))), (temp_vector), (nu_vector)) -# -# return szpack_interp - - -table = readdlm("/home/lkuhn/CITA-2023/Notes/szpack_interp.dat") -nu_vector = LinRange(log(35.6888844460172*1e9),log(5353.33266690298*1e9),3000) -temp_vector = LinRange(1.0e-3,30.0,100) -szpack_interp = scale(Interpolations.interpolate(table, BSpline(Cubic(Line(OnGrid())))), (temp_vector), (nu_vector)) - +function read_szpack_table(filename) + table = readdlm(filename) + nu_vector = LinRange(log(35.6888844460172*1e9),log(5353.33266690298*1e9),3000) + temp_vector = LinRange(1.0e-3,30.0,100) + szpack_interp = scale(Interpolations.interpolate(table, BSpline(Cubic(Line(OnGrid())))), (temp_vector), (nu_vector)) + return szpack_interp +end function SZpack(𝕡, M_200, z, r, τ=0.01) """