-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrunData.py
40 lines (34 loc) · 1.11 KB
/
runData.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import haloutils
from caterpillaranalysis import *
from caterpillarplot import *
from MTanalysis2 import *
def runCode(lx,start,end):
Extant = ExtantDataFirstPass()
Destroyed = DestroyedDataFirstPass()
AE = AllExtantData()
AD = AllDestroyedData()
halo_paths = haloutils.find_halo_paths(levellist=[lx],require_mergertree=True,require_subfind=False,verbose=False) # length is 18 April 7th
for hpath in halo_paths[start:end]:
print hpath, 'STARTING'
Extant.analyze(hpath,recalc=True)
AE.analyze(hpath,recalc=True)
Destroyed.analyze(hpath,recalc=True)
AD.analyze(hpath,recalc=True)
#Destroyed.combinefiles(hpath) # now part of analyze
print hpath, 'FINISHED'
if __name__ == "__main__":
import sys
lx = int(sys.argv[1])
start = int(sys.argv[2])
end = int(sys.argv[3])
runCode(lx,start,end)
"""
lx = 12
haloidlist = get_haloidlist(1)
for hid in haloidlist:
hpath = haloutils.get_hpath_lx(hid,lx)
TagExtant.analyze(hpath)
TagDestroyed.analyze(hpath)
TagDestroyed.combinefiles(hpath)
TagMass.analyze(hpath)
"""