Skip to content

Commit

Permalink
4pi convolution now works
Browse files Browse the repository at this point in the history
  • Loading branch information
paganol committed Dec 7, 2024
1 parent cf27ac2 commit 4e34adc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions litebird_sim/beam_convolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 4e34adc

Please sign in to comment.