def onFboss(self, event): nstart,nstop=mys.get_range() # follow halos backwards, get position list in mt/cen for most massive halo #my.run("center_main.py "+str(nstart)+" "+str(nstop)) # fixes missing snapshots by linear interpolation # interpolate missing snapshots by assuming last halo position #my.run("fix_shrink_spheres.py") my.run("fill_snap_xyz.py "+str(nstart)+" "+str(nstop)) my.done()
def onPlist(self, event): nstart, nstop = mys.get_range() for nc in range(nstop-nstart+1): nsnap = nc + nstart # for all halos: cmd = "gen_particles_list.py "+str(nsnap) cmd += "&& gen_particles_dm.py "+str(nsnap) my.run(cmd) # if(not loop): # break my.done()
def onGenAOI(self, event): nstart,nstop=mys.get_range() for nc in range(nstop-nstart+1): nsnap = nc + nstart if(not mys.snap_exists(nsnap)): continue d = mys.d(nsnap) my.mkdir(d+"stars") my.mkdir(d+"dm") cmd = "gen_spheres.py "+str(nsnap)+" 2" # 1 at end: centers from AHF. 2: after shrinking sphere my.run(cmd) my.done()
def onGenSpheres(self, event): nstart, nstop = mys.get_range() for nc in range(nstop - nstart + 1): nsnap = nc + nstart if (not mys.snap_exists(nsnap)): continue d = mys.d(nsnap) my.mkdir(d + "dm") if (not mys.is_dmonly()): my.mkdir(d + "stars") cmd = "cd " + d + " && gen_spheres.py " + str(nsnap) + " 1" my.run(cmd) my.done()
def onGenSpheres(self, event): nstart,nstop=mys.get_range() for nc in range(nstop-nstart+1): nsnap = nc + nstart if(not mys.snap_exists(nsnap)): continue d = mys.d(nsnap) my.mkdir(d+"dm") if(not mys.is_dmonly()): my.mkdir(d+"stars"); cmd = "cd "+d+" && gen_spheres.py "+str(nsnap)+" 1" my.run(cmd) my.done()
def onGenAOI(self, event): nstart, nstop = mys.get_range() for nc in range(nstop - nstart + 1): nsnap = nc + nstart if (not mys.snap_exists(nsnap)): continue d = mys.d(nsnap) my.mkdir(d + "stars") my.mkdir(d + "dm") cmd = "gen_spheres.py " + str( nsnap ) + " 2" # 1 at end: centers from AHF. 2: after shrinking sphere my.run(cmd) my.done()
def onShrink(self, event): nstart,nstop=mys.get_range() # have xs,xs_star set in the end for nc in range(nstop-nstart+1): nsnap = nc + nstart if(not mys.snap_exists(nsnap)): continue print(mys.get_nhalo(nsnap)) for i in range(3):#range(mys.get_nhalo(nsnap)): if(not mys.exists_snap(nsnap)): print("snapshot "+str(nsnap)+" missing") continue cmd = "shrink_sphere.py "+str(nsnap)+" "+str(i+1) my.run(cmd) if(not mys.is_dmonly()): cmd = "shrink_sphere_stars.py "+str(nsnap)+" "+str(i+1) my.run(cmd) # TODO: if empty xs (shrinking sphere algorithm did not succeed: use xc) my.done()
def onShrink(self, event): nstart, nstop = mys.get_range() # have xs,xs_star set in the end for nc in range(nstop - nstart + 1): nsnap = nc + nstart if (not mys.snap_exists(nsnap)): continue print(mys.get_nhalo(nsnap)) for i in range(3): #range(mys.get_nhalo(nsnap)): if (not mys.exists_snap(nsnap)): print("snapshot " + str(nsnap) + " missing") continue cmd = "shrink_sphere.py " + str(nsnap) + " " + str(i + 1) my.run(cmd) if (not mys.is_dmonly()): cmd = "shrink_sphere_stars.py " + str(nsnap) + " " + str( i + 1) my.run(cmd) # TODO: if empty xs (shrinking sphere algorithm did not succeed: use xc) my.done()