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

Add support for single detector maps #690

Closed
wants to merge 3 commits into from
Closed

Conversation

keskitalo
Copy link
Member

No description provided.

@keskitalo keskitalo requested a review from tskisner February 5, 2024 18:12
Copy link
Member

@tskisner tskisner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine. One small improvement noted if you wish.

job_ops.mapmaker.apply(obs_data)
# See if user wants separate detector maps
if hasattr(otherargs, "detmaps") and otherargs.detmaps:
my_dets = data.all_local_detectors()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might cause problems if some detectors are cut in all observations. You could replace this line with

my_dets = data.all_local_detectors(flagmask=defaults.det_mask_invalid)

to get the global detectors which are not cut by major issues.

if data.comm.comm_world is None:
all_dets = my_dets
else:
from matplotlib.cbook import flatten
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I had never seen this method! Definitely useful for the typical use case of calling gather / allgather on python lists, resulting in a list of lists. We could consider doing a namespace import as toast.mpi.flatten and use it more generally.

@keskitalo
Copy link
Member Author

This PR requires hpc4cmb/toast#743 to be merged first.

@keskitalo keskitalo mentioned this pull request Jun 4, 2024
@keskitalo keskitalo closed this Jun 5, 2024
@keskitalo
Copy link
Member Author

This PR is superseded by #877

@keskitalo keskitalo deleted the detector_maps branch June 5, 2024 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants