aboutsummaryrefslogtreecommitdiffstats
path: root/mass_profile/extract_tcool.py
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2017-02-17 00:42:18 +0800
committerAaron LI <aaronly.me@outlook.com>2017-02-17 01:16:47 +0800
commit594d5eac997bb6294dcde9417792135c90e7e8df (patch)
tree4ce1008d2b1677aa025399e9a1be45a59bcddf22 /mass_profile/extract_tcool.py
parent59baada42d2abfb7201a283956f135739655367a (diff)
downloadchandra-acis-analysis-594d5eac997bb6294dcde9417792135c90e7e8df.tar.bz2
Remove 'extract_tcool.py' which no longer used by 'fit_mass.sh'
Diffstat (limited to 'mass_profile/extract_tcool.py')
-rwxr-xr-xmass_profile/extract_tcool.py42
1 files changed, 0 insertions, 42 deletions
diff --git a/mass_profile/extract_tcool.py b/mass_profile/extract_tcool.py
deleted file mode 100755
index f2b7774..0000000
--- a/mass_profile/extract_tcool.py
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/env python3
-#
-# Extract the cooling time corresponding to the cooling radius.
-#
-# Junhua GU
-# 2012-12-20
-# Weitian LI
-# 2016-06-07
-#
-
-import argparse
-import numpy as np
-
-
-def get_tcool(data, rcool):
- """
- Get the cooling time *at* the specified cooling radius.
-
- XXX: whether to interpolate first?
- """
- radius = data[:, 0]
- ctime = data[:, 1]
- tcool = np.min(ctime[radius > rcool])
- return tcool
-
-
-def main():
- parser = argparse.ArgumentParser(
- description="Extract cooling time w.r.t the given cooling radius")
- parser.add_argument("infile", help="input cooling time data file")
- parser.add_argument("rcool", type=float, help="cooling radius (kpc)")
- args = parser.parse_args()
-
- data = np.loadtxt(args.infile)
- tcool = get_tcool(data, rcool=args.rcool)
- print("cooling time at %f kpc=%f Gyr" % (args.rcool, tcool))
- print("cooling_time= %f Gyr" % tcool)
- print("cooling_radius= %f kpc" % args.rcool)
-
-
-if __name__ == "__main__":
- main()