From 25ebee4547a2c8f49e52e3b61b8466f51a3e2203 Mon Sep 17 00:00:00 2001 From: kcarloni Date: Tue, 19 May 2026 21:54:57 -0400 Subject: [PATCH] Fix PROPOSAL interpolation tables path being ignored PROPOSAL stores its interpolation-table directory in a process-global (InterpolationSettings::TABLES_PATH), mutated only by set_tables_path. It does NOT read a `tables_path` key from the JSON config. The three config generators embedded `tables_path` into config["global"], so the entire PROPOSAL_TABLES_PATH env var -> get_proposal_tables_path() -> JSON chain terminated in a key PROPOSAL silently discarded. Tables always landed at PROPOSAL's compiled-in default (/tmp), regardless of PROPOSAL_TABLES_PATH. Fix: push the resolved path into PROPOSAL via set_tables_path in create_temp_config (the single chokepoint run immediately before every create_propagator_* call) and drop the dead JSON keys. Co-Authored-By: Claude Opus 4.7 --- .../ChargedLeptonPropagation/ConfigGeneration.jl | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/TauRunner.jl/src/ChargedLeptonPropagation/ConfigGeneration.jl b/TauRunner.jl/src/ChargedLeptonPropagation/ConfigGeneration.jl index 70d78cb..f1d2bf3 100644 --- a/TauRunner.jl/src/ChargedLeptonPropagation/ConfigGeneration.jl +++ b/TauRunner.jl/src/ChargedLeptonPropagation/ConfigGeneration.jl @@ -147,8 +147,7 @@ function generate_sphere_config(body::AbstractSphericalBody; cuts=default_cuts() config = Dict( "global" => Dict( - "cuts" => cuts, - "tables_path" => get_proposal_tables_path() + "cuts" => cuts ), "sectors" => sectors ) @@ -169,8 +168,7 @@ Generate a simple uniform sphere configuration. function generate_uniform_sphere_config(radius_cm::Real, medium::String; cuts=default_cuts()) config = Dict( "global" => Dict( - "cuts" => cuts, - "tables_path" => get_proposal_tables_path() + "cuts" => cuts ), "sectors" => [ Dict( @@ -204,8 +202,7 @@ exactly on a sector boundary due to floating-point arithmetic. function generate_slab_layer_config(density_gcm3::Real, medium_name::String; cuts=default_cuts()) config = Dict( "global" => Dict( - "cuts" => cuts, - "tables_path" => get_proposal_tables_path() + "cuts" => cuts ), "sectors" => [ Dict( @@ -244,6 +241,11 @@ end Write config to a temporary file and return the path. """ function create_temp_config(config::Dict) + # PROPOSAL reads its interpolation-table directory from a process-global + # (InterpolationSettings::TABLES_PATH), NOT from the JSON config. Push the + # resolved path in here so it takes effect before the propagator is built. + PROPOSAL.set_tables_path(get_proposal_tables_path()) + filepath = tempname() * ".json" write_config(config, filepath) return filepath