def map_density(self, particle_type: int, tilt: str = 'z') -> np.ndarray: if particle_type != 1: weights = self.data.subfind_particles[f'PartType{particle_type}'][ 'Mass'] return self.make_map(particle_type, weights, tilt=tilt) else: read.wwarn('Density map not defined for dark_matter particles.')
def map_kSZ(self, particle_type: int, tilt: str = 'z') -> np.ndarray: if particle_type == 0: radial_velocities = self.rotate_velocities(particle_type, tilt=tilt)[:, 2] mass_weighted_temps = self.data.subfind_particles[f'PartType{particle_type}']['Mass'].T * radial_velocities weights = mass_weighted_temps * ksz_const / unyt.unyt_quantity(1., unyt.Mpc) return self.make_map(particle_type, weights, tilt=tilt) else: read.wwarn('Kinetic SZ map only defined for gas particles.')
def map_tSZ(self, particle_type: int, tilt: str = 'z') -> np.ndarray: if particle_type == 0: mass_weighted_temps = self.data.subfind_particles[f'PartType{particle_type}']['Mass'].T * \ self.data.subfind_particles[f'PartType{particle_type}']['Temperature'] weights = mass_weighted_temps * tsz_const / unyt.unyt_quantity(1., unyt.Mpc) return self.make_map(particle_type, weights, tilt=tilt) else: read.wwarn('Thermal SZ map only defined for gas particles.')
def map_mass_weighted_temperature(self, particle_type: int, tilt: str = 'z') -> np.ndarray: if particle_type == 0: mass_weighted_temps = self.data.subfind_particles[f'PartType{particle_type}']['Mass'].T * \ self.data.subfind_particles[f'PartType{particle_type}']['Temperature'] mass_weighted_temps_map = self.make_map(particle_type, mass_weighted_temps, tilt=tilt) mass = self.data.subfind_particles[f'PartType{particle_type}']['Mass'] mass_map = self.make_map(particle_type, mass, tilt=tilt) return mass_weighted_temps_map / mass_map else: read.wwarn('Mass-weighted-temperature map only defined for gas particles.')
def map_rkSZ(self, particle_type: int, tilt: str = 'z') -> np.ndarray: if particle_type == 0: # Derotate velocities and subtract bulk motion (work in cluster's frame) # The boost velocity is subtracted as bulk motion radial_velocities = self.rotate_velocities( particle_type, tilt=tilt, boost=self.peculiar_velocity_hot_gas )[:, 2] mass_weighted_temps = self.data.subfind_particles[f'PartType{particle_type}']['Mass'].T * radial_velocities weights = mass_weighted_temps * ksz_const / unyt.unyt_quantity(1., unyt.Mpc) return self.make_map(particle_type, weights, tilt=tilt) else: read.wwarn('Rotational-kinetic SZ map only defined for gas particles.')