def __init__(self, name, model, var=None, const=None): if const is None: const = {} if var is None: var = {} keys = var.keys() + const.keys() keys.sort() if keys != ['amp', 'x', 'y']: print "Not all parameters defined!", keys df self.keys = keys self.values = {} self.vmap = {} self.ispix = False 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.0 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
def __init__(self,name,model,var=None,const=None): if const is None: const = {} if var is None: var = {} keys = var.keys()+const.keys() keys.sort() if keys!=['amp','x','y']: print "Not all parameters defined!",keys df self.keys = keys self.values = {} self.vmap = {} self.ispix = False 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 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 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() GM.__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
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
def pixeval(self, xc, yc, dummy1=None, dummy2=None, **kwargs): if self.ispix == True: return PM.pixeval(self, xc, yc) else: return GM.pixeval(self, xc, yc)