Skip to content

Commit

Permalink
Arrrrgh restoring the ridiculous transposing chain
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidT3 committed Nov 21, 2024
1 parent 10b1e5c commit e6a7464
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xga/products/profile.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This code is a part of X-ray: Generate and Analyse (XGA), a module designed for the XMM Cluster Survey (XCS).
# Last modified by David J Turner (turne540@msu.edu) 21/11/2024, 10:03. Copyright (c) The Contributors
# Last modified by David J Turner (turne540@msu.edu) 21/11/2024, 10:05. Copyright (c) The Contributors

from copy import copy
from typing import Tuple, Union, List
Expand Down Expand Up @@ -2598,7 +2598,7 @@ def mass(self, radius: Quantity, conf_level: float = 68.2,
dens_data_real = self.density_profile.generate_data_realisations(self._num_samples)
dens = dens_data_real[:, d_inds].T
# Calculating density gradient # TODO DON'T KNOW IF THIS WILL WORK
dens_der = np.gradient(dens_data_real, self.density_profile.radii, axis=0)[:, d_inds].T
dens_der = np.gradient(dens_data_real.T, self.density_profile.radii, axis=0).T[:, d_inds].T

# Finally, whatever way we got the densities, we make sure they are in the right unit (also their 1st
# derivatives).
Expand Down Expand Up @@ -2654,7 +2654,7 @@ def mass(self, radius: Quantity, conf_level: float = 68.2,
temp_data_real = self.temperature_profile.generate_data_realisations(self._num_samples)
temp = temp_data_real[:, t_inds].T
# Calculating temperature gradient # TODO DON'T KNOW IF THIS WILL WORK
temp_der = np.gradient(temp_data_real, self.temperature_profile.radii, axis=0)[:, t_inds].T
temp_der = np.gradient(temp_data_real.T, self.temperature_profile.radii, axis=0).T[:, t_inds].T


# We ensure the temperatures are in the right unit - we want Kelvin for this, as compared to the entropy
Expand Down

0 comments on commit e6a7464

Please sign in to comment.