def babah(): for key in var.keys(): self.values[key] = None self.vmap[var[key]] = key for key in const.keys(): self.values[key] = const[key] if type(model)==type([]): GM.__init__(self,model) else: PM.__init__(self,model) self.ispix = True self.setValues() self.name = name self.convolve = None
def __init__(self,name,model,pars): if 'amp' not in pars.keys(): pars['amp'] = 1. self.keys = pars.keys() self.keys.sort() if self.keys!=['amp','x','y']: import sys print 'Not all (or too many) parameters were defined!' print self.keys sys.exit() if type(model)==type([]): GM.__init__(self,model) else: PM.__init__(self,model) self.vmap = {} self.pars = pars for key in self.keys: try: v = self.pars[key].value self.vmap[key] = self.pars[key] except: self.__setattr__(key,self.pars[key]) self.setPars() self.name = name