From d89d6260ceb0b847e5b078704f600ab28203ab0c Mon Sep 17 00:00:00 2001 From: mtremmel Date: Tue, 15 Jul 2025 17:18:15 +0100 Subject: [PATCH] ensure outflow profiles have the same style as every other profile, starting at 0 and going to maxradius, rather than starting at 0.1*max_radius --- properties.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/properties.py b/properties.py index 40e824a..be523b5 100644 --- a/properties.py +++ b/properties.py @@ -61,12 +61,12 @@ def plot_ylabel(self): def _get_profile(self, halo, maxrad): delta = self.plot_xdelta() - nbins = int(0.9*maxrad / delta) - maxrad = 0.1*maxrad + delta * nbins + nbins = int(maxrad / delta) + maxrad = delta * nbins oprof = pynbody.analysis.profile.Profile(halo.g[self.ofilt], type='lin', ndim=3, - min=0.1*maxrad, max=maxrad, nbins=nbins) + min=0, max=maxrad, nbins=nbins) iprof = pynbody.analysis.profile.Profile(halo.g[self.ifilt], type='lin', ndim=3, - min=0.1*maxrad, max=maxrad, nbins=nbins) + min=0, max=maxrad, nbins=nbins) mass_out = (oprof['p_r']/delta).view(np.ndarray) mass_in = (iprof['p_r']/delta).view(np.ndarray) metal_out = (oprof['p_r_metals']/delta).view(np.ndarray) @@ -743,4 +743,4 @@ def calculate(self, halo, properties): mdot_grid_sum, _ = np.histogram(t_orbit[order],weights=Mdot_orbit[order],bins=nbins,range=(0,grid_tmax_Gyr)) mdot_grid_ave = mdot_grid_sum/mdot_grid_n - return mdot_grid_ave[self.store_slice(t_max)] \ No newline at end of file + return mdot_grid_ave[self.store_slice(t_max)]