summaryrefslogtreecommitdiffstats
path: root/DiskXYZ.py
diff options
context:
space:
mode:
Diffstat (limited to 'DiskXYZ.py')
-rw-r--r--DiskXYZ.py89
1 files changed, 89 insertions, 0 deletions
diff --git a/DiskXYZ.py b/DiskXYZ.py
index f9f6134..5894978 100644
--- a/DiskXYZ.py
+++ b/DiskXYZ.py
@@ -209,6 +209,15 @@ class DiskIo(DiskBase):
self.angular_momentum_lost_to_halo = npz["angular_momentum_lost_to_halo"]
self.infall_rate = npz["infall_rate"]
self.info = npz["info"][()]
+ self.h_xy = npz["h_xy"]
+ self.T_mid_xy = npz["T_mid_xy"]
+ self.Omega_xy = npz["Omega_xy"]
+ self.rho_mid_xy = npz["rho_mid_xy"]
+ self.n_mid_xy = npz["n_mid_xy"]
+ self.xe_mid_xy = npz["xe_mid_xy"]
+ self.etaB_mid_xy = npz["etaB_mid_xy"]
+ self.ua2_mid_xy = npz["ua2_mid_xy"]
+ self.ReM_mid_xy = npz["ReM_mid_xy"]
def load_stats(self):
"""Load Stats."""
@@ -510,6 +519,86 @@ class DiskReduce(DiskReduceBase):
class DiskPlots(DiskReduce):
"""Plotting Routines."""
+ def plot_ReM_mid_xy(self, ax_in=None, clim=None):
+ ext = [np.min(self.xy0["x"]), np.max(self.xy0["x"]), \
+ np.min(self.xy0["y"]), np.max(self.xy0["y"])]
+ if not ax_in:
+ fig = plt.figure()
+ ax = fig.add_subplot(1,1,1)
+ else:
+ ax = ax_in
+ im = ax.imshow(np.rot90(np.log10(self.ReM_mid_xy.reshape(self.nx, self.ny))), \
+ extent=ext, interpolation='none')
+ ax.set_xlabel('X [AU]')
+ ax.set_ylabel('Y [AU]')
+ ax.set_title('Log10 Magnetic Reynolds Number [-]')
+ ax.grid()
+ if clim:
+ im.set_clim(clim)
+ plt.colorbar(im, ax=ax)
+ if not ax_in:
+ plt.show()
+
+ def plot_xe_mid_xy(self, ax_in=None, clim=None):
+ ext = [np.min(self.xy0["x"]), np.max(self.xy0["x"]), \
+ np.min(self.xy0["y"]), np.max(self.xy0["y"])]
+ if not ax_in:
+ fig = plt.figure()
+ ax = fig.add_subplot(1,1,1)
+ else:
+ ax = ax_in
+ im = ax.imshow(np.rot90(np.log10(self.xe_mid_xy.reshape(self.nx, self.ny))), \
+ extent=ext, interpolation='none')
+ ax.set_xlabel('X [AU]')
+ ax.set_ylabel('Y [AU]')
+ ax.set_title('Log10 Midplane Electron Fraction [-]')
+ ax.grid()
+ if clim:
+ im.set_clim(clim)
+ plt.colorbar(im, ax=ax)
+ if not ax_in:
+ plt.show()
+
+ def plot_n_mid_xy(self, ax_in=None, clim=None):
+ ext = [np.min(self.xy0["x"]), np.max(self.xy0["x"]), \
+ np.min(self.xy0["y"]), np.max(self.xy0["y"])]
+ if not ax_in:
+ fig = plt.figure()
+ ax = fig.add_subplot(1,1,1)
+ else:
+ ax = ax_in
+ im = ax.imshow(np.rot90(np.log10(self.n_mid_xy.reshape(self.nx, self.ny))), \
+ extent=ext, interpolation='none')
+ ax.set_xlabel('X [AU]')
+ ax.set_ylabel('Y [AU]')
+ ax.set_title('Log10 Midplane H2 Number Density [1/cm^3]')
+ ax.grid()
+ if clim:
+ im.set_clim(clim)
+ plt.colorbar(im, ax=ax)
+ if not ax_in:
+ plt.show()
+
+ def plot_T_mid_xy(self, ax_in=None, clim=None):
+ ext = [np.min(self.xy0["x"]), np.max(self.xy0["x"]), \
+ np.min(self.xy0["y"]), np.max(self.xy0["y"])]
+ if not ax_in:
+ fig = plt.figure()
+ ax = fig.add_subplot(1,1,1)
+ else:
+ ax = ax_in
+ im = ax.imshow(np.rot90(self.T_mid_xy.reshape(self.nx, self.ny)), \
+ extent=ext, interpolation='none')
+ ax.set_xlabel('X [AU]')
+ ax.set_ylabel('Y [AU]')
+ ax.set_title('Midplane Temperature [K]')
+ ax.grid()
+ if clim:
+ im.set_clim(clim)
+ plt.colorbar(im, ax=ax)
+ if not ax_in:
+ plt.show()
+
def plot_rho_xy(self, ax_in=None, clim=None):
ext = [np.min(self.xy0["x"]), np.max(self.xy0["x"]), \
np.min(self.xy0["y"]), np.max(self.xy0["y"])]