Пример #1
0
    def grid_values(self, Q, xgrid=None, fl=None):

        if Q is None:
            Q = self.q2Min
        if xgrid is None:
            xgrid = self.make_xgrid()
        #Allow tuples that can be saved in cache
        elif isinstance(xgrid, tuple):
            xgrid = self.make_xgrid(*xgrid)

        if fl is None:
            fl = self.make_flavors()
        elif isinstance(fl, int):
            fl = self.make_flavors(fl)
        elif isinstance(fl, tuple):
            fl = self.make_flavors(*fl)

        with self:
            all_members = [[[applwrap.xfxQ(r, f, x, Q)
                             for x in xgrid]
                             for f in fl]
                             for r in range(len(self))]

            all_members = np.array(all_members)
            mean = all_members[0]
            replicas = all_members[1:]

        return mean, replicas
Пример #2
0
 def xfxQ(self, rep, fl, x, Q):
     with self:
         res = applwrap.xfxQ(rep, fl, x, Q)
     return res