From ce15cdb7ebb64c506dc226b30ab25cf557d3d9da Mon Sep 17 00:00:00 2001 From: nefrathenrici Date: Mon, 4 Mar 2024 12:18:46 -0800 Subject: [PATCH] Don't return constrained posterior in `save_posterior` --- src/emulate_sample.jl | 6 +----- test/test_emulate_sample.jl | 2 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/emulate_sample.jl b/src/emulate_sample.jl index 28d2a452..0032dc3f 100644 --- a/src/emulate_sample.jl +++ b/src/emulate_sample.jl @@ -78,10 +78,6 @@ Returns the samples in constrained (physical) parameter space. """ function save_posterior(mcmc, chain; filename = "samples.jld2") posterior = MarkovChainMonteCarlo.get_posterior(mcmc, chain) - constrained_posterior = transform_unconstrained_to_constrained( - posterior, - MarkovChainMonteCarlo.get_distribution(posterior), - ) JLD2.save_object(filename, posterior) - return constrained_posterior + return posterior end diff --git a/test/test_emulate_sample.jl b/test/test_emulate_sample.jl index c392212f..308c7412 100644 --- a/test/test_emulate_sample.jl +++ b/test/test_emulate_sample.jl @@ -32,5 +32,3 @@ emulator = CAL.gp_emulator(input_output_pairs, y_noise_cov) @test mean(chain.value[1:100000]) ≈ 4.19035299 rtol = 0.0001 constrained_posterior = CAL.save_posterior(mcmc, chain) -@test mean(constrained_posterior["equator_pole_temperature_gradient_wet"]) ≈ - 66.046965013381 rtol = 0.0001