def __init__(self): if __name__ == '__main__': from support import main print("main") par = main() self.filename = par.filename self.q1 = par.q1 self.q2 = par.q2 self.grid = par.grid self.ulim = par.ulim self.mlim = par.mlim self.name = par.name self.load() else: print("imported") self.grid = 2 self.ulim = 1e0 self.mlim = 1e0 make_dir(pathjoin("TESTS",""))
def load(self,**arg): if len(arg) == 0: q1 = self.q1 ulim = self.ulim or 1e0 mlim = self.mlim or 1e0 name = self.name else: q1 = arg['q1'] ulim = arg['ulim'] or 1e0 mlim = arg['mlim'] or 1e0 name = arg['name'] if ulim != 1e0 and mlim == 1e0: self.label = 'q'+str(q1)+'_u'+str(ulim)+'_'+name elif mlim != 1e0 and ulim == 1e0: self.label = 'q'+str(q1)+'_m'+str(mlim)+'_'+name elif ulim != 1e0 and mlim != 1e0: self.label = 'q'+str(q1)+'_u'+str(ulim)+'_m'+str(mlim)+'_'+name else: self.label = 'q'+str(q1)+'_'+self.name mypath = pathjoin("TESTS",self.label) make_dir(mypath) make_dir(pathjoin(mypath,"plots","")) make_dir(pathjoin(mypath,"maps",""))