Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def obstable_sm(self):
self._check_sm_cov_loaded()
if self._obstable_sm is None:
info = tree() # nested dict
for flh_name, flh in self.fast_likelihoods.items():
# loop over fast likelihoods: they only have a single "measurement"
m = flh.pseudo_measurement
ml = flh.full_measurement_likelihood
pred_sm = ml.get_predictions_par(self.par_dict_sm,
flavio.WilsonCoefficients())
sm_cov = flh.sm_covariance.get(force=False)
_, exp_cov = flh.exp_covariance.get(force=False)
inspire_dict = self._get_inspire_dict(flh.observables, ml)
for i, obs in enumerate(flh.observables):
info[obs]['lh_name'] = flh_name
info[obs]['name'] = obs if isinstance(obs, str) else obs[0]
info[obs]['th. unc.'] = np.sqrt(sm_cov[i, i])
info[obs]['experiment'] = m.get_central(obs)
info[obs]['exp. unc.'] = np.sqrt(exp_cov[i, i])
info[obs]['exp. PDF'] = NormalDistribution(m.get_central(obs), np.sqrt(exp_cov[i, i]))