Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single detector support #743

Merged
merged 2 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/toast/mpi.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Copyright (c) 2015-2020 by the parties listed in the AUTHORS file.
# Copyright (c) 2015-2024 by the parties listed in the AUTHORS file.
# All rights reserved. Use of this source code is governed by
# a BSD-style license that can be found in the LICENSE file.

import os
import time

# Helpful method when gathering lists across the communicator
from matplotlib.cbook import flatten

from ._libtoast import Logger

use_mpi = None
Expand Down
8 changes: 7 additions & 1 deletion src/toast/ops/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,21 @@ def _exec(self, data, detectors=None, use_accel=None, **kwargs):
all_local_dets = data.all_local_detectors(
selection=detectors, flagmask=det_mask
)
if len(all_local_dets) == 0:
all_local_dets = [None]
# Run operators one detector at a time
for det in all_local_dets:
msg = f"{pstr} {self} SINGLE detector {det}"
log.verbose(msg)
if det is None:
dets = []
else:
dets = [det]
for op in self.operators:
self._exec_operator(
op,
data,
detectors=[det],
detectors=dets,
pipe_accel=pipe_accel,
)
else:
Expand Down