-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
The issue was brought up by Mat. Should be a very tiny correction to signal simulations.
def __signal_postprocessing__(self, patch, signal_idx, alm_patch, save_map, oshape, owcs, apply_window=True):
signal = self.get_template(patch,shape=oshape,wcs=owcs)
signal = signal if len(alm_patch.shape) > 1 else signal[0,...]
curvedsky.alm2map(alm_patch, signal, spin = [0,2], verbose=True)
if apply_window:
print('apply window')
axes = [-2, -1]
for idx in range(signal.shape[0]):
kmap = pfft.fft(signal[idx], axes=axes)
wy, wx = enmap.calc_window(kmap.shape)
wind = wy[:,None]**1 * wx[None,:]**1
kmap *= wind
signal[idx] = (pfft.ifft(kmap, axes=axes, normalize=True)).real
del kmap
if save_map:
self.signals[signal_idx] = signal.copy()
self.manage_cache(self.signals, self.max_cached)
return signal