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

Support passing None for HWP angles to pointing matrix calculation. #345

Merged
merged 2 commits into from
May 6, 2020

Conversation

tskisner
Copy link
Member

@tskisner tskisner commented May 6, 2020

Rather than always passing an array of zeros if there is no HWP,
support passing None value to the underlying C++ code. Fix an
error in the docstring. Add a unit test to verify that no HWP
and HWP angles of all zero give matching results.

We should rebase this after #343 is merged.

@tskisner tskisner self-assigned this May 6, 2020
@@ -33,7 +33,7 @@ class OpPointingHpix(Operator):
the total response is:

.. math::
d = cal \\left[\\frac{(1+eps)}{2} I + \\frac{(1-eps)}{2} \\left[Q \\cos{4(a+w)} + U \\sin{4(a+w)}\\right]\\right]
d = cal \\left[\\frac{(1+eps)}{2} I + \\frac{(1-eps)}{2} \\left[Q \\cos{2a+4w} + U \\sin{2a+4w}\\right]\\right]
Copy link
Member

Choose a reason for hiding this comment

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

@giuspugl Is this definition of the pointing weights consistent with what Davide used for the LB simulations?

Copy link
Member

@keskitalo keskitalo left a comment

Choose a reason for hiding this comment

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

Looks good. Please review the suggestions and merge away.

@tskisner
Copy link
Member Author

tskisner commented May 6, 2020

I added the check for the buffer length, and explicit reset of hwpang to None in the except clause. I am going to leave it as a generic except for now, since cleaning that up would require changing code that will soon be deprecated.

@keskitalo
Copy link
Member

Great!

Rather than always passing an array of zeros if there is no HWP,
support passing None value to the underlying C++ code.  Fix an
error in the docstring.  Add a unit test to verify that no HWP
and HWP angles of all zero give matching results.
@tskisner
Copy link
Member Author

tskisner commented May 6, 2020

This has been rebased after #341. Merging now.

@tskisner tskisner merged commit 2a24945 into master May 6, 2020
@tskisner tskisner deleted the pointing_interface branch May 6, 2020 22:01
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