From e3923265d0d6949407a83726e9a9bd5d97079221 Mon Sep 17 00:00:00 2001 From: Weitian LI Date: Wed, 18 Jun 2014 22:20:59 +0800 Subject: Initial commit Added files: * mass_profile: developed by Junhua GU, modified by Weitian LI * opt_utilities: developed by Junhua GU * tools/cosmo_calc: originated from 'calc_distance', modified * scripts: scripts used to process Chandra ACIS data * files: useful files used in processing * HOWTO_chandra_acis_process.txt * README.md --- mod_ly/extract_tcool.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 mod_ly/extract_tcool.py (limited to 'mod_ly/extract_tcool.py') diff --git a/mod_ly/extract_tcool.py b/mod_ly/extract_tcool.py new file mode 100755 index 0000000..05c836b --- /dev/null +++ b/mod_ly/extract_tcool.py @@ -0,0 +1,14 @@ +#!/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)) + print("rcool= %f kpc" % rcool) + print("cooling_time= %f Gyr @ %f kpc" % (t,rcool)) + sys.exit(0) -- cgit v1.2.2