From 4e34adc35c2897384370316dc1b01f3362073153 Mon Sep 17 00:00:00 2001 From: Luca Pagano Date: Sat, 7 Dec 2024 17:49:37 +0100 Subject: [PATCH] 4pi convolution now works --- litebird_sim/beam_convolution.py | 12 ++++++------ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/litebird_sim/beam_convolution.py b/litebird_sim/beam_convolution.py index bd75e438..c6ca98f7 100644 --- a/litebird_sim/beam_convolution.py +++ b/litebird_sim/beam_convolution.py @@ -30,7 +30,7 @@ class BeamConvolutionParameters: lmax: int kmax: int single_precision: bool = True - epsilon: float = 1e-7 + epsilon: float = 1e-5 def add_convolved_sky_to_one_detector( @@ -71,9 +71,8 @@ def add_convolved_sky_to_one_detector( kmax=default_kmax, ) - if ( - hwp_angle is None - ): # we cannot simulate HWP, so let's use classic 4pi convolution + if hwp_angle is None: + # we cannot simulate HWP, so let's use classic 4pi convolution if convolution_params.single_precision: _ftype = np.float32 _ctype = np.complex64 @@ -84,17 +83,18 @@ def add_convolved_sky_to_one_detector( intertype = Interpolator _slm = sky_alms_det.astype(_ctype) + _blm = beam_alms_det.astype(_ctype) inter = intertype( sky=_slm, - beam=beam_alms_det, + beam=_blm, separate=False, lmax=convolution_params.lmax, kmax=convolution_params.kmax, epsilon=convolution_params.epsilon, nthreads=nthreads, ) - tod_det += inter.interpol(pointings_det.astype(_ftype)) + tod_det += inter.interpol(pointings_det.astype(_ftype))[0] else: fullconv = MuellerConvolver( slm=sky_alms_det, diff --git a/pyproject.toml b/pyproject.toml index 742f6cb6..06a421aa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ jplephem = "^2.18" PyGithub = "^2.1" requests = "^2.31.0" rich = "^13.4.2" -ducc0 = "^0.31.0" +ducc0 = "^0.35.0" pysm3 = "~3.4.0" asciimatics = "^1.14.0" pyperclip = "^1.8.2"