summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hoffmann <volker@cheleb.net>2013-05-14 17:59:19 +0200
committerVolker Hoffmann <volker@cheleb.net>2013-05-14 17:59:19 +0200
commitc9573d4227430de5f0f6a7a65efb8d5952a2e2f0 (patch)
tree42b9ea9fe983a23a8553662026d976f256ac0164
parentfd3b799af02bf86c808c5c81b5d4248ffc1528e9 (diff)
save minmax for mass_r
-rw-r--r--DiskRTZ.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/DiskRTZ.py b/DiskRTZ.py
index f68633f..ff5784f 100644
--- a/DiskRTZ.py
+++ b/DiskRTZ.py
@@ -50,6 +50,7 @@ class DiskBase():
self.mdotr_rz_l0_min = None; self.mdotr_rz_l0_max = None
self.mdotr_r_g0_min = None; self.mdotr_r_g0_max = None
self.mdotr_r_l0_min = None; self.mdotr_r_l0_max = None
+ self.mass_r_min = None; self.mass_r_max = None
def init_cylindrical_coords(self):
self.rtz["r"] = self.przt[:,0] * self.info["boxlen"]
@@ -113,6 +114,8 @@ class DiskIo(DiskBase):
self.mdotr_r_g0_min = npz["mdotr_r_g0_min"]
self.mdotr_r_l0_max = npz["mdotr_r_l0_max"]
self.mdotr_r_l0_min = npz["mdotr_r_l0_min"]
+ self.mass_r_max = npz["mass_r_max"]
+ self.mass_r_min = npz["mass_r_min"]
self.rho_rz_max = npz["rho_rz_max"]
self.rho_rz_min = npz["rho_rz_min"]
self.info = npz["info"][()]
@@ -128,6 +131,8 @@ class DiskIo(DiskBase):
self.mdotr_r_g0_min = npz["mdotr_r_g0_min"]
self.mdotr_r_l0_max = npz["mdotr_r_l0_max"]
self.mdotr_r_l0_min = npz["mdotr_r_l0_min"]
+ self.mass_r_max = npz["mass_r_max"]
+ self.mass_r_min = npz["mass_r_min"]
self.rho_rz_max = npz["rho_rz_max"]
self.rho_rz_min = npz["rho_rz_min"]
@@ -150,6 +155,7 @@ class DiskIo(DiskBase):
mdotr_r_g0_min = self.mdotr_r_g0_min, \
mdotr_r_l0_max = self.mdotr_r_l0_max, \
mdotr_r_l0_min = self.mdotr_r_l0_min, \
+ mass_r_max = self.mass_r_max, mass_r_min = self.mass_r_min, \
rho_rz_max = self.rho_rz_max, rho_rz_min = self.rho_rz_min, \
info = self.info )
@@ -237,6 +243,8 @@ class DiskReduce(DiskReduceBase):
def compute_mass_r(self):
"""Compute Mass in Radial Bins."""
self.mass_r = self.rho_r * self.dl["dr"]
+ self.mass_r_max = np.max(self.mass_r)
+ self.mass_r_min = np.min(self.mass_r)
def add_to_total_mass(self):
"""Add Mass per Radial To Get Total Mass."""