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

Adding uvpspec objects re-orders polarizations #405

Open
jsdillon opened this issue Aug 21, 2024 · 1 comment
Open

Adding uvpspec objects re-orders polarizations #405

jsdillon opened this issue Aug 21, 2024 · 1 comment
Assignees

Comments

@jsdillon
Copy link
Member

I got an error trying to add together 3 or more uvpspec objects. When I add the first two together, it changes the order of polarizations, which then doesn't match the order in the 3rd object. This manifests in a AssertionError: scalar_array must be the same for all uvps given concatenation along blpairts. which presumably is a consequence of the scalar_array depending on the beam.

I found this by doing

print(uvps_time_avg[0].polpair_array)
print(uvps_time_avg[1].polpair_array)
print((uvps_time_avg[0] + uvps_time_avg[1]).polpair_array)

and got

[2424 2121 2323 2222]
[2424 2121 2323 2222]
[2121 2222 2323 2424]

which means that the order was pV, pI, pU, pQ before the sum and pI, pQ, pU, pV after.

The work around here is to just ensure that the UVData object going into power spectrum estimation has polarizations in numerical/alphabetical order. But this still feels like a bug to me.

@jsdillon
Copy link
Member Author

@philbull I brought this up in today's pspec meeting and @acliu told me to tag you.

jsdillon added a commit to HERA-Team/hera_notebook_templates that referenced this issue Aug 22, 2024
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

No branches or pull requests

2 participants