def experiment(modelfile): setup = GareflModel(modelfile) M = [GareflExperiment(setup, k) for k in range(setup.num_models)] names = setup.par_names() low, high = setup.par_bounds() value = setup.par_values() pars = [ Parameter(v, name=s, bounds=(L, H)) for v, s, L, H in zip(value, names, low, high) ] M[0]._pars = pars return M
def __init__(self, A=1, xc=0, yc=0, g1=1, g2=1, theta=0, name=""): self.A = Parameter(A, name=name + "A") self.xc = Parameter(xc, name=name + "xc") self.yc = Parameter(yc, name=name + "yc") self.g1 = Parameter(g1, name=name + "g1") self.g2 = Parameter(g2, name=name + "g2") self.theta = Parameter(theta, name=name + "theta")
def __init__(self, A=1, xc=0, yc=0, s1=1, s2=1, theta=0, name=""): self.A = Parameter(A, name=name + "A") self.xc = Parameter(xc, name=name + "xc") self.yc = Parameter(yc, name=name + "yc") self.s1 = Parameter(s1, name=name + "s1") self.s2 = Parameter(s2, name=name + "s2") self.theta = Parameter(theta, name=name + "theta")
def experiment(modelfile, probes=None): setup = GareflModel(modelfile) if probes: if len(probes) != setup.num_models: raise ValueError("Number of datasets must match number of models") M = [ GareflExperiment(setup, k, probe=probes[k]) for k in range(setup.num_models) ] else: M = [GareflExperiment(setup, k) for k in range(setup.num_models)] names = setup.par_names() low, high = setup.par_bounds() value = setup.par_values() pars = [ Parameter(v, name=s, bounds=(L, H)) for v, s, L, H in zip(value, names, low, high) ] M[0]._pars = pars return M
def __init__(self, C=0, name=""): self.C = Parameter(C, name=name + "background")