diff --git a/src/toast/ops/filterbin.py b/src/toast/ops/filterbin.py index 5e2d20f96..13d5e82be 100644 --- a/src/toast/ops/filterbin.py +++ b/src/toast/ops/filterbin.py @@ -1579,8 +1579,12 @@ def _bin_map(self, data, detectors, filtered): save_pointing=self.binning.full_pointing, ) cov.apply(data, detectors=detectors) + log.info_rank( + f"Binned covariance and hits in", comm=self.comm, timer=timer + ) self.binning.apply(data, detectors=detectors) + log.info_rank(f"Binned signal in", comm=self.comm, timer=timer) mc_root = self.name if self.mc_mode: diff --git a/src/toast/ops/mapmaker_binning.py b/src/toast/ops/mapmaker_binning.py index a8757654a..c25e07ba0 100644 --- a/src/toast/ops/mapmaker_binning.py +++ b/src/toast/ops/mapmaker_binning.py @@ -8,7 +8,7 @@ from ..covariance import covariance_apply from ..observation import default_values as defaults -from ..timing import function_timer +from ..timing import Timer, function_timer from ..traits import Bool, Instance, Int, Unicode, Unit, trait_docs from ..utils import Logger from .delete import Delete @@ -158,14 +158,15 @@ def __init__(self, **kwargs): @function_timer def _exec(self, data, detectors=None, **kwargs): log = Logger.get() + timer = Timer() + timer.start() - for trait in "pixel_pointing", "stokes_weights": + for trait in "pixel_pointing", "stokes_weights", "det_data": if getattr(self, trait) is None: msg = f"You must set the '{trait}' trait before calling exec()" raise RuntimeError(msg) - if data.comm.world_rank == 0: - log.verbose(" BinMap building pipeline") + log.verbose_rank(" BinMap building pipeline", comm=data.comm.comm_world) if self.covariance not in data: msg = f"Data does not contain noise covariance '{self.covariance}'" @@ -181,10 +182,6 @@ def _exec(self, data, detectors=None, **kwargs): log.error(msg) raise RuntimeError(msg) - # Check that the detector data is set - if self.det_data is None: - raise RuntimeError("You must set the det_data trait before calling exec()") - # Sanity check that the covariance pixel distribution agrees if cov.distribution != data[self.pixel_dist]: msg = ( diff --git a/src/toast/ops/mapmaker_utils/mapmaker_utils.py b/src/toast/ops/mapmaker_utils/mapmaker_utils.py index 1a1db6d6a..ddd5c045b 100644 --- a/src/toast/ops/mapmaker_utils/mapmaker_utils.py +++ b/src/toast/ops/mapmaker_utils/mapmaker_utils.py @@ -188,6 +188,7 @@ def _exec(self, data, detectors=None, use_accel=None, **kwargs): ) return + @function_timer def _finalize(self, data, **kwargs): if self.hits in data: if self.sync_type == "alltoallv": @@ -473,6 +474,7 @@ def _exec(self, data, detectors=None, use_accel=None, **kwargs): ) return + @function_timer def _finalize(self, data, **kwargs): if self.inverse_covariance in data: if self.sync_type == "alltoallv": @@ -823,6 +825,7 @@ def _exec(self, data, detectors=None, use_accel=None, **kwargs): return + @function_timer def _finalize(self, data, use_accel=None, **kwargs): if self.zmap in data: log = Logger.get()