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 bug with pyvo output #947

Merged
merged 1 commit into from
May 6, 2022

Conversation

bhilbert4
Copy link
Collaborator

This PR corrects a bug in the output from pyvo in get_instrument_proposals() that was causing the app to crash.

@bhilbert4 bhilbert4 self-assigned this May 6, 2022
@pep8speaks
Copy link

Hello @bhilbert4, Thank you for submitting the Pull Request !

Line 52:34: E126 continuation line over-indented for hanging indent
Line 74:1: E402 module level import not at top of file
Line 75:1: E402 module level import not at top of file
Line 214:64: E226 missing whitespace around arithmetic operator
Line 974:17: W503 line break before binary operator
Line 975:17: W503 line break before binary operator
Line 976:17: W503 line break before binary operator
Line 977:17: W503 line break before binary operator
Line 1327:9: E722 do not use bare 'except'

If you have not done so, please consult the jwql Style Guide

@bhilbert4
Copy link
Collaborator Author

Would be good to bring this over to the test server and make sure there aren't any other problems. The test server seems to be down at the moment though, so I can try that tomorrow.

@bhilbert4 bhilbert4 changed the title [WIP]: Fix bug with pyvo output Fix bug with pyvo output May 6, 2022
@bhilbert4
Copy link
Collaborator Author

I just checked this on the test server and it works. @mfixstsci this is ready for review.

Copy link
Collaborator

@mfixstsci mfixstsci 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 @bhilbert4, just curious, what did the compressed() method do to the list? Is this a built-in to list objects?

@bhilbert4
Copy link
Collaborator Author

compressed() is a method of numpy masked arrays, which is what pyvo returns. Or I should say, it returns an astropy table where the column we are interested in contains a masked array. compressed() just returns all of the non-masked elements of the masked array.

@bhilbert4
Copy link
Collaborator Author

I had accidentally been calling compressed() twice before this fix.

@mfixstsci
Copy link
Collaborator

@bhilbert4 I noticed that it was done twice, I didn't know if there was some clever typecasting going on there. Thanks for the fix!

@mfixstsci mfixstsci merged commit dcb9b10 into spacetelescope:develop May 6, 2022
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.

None yet

3 participants