Exemplo n.º 1
0
    def __init__(self, statfunc=None, hyperpars={}, pars={}, name='prior'):

        # Posterior hyper-parameters
        self.hyperpars = []
        for key in hyperpars.keys():
            val = hyperpars[key]
            param = Parameter(name, key, val, alwaysfrozen=True)
            self.__dict__[key] = param
            self.hyperpars.append(param)

        # References to parameters in source model
        self.pars = []
        for key in pars.keys():
            self.__dict__[key] = pars[key]
            self.pars.append(pars[key])

        self._statfuncset = False
        self.statfunc = (lambda x: None)
        if statfunc is not None:
            self.statfunc = statfunc
            self._statfuncset = True

        Likelihood.__init__(self, name)
Exemplo n.º 2
0
    def __init__(self, statfunc=None, hyperpars={}, pars={}, name='prior'):

        # Posterior hyper-parameters
        self.hyperpars = []
        for key in hyperpars.keys():
            val = hyperpars[key]
            param = Parameter(name, key, val, alwaysfrozen=True)
            self.__dict__[key] = param
            self.hyperpars.append(param)

        # References to parameters in source model
        self.pars = []
        for key in pars.keys():
            self.__dict__[key] = pars[key]
            self.pars.append(pars[key])

        self._statfuncset = False
        self.statfunc = (lambda x: None)
        if statfunc is not None:
            self.statfunc = statfunc
            self._statfuncset = True

        Likelihood.__init__(self, name)
Exemplo n.º 3
0
 def __init__(self, gp_stat):
     statname = 'GPStat'
     self.gp_stat = gp_stat
     Likelihood.__init__(self, statname)
Exemplo n.º 4
0
 def __init__(self, gp_stat):
     statname = 'GPStat'
     self.gp_stat = gp_stat
     Likelihood.__init__(self, statname)
Exemplo n.º 5
0
 def __init__(self, name='fermi'):
     Likelihood.__init__(self, name)
Exemplo n.º 6
0
 def __init__(self, fit):
     sherpa_name = 'sherpa_stat'
     self.fit = fit
     Likelihood.__init__(self, sherpa_name)