diff --git a/src/toast/ops/conviqt.py b/src/toast/ops/conviqt.py index 067158bb4..d18696f6e 100644 --- a/src/toast/ops/conviqt.py +++ b/src/toast/ops/conviqt.py @@ -315,7 +315,7 @@ def _get_all_detectors(self, data, detectors): my_dets.add(det) # Make sure detector data output exists exists = obs.detdata.ensure( - self.det_data, detectors=detectors, units=self.det_data_units + self.det_data, detectors=detectors, create_units=self.det_data_units ) all_dets = self.comm.gather(my_dets, root=0) if self.comm.rank == 0: @@ -568,7 +568,7 @@ def save(self, data, det, convolved_data, verbose): timer = Timer() timer.start() offset = 0 - scale = unit_conversion(u.K, self.units) + scale = unit_conversion(u.K, self.det_data_units) for obs in data.obs: if det not in obs.local_detectors: continue diff --git a/src/toast/tests/ops_sim_tod_conviqt.py b/src/toast/tests/ops_sim_tod_conviqt.py index 5da93029c..8fa1635b3 100644 --- a/src/toast/tests/ops_sim_tod_conviqt.py +++ b/src/toast/tests/ops_sim_tod_conviqt.py @@ -803,4 +803,5 @@ def test_sim_hwp(self): np.testing.assert_almost_equal(cl_out_wo_hwp, cl_out_w_hwp, decimal=2) - close_data(data) + close_data(data_w_hwp) + close_data(data_wo_hwp)