Exemple #1
0
 def test_array2dict(self):
     d1 = smeftutil.C_array2dict(beta.beta_array(C, HIGHSCALE))
     d2 = beta.beta(C, HIGHSCALE)
     for k in d1:
         npt.assert_array_equal(d1[k], d2[k])
     d3 = smeftutil.C_array2dict(smeftutil.C_dict2array(C))
     for k in d3:
         npt.assert_array_equal(d3[k], C[k])
Exemple #2
0
 def test_empty(self):
     wc_sm = wcxf.WC('SMEFT', 'Warsaw', 160, {})
     smeft_sm = SMEFT(wc_sm, get_smpar=False)
     C_in_sm = smeft_sm.C_in
     C_in_sm_2 = smeftutil.C_array2dict(np.zeros(9999))
     for k, v in C_in_sm_2.items():
         if k not in smeftutil.dim4_keys:
             npt.assert_array_equal(v,
                                    C_in_sm[k],
                                    err_msg=f"Failed for {k}")
Exemple #3
0
 def _run_sm_scale_in(self, C_out, scale_sm=91.1876):
     """Get the SM parameters at the EW scale, using an estimate `C_out`
     of the Wilson coefficients at that scale, and run them to the
     input scale."""
     # initialize an empty SMEFT instance
     smeft_sm = SMEFT(wc=None)
     C_in_sm = smeftutil.C_array2dict(np.zeros(9999))
     # set the SM parameters to the values obtained from smpar.smeftpar
     C_SM = smpar.smeftpar(scale_sm, C_out, basis='Warsaw')
     SM_keys = set(smeftutil.SM_keys)  # to speed up lookup
     C_SM = {k: v for k, v in C_SM.items() if k in SM_keys}
     # set the Wilson coefficients at the EW scale to C_out
     C_in_sm.update(C_out)
     C_in_sm.update(C_SM)
     smeft_sm._set_initial(C_in_sm, scale_sm)
     # run up (with 1% relative precision, ignore running of Wilson coefficients)
     C_SM_high = smeft_sm._rgevolve(self.scale_in, newphys=False, rtol=0.001, atol=1)
     C_SM_high = self._rotate_defaultbasis(C_SM_high)
     return {k: v for k, v in C_SM_high.items() if k in SM_keys}
Exemple #4
0
 def _rge_solution(scale):
     t = log(scale)
     y = sol.sol(t).view(complex)
     yd = smeftutil.C_array2dict(y)
     yw = smeftutil.arrays2wcxf_nonred(yd)
     return yw
Exemple #5
0
def smeft_evolve(C_in, scale_in, scale_out, newphys=True, **kwargs):
    """Solve the SMEFT RGEs by numeric integration.

    Input C_in and output C_out are dictionaries of arrays."""
    sol = _smeft_evolve(C_in, scale_in, scale_out, newphys=newphys, **kwargs)
    return smeftutil.C_array2dict(sol.y[:, -1].view(complex))
Exemple #6
0
 def fun(t0, y):
     return beta.beta_array(C=smeftutil.C_array2dict(y.view(complex)),
                            newphys=newphys).view(float) / (16 * pi**2)