From df8487ab936c533a86aec007db67b5cbf47ae7b9 Mon Sep 17 00:00:00 2001 From: Andrei Cuceu Date: Thu, 5 Dec 2024 16:45:38 -0800 Subject: [PATCH] Restrict full-shape blinding read for when it's needed --- vega/plots/plot.py | 6 +++++- vega/vega_interface.py | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/vega/plots/plot.py b/vega/plots/plot.py index 251da9c..09fe4b4 100644 --- a/vega/plots/plot.py +++ b/vega/plots/plot.py @@ -157,8 +157,12 @@ def plot_data(self, ax, mu_bin, data=None, cov_mat=None, cross_flag=False, label covariance = array_or_dict(cov_mat, corr_name) rd, dd, cd = wedge_obj(data_vec, covariance=covariance) + if 'alpha' in kwargs: + alpha = kwargs['alpha'] + else: + alpha = 1. ax.errorbar(rd, dd * rd**scaling_power, yerr=np.sqrt(cd.diagonal()) * rd**scaling_power, - fmt=data_fmt, color=data_color, label=label) + fmt=data_fmt, color=data_color, label=label, alpha=alpha) return rd, dd, cd diff --git a/vega/vega_interface.py b/vega/vega_interface.py index 64128d5..4848bf8 100644 --- a/vega/vega_interface.py +++ b/vega/vega_interface.py @@ -124,7 +124,8 @@ def __init__(self, main_path): raise ValueError(f'Running on blind data, parameter {par} must be fixed.') elif par in utils.VEGA_BLINDED_PARS: blind_pars += [par] - self._rnsps = utils.get_blinding(blind_pars, blinding_strat) + if len(blind_pars) > 0: + self._rnsps = utils.get_blinding(blind_pars, blinding_strat) if ('bias_QSO' in self.sample_params['limits']) and ( 'beta_QSO' in self.sample_params['limits']):