def _TEST_CELR_yrkSZ_field(self): from import_toolkit.cluster import Cluster from testing import angular_momentum cluster = Cluster(simulation_name='celr_e', clusterID=0, redshift='z000p000') r500 = cluster.group_r500() mass = cluster.particle_masses('gas') coords, vel = angular_momentum.derotate(cluster, align='gas', aperture_radius=r500, cluster_rest_frame=True) from unyt import hydrogen_mass, speed_of_light, thompson_cross_section plot_limit = 3 * r500 nbins = 100 bins = np.linspace(-plot_limit, plot_limit, nbins) pixel_area = (bins[1] - bins[0])**2 kSZ = np.multiply((vel.T * mass).T, (-1) * thompson_cross_section / (pixel_area * speed_of_light * hydrogen_mass * 1.16)) self.xyz_projections( xyzdata=coords, weights=kSZ, weights_labels=[r'$y_{kSZ} / \mathrm{Mpc}^2$'] * 3, plot_limit=plot_limit, nbins=nbins, colorbar_type=('symlog', 1e-6), circle_pars=[[0, 0, 0, r500], [0, 0, 0, 5 * r500]], circle_labels=[r'$R_{500}$', r'$5\times R_{500}$'], special_markers_pars=[0, 0, 0], special_markers_labels=r'CoM')
def _TEST_CELR_velocity_field(self): from import_toolkit.cluster import Cluster from testing import angular_momentum cluster = Cluster(simulation_name='celr_b', clusterID=0, redshift='z000p000') r500 = cluster.group_r500() mass = cluster.particle_masses('gas') coords, vel = angular_momentum.derotate(cluster, align='gas', aperture_radius=r500, cluster_rest_frame=True) momentum_lineOfSight = (vel.T * mass).T cbarlabel = [ r'$\sum_{i} m_i v_{z, i} / \sum_{i} m_i \ [\mathrm{km\ s^{-1}}]$', r'$\sum_{i} m_i v_{x, i} / \sum_{i} m_i \ [\mathrm{km\ s^{-1}}]$', r'$\sum_{i} m_i v_{y, i} / \sum_{i} m_i \ [\mathrm{km\ s^{-1}}]$' ] self.xyz_projections( xyzdata=coords, weights=momentum_lineOfSight, plot_limit=3 * r500, weights_labels=cbarlabel, nbins=100, colorbar_type='midpointLinear', circle_pars=[[0, 0, 0, r500], [0, 0, 0, 5 * r500]], circle_labels=[r'$R_{500}$', r'$5\times R_{500}$'], special_markers_pars=[0, 0, 0], special_markers_labels=r'CoM')