Skip to content

Commit

Permalink
corrected definition of signal_map in simclusters.py class `simul…
Browse files Browse the repository at this point in the history
…ate_clusters.get_T_maps()``
  • Loading branch information
samueldmcdermott committed Jul 30, 2024
1 parent b7ec4ab commit 22971a4
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions deepszsim/simclusters.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,15 @@ def get_T_maps(self, add_CMB = True, returnval = False):
dT_maps = self.get_dT_maps()
if add_CMB: self.ps = simtools.get_cls(ns = self.vars['ns'], cosmo = self.vars['cosmo'])
if self.tqverb: print("making convolved T maps" + (" with CMB" if add_CMB else ""))
_centerpix = self.image_size_pixels // 2
for i in tqdm(range(self._size), disable = (not self.tqverb)):
self.clusters[self.id_list[i]]['params']['dT_central'] = dT_maps[i][self.image_size_pixels // 2][
self.image_size_pixels // 2]
dTm = dT_maps[i]
self.clusters[self.id_list[i]]['params']['dT_central'] = dTm[_centerpix,_centerpix]
self.clusters[self.id_list[i]]['maps'] = {}
beamsig_map = simtools.convolve_map_with_gaussian_beam(self.pixel_size_arcmin,
self.beam_size_arcmin, dTm)
if add_CMB:
conv_map, cmb_map = simtools.add_cmb_map_and_convolve(dT_maps[i], self.ps,
conv_map, cmb_map = simtools.add_cmb_map_and_convolve(dTm, self.ps,
self.pixel_size_arcmin,
self.beam_size_arcmin)
else:
Expand All @@ -182,8 +185,8 @@ def get_T_maps(self, add_CMB = True, returnval = False):
final_map = conv_map + noise_map
self.clusters[self.id_list[i]]['maps']['conv_map'] = conv_map
self.clusters[self.id_list[i]]['maps']['CMB_map'] = cmb_map
self.clusters[self.id_list[i]]['maps']['signal_map'] = conv_map - cmb_map
self.clusters[self.id_list[i]]['maps']['noise_map'] = noise_map
self.clusters[self.id_list[i]]['maps']['signal_map'] = dTm
self.clusters[self.id_list[i]]['maps']['beamsig_map'] = beamsig_map
self.clusters[self.id_list[i]]['maps']['final_map'] = final_map

if returnval:
Expand Down

0 comments on commit 22971a4

Please sign in to comment.