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

fix(beam): properly re-center HA grid after unwrapping long transits #272

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sareda26
Copy link
Contributor

Fixes an issue where the HA coordinate of very long transits (~180 degrees) would not be properly re-centered about HA=0, causing the holography regridder (ch_pipeline.analysis.beam.TransitRegridder) to silently fail, returning a stream of 0s in the output. See the attached plot for an example of the old and new behavior for a long transit of Tau A (RA ~ 83) which wraps at 360 degrees.

image

@sareda26 sareda26 requested review from ssiegelx and ljgray August 19, 2024 20:30
@@ -1278,9 +1278,9 @@ def unwrap_lha(lsa, src_ra):
lsa += start_lsa
# subtract source RA
return np.where(
np.abs(lsa - src_ra) < np.abs(lsa - src_ra + 360.0),
np.abs(lsa - src_ra) < np.abs(lsa - (src_ra + 360.0)),
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think that the brackets here are actually necessary

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.

3 participants