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 option to suppress map weight object in map binner output. #51

Merged
merged 2 commits into from
Jul 1, 2021

Conversation

nwhitehorn
Copy link
Member

This can be useful for e.g. mock observing where the weight matrix
should be the same for every one of many maps and so is known a priori.
For polarized maps, suppressing it can reduce RAM usage by a factor of
four.

This can be useful for e.g. mock observing where the weight matrix
should be the same for every one of many maps and so is known a priori.
For polarized maps, suppressing it can reduce RAM usage by a factor of
four.
@nwhitehorn nwhitehorn requested a review from arahlin June 24, 2021 18:49
Copy link
Member

@arahlin arahlin left a comment

Choose a reason for hiding this comment

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

Looks fine to me. Just one question, mainly for optimization.

@@ -263,12 +271,14 @@ MapBinner::BinTimestream(const G3Timestream &det, double weight,
(*T)[detpointing[i]] += pcoupling.t*det[i];
(*Q)[detpointing[i]] += pcoupling.q*det[i];
(*U)[detpointing[i]] += pcoupling.u*det[i];
(*W)[detpointing[i]] += mueller;
if (W)
(*W)[detpointing[i]] += mueller;
Copy link
Member

Choose a reason for hiding this comment

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

Should we even bother populating the mueller variable if it's not being stored?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. The compiler should actually optimize that out, but we can adjust.

@nwhitehorn nwhitehorn merged commit f93dbb4 into master Jul 1, 2021
@nwhitehorn nwhitehorn deleted the suppressweightsinmapbinner branch July 1, 2021 01:36
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