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

Get subarray lists from datamodels schema #1479

Merged

Conversation

bhilbert4
Copy link
Collaborator

@bhilbert4 bhilbert4 commented Feb 8, 2024

Resolves #1389

Rather than relying on manually provided subarray lists (which had been missing some entries), get subarray lists from the subarray schema file in the stdatamodels package. This ensures that all available subarrays will be present on the JWQL query page.

One downside to this is the way the schema file is read in. Since the instrument names are in commented lines in the schema file, the subarray lists are accessed through hard-coded indexing. If the order of the instruments' lists ever change in the schema file, we would need to update this code. That seems pretty unlikely though.

Local testing looks good.

@bhilbert4 bhilbert4 self-assigned this Feb 8, 2024
@pep8speaks
Copy link

pep8speaks commented Feb 8, 2024

Hello @bhilbert4, Thank you for updating !

Line 924:5: E123 closing bracket does not match indentation of opening bracket's line

Comment last updated at 2024-02-08 19:12:04 UTC

@bhilbert4
Copy link
Collaborator Author

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.

Thanks @bhilbert4 let's hope the schema doesn't change 🤞

@mfixstsci
Copy link
Collaborator

Just checked locally, subarrays are appearing for FGS and NIRSPEC:
Screen Shot 2024-02-08 at 3 23 37 PM
Screen Shot 2024-02-08 at 3 23 55 PM

@bhilbert4 If these look correct, I will merge.

@bhilbert4
Copy link
Collaborator Author

Those look right to me!
Here's the schema file: https://github.com/spacetelescope/stdatamodels/blob/main/src/stdatamodels/jwst/datamodels/schemas/subarray.schema.yaml

@mfixstsci mfixstsci merged commit ac0151e into spacetelescope:develop Feb 8, 2024
6 checks passed
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.

Add missing subarrrays to constants
3 participants