From d14a59d3866b80082bafd5e5182d6f181d18c240 Mon Sep 17 00:00:00 2001 From: Aasim Z Jan <58118417+AasimZahoor@users.noreply.github.com> Date: Thu, 9 Jul 2026 13:50:15 -0500 Subject: [PATCH 1/3] plot_posterior_corner.py: commented out special range for q, eta and chi_eff, allowing corner to determine the nrages. This is to enable, when using plot_posterior_corner.py, to visually compare posteriors from different iterations and visually assess convergence. This will also help when the posterior is localized. --- MonteCarloMarginalizeCode/Code/bin/plot_posterior_corner.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MonteCarloMarginalizeCode/Code/bin/plot_posterior_corner.py b/MonteCarloMarginalizeCode/Code/bin/plot_posterior_corner.py index f6c2b4666..1f4f8fc44 100755 --- a/MonteCarloMarginalizeCode/Code/bin/plot_posterior_corner.py +++ b/MonteCarloMarginalizeCode/Code/bin/plot_posterior_corner.py @@ -478,11 +478,11 @@ def _materialize_plugin_columns(samples, source_label=""): lalsimutils.tex_dictionary[name] = "$"+new_str+"$" # should be able to ASSIGN NEW NAMES, not restrict special_param_ranges = { - 'q':[0,1], - 'eta':[0,0.25], + #'q':[0,1], + #'eta':[0,0.25], 'a1z':[-opts.chi_max,opts.chi_max], 'a2z':[-opts.chi_max,opts.chi_max], - 'chi_eff': [-opts.chi_max,opts.chi_max], # this can backfire for very narrow constraints + #'chi_eff': [-opts.chi_max,opts.chi_max], # this can backfire for very narrow constraints 'lambda1':[0,4000], 'lambda2':[0,4000], 'chi_pavg':[0,2], From e6baa3e1dc23b8a63cf3a05632d803e8a79df16b Mon Sep 17 00:00:00 2001 From: Aasim Z Jan <58118417+AasimZahoor@users.noreply.github.com> Date: Thu, 13 Aug 2026 15:53:26 -0700 Subject: [PATCH 2/3] plot_posterior_corner.py: use --disable-special-ranges to prevent this code from using default ranges, allowing plot_RIFT.py to enable better diagnosis of runs without forcing corner plots to use longer ranges that can hide fine details. When this option is not provided, the default special parameter ranges will continue to be used, ensuring reproducibility with older results. --- .../Code/bin/plot_posterior_corner.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/MonteCarloMarginalizeCode/Code/bin/plot_posterior_corner.py b/MonteCarloMarginalizeCode/Code/bin/plot_posterior_corner.py index 1f4f8fc44..337809f12 100755 --- a/MonteCarloMarginalizeCode/Code/bin/plot_posterior_corner.py +++ b/MonteCarloMarginalizeCode/Code/bin/plot_posterior_corner.py @@ -254,6 +254,7 @@ def render_coordinates(coord_names,logparams=[]): parser.add_argument("--no-mod-psi",action="store_true",help="Default is to take psi mod pi. If present, does not do this") parser.add_argument("--downselect-parameter",action='append', help='Name of parameter to be used to eliminate grid points ') parser.add_argument("--downselect-parameter-range",action='append',type=str) +parser.add_argument("--disable-special-ranges", action='store_true') # ---- User-supplied coordinate-convert plugin (additive; the hardcoded RIFT # conversion path is untouched). When --supplementary-coordinate-code is # omitted these flags are a no-op and plotting behaves byte-identically @@ -478,11 +479,11 @@ def _materialize_plugin_columns(samples, source_label=""): lalsimutils.tex_dictionary[name] = "$"+new_str+"$" # should be able to ASSIGN NEW NAMES, not restrict special_param_ranges = { - #'q':[0,1], - #'eta':[0,0.25], + 'q':[0,1], + 'eta':[0,0.25], 'a1z':[-opts.chi_max,opts.chi_max], 'a2z':[-opts.chi_max,opts.chi_max], - #'chi_eff': [-opts.chi_max,opts.chi_max], # this can backfire for very narrow constraints + 'chi_eff': [-opts.chi_max,opts.chi_max], # this can backfire for very narrow constraints 'lambda1':[0,4000], 'lambda2':[0,4000], 'chi_pavg':[0,2], @@ -491,7 +492,8 @@ def _materialize_plugin_columns(samples, source_label=""): 'eccentricity':[opts.ecc_min,opts.ecc_max], 'meanPerAno':[opts.meanPerAno_min,opts.meanPerAno_max] } - +if opts.disable_special_ranges: + special_param_ranges = {} #mc_range deprecated by generic bind_param #if opts.mc_range: # special_param_ranges['mc'] = eval(opts.mc_range) From 2d6b29cfe71d2ae81514c24f64a4b0d394762a4b Mon Sep 17 00:00:00 2001 From: Aasim Z Jan <58118417+AasimZahoor@users.noreply.github.com> Date: Thu, 13 Aug 2026 15:55:13 -0700 Subject: [PATCH 3/3] plot_posterior_corner.py: use --disable-special-ranges to prevent this code from using default ranges, allowing plot_RIFT.py to enable better diagnosis of runs without forcing corner plots to use longer ranges that can hide fine details. When this option is not provided, the default special parameter ranges will continue to be used, ensuring reproducibility with older results. --- MonteCarloMarginalizeCode/Code/bin/plot_posterior_corner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MonteCarloMarginalizeCode/Code/bin/plot_posterior_corner.py b/MonteCarloMarginalizeCode/Code/bin/plot_posterior_corner.py index 337809f12..bb908e851 100755 --- a/MonteCarloMarginalizeCode/Code/bin/plot_posterior_corner.py +++ b/MonteCarloMarginalizeCode/Code/bin/plot_posterior_corner.py @@ -254,7 +254,7 @@ def render_coordinates(coord_names,logparams=[]): parser.add_argument("--no-mod-psi",action="store_true",help="Default is to take psi mod pi. If present, does not do this") parser.add_argument("--downselect-parameter",action='append', help='Name of parameter to be used to eliminate grid points ') parser.add_argument("--downselect-parameter-range",action='append',type=str) -parser.add_argument("--disable-special-ranges", action='store_true') +parser.add_argument("--disable-special-ranges", action='store_true', help="Disable the default special parameter ranges. If not specified, the default ranges are used.") # ---- User-supplied coordinate-convert plugin (additive; the hardcoded RIFT # conversion path is untouched). When --supplementary-coordinate-code is # omitted these flags are a no-op and plotting behaves byte-identically