From 41b4f2a9c10670f4b247c97832e01be5e2ebf67d Mon Sep 17 00:00:00 2001 From: ykyohei <38639108+ykyohei@users.noreply.github.com> Date: Wed, 8 Jul 2026 23:54:01 -0400 Subject: [PATCH] fix dtype of demod.from_map --- sotodlib/coords/demod.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sotodlib/coords/demod.py b/sotodlib/coords/demod.py index 7903f9fd2..1d981238c 100644 --- a/sotodlib/coords/demod.py +++ b/sotodlib/coords/demod.py @@ -179,6 +179,8 @@ def from_map(tod, signal_map, cuts=None, flip_gamma=True, wrap=False, modulated= else: assert 'hwp_angle' in tod._fields signal_sim = dsT_sim + demodQ_sim*np.cos(4*tod.hwp_angle) + demodU_sim*np.sin(4*tod.hwp_angle) + # signal is promoted to float64 because hwp_angle is float64, cast back to float32 + signal_sim = signal_sim.astype('float32') if wrap: tod.wrap('signal', signal_sim, [(0, 'dets'), (1, 'samps')]) return signal_sim