Skip to content

Adding awareness of OSS version values#419

Merged
york-stsci merged 10 commits into
mainfrom
full_oss_version
Apr 17, 2026
Merged

Adding awareness of OSS version values#419
york-stsci merged 10 commits into
mainfrom
full_oss_version

Conversation

@york-stsci
Copy link
Copy Markdown
Collaborator

This is the start of work on handling different OSS version values for single apertures, and applying those values appropriately based on input values.

Currently this version adds two files to the source_data directory.

  • make_data_table.py: holds information about OSS version, and generates an astropy table
  • OSS_VERSION_TABLE.txt: the resultant table.

This code includes adding a read function to read in the table, adding filtering functions to select the appropriate table row (in the generate_[instrument].py files), and adding logic to the write functions to loop through adding rows if there are multiple OSS versions for a single aperture at the write stage.

Currently it does not handle nircam cases with the same aperture but different DCCName values, if only because the current code, itself, does not handle those cases.

@york-stsci york-stsci self-assigned this Apr 14, 2026
@york-stsci york-stsci marked this pull request as draft April 14, 2026 19:30
@york-stsci york-stsci marked this pull request as ready for review April 16, 2026 15:14
Copy link
Copy Markdown

@BradleySappington BradleySappington left a comment

Choose a reason for hiding this comment

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

Please utilize pysiaf/utils/tools.py and add a single method to fill aperture.OSS_Version
that can be referenced from all of these places.

@york-stsci
Copy link
Copy Markdown
Collaborator Author

Function added. I can't abstract more than this because the different output formats handle things very differently.

@BradleySappington
Copy link
Copy Markdown

Discussion moved to slack/in-person for clarity

@york-stsci
Copy link
Copy Markdown
Collaborator Author

Code change made.

I have also confirmed with @Witchblade101 that when he runs the code he also gets identical results to his hand-made correct files.

Copy link
Copy Markdown

@BradleySappington BradleySappington left a comment

Choose a reason for hiding this comment

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

A few more small adjustments then I think you're good to go!

Comment thread pysiaf/iando/read.py
Comment thread pysiaf/iando/read.py Outdated
Comment thread pysiaf/source_data/make_data_table.py Outdated
Comment thread pysiaf/tests/test_oss_version.py
@Witchblade101
Copy link
Copy Markdown
Collaborator

My only further request is that we shouldn't generate csv files by default. Once were done with testing revert that back to just XML and Excel.

@york-stsci
Copy link
Copy Markdown
Collaborator Author

@Witchblade101 I've added argparse to the generate scripts, and set the default to be emulate_delivery=True, and file_formats="xml,xlsx", so if you run the script with no arguments you'll get exactly what you used to get, but you can also now set formats and emulate by using the command line, and use "--help" to see the available arguments.

@york-stsci york-stsci merged commit 41c94c3 into main Apr 17, 2026
10 checks passed
@york-stsci york-stsci deleted the full_oss_version branch April 17, 2026 20:25
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