aboutsummaryrefslogtreecommitdiffstats
path: root/mass_profile/extract_tcool.py
blob: 393af274f5a7062279deb7cc63ed9b7bb30f0b2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env python

import sys
rcool=float(sys.argv[1])

for l in open('cooling_time.dat'):
    r,t=l.split()
    r=float(r)
    t=float(t)
    if r>rcool:
        print("cooling time at %f kpc=%f Gyr"%(rcool,t))
        sys.exit(0)