Update catcodes, obscodes with program codes#98
Conversation
Co-authored-by: Copilot <copilot@github.com>
|
@federicaspoto and @stevenstetzler, if you could take a look at this quick update to some hard-coded lists, that'd be great! |
|
@ben-cassese thank you for working on this. @stevechesley you might want to have a look at this real quickly. Ben has been working on ADES and obs consistencies. FYI: Note that we ran out of numbers for the @stevechesley and @stevenstetzler , I've been working with Ben on this and it looks good to me. It would be better if one of you could check this PR. Thanks! |
stevechesley
left a comment
There was a problem hiding this comment.
Thanks! This looks entirely reasonable. A bit irksome that this need to be regularly maintained, but I guess we'll need to do it as long as this repo is supporting obs80 conversions.
|
|
||
| # Updated 25-Apr-2024 based on https://www.minorplanetcenter.net/iau/lists/ProgramCodes.txt | ||
| # Updated 30-Apr-2026 based on MPC's obscodes table | ||
| programCodeSites = \ |
There was a problem hiding this comment.
I do not enjoy that this list is hard-coded into here... Maybe in the near future, we should add the has_prog_code column of the obscodes table to the public replication, so that the obscodes API (https://docs.minorplanetcenter.net/mpc-ops-docs/apis/obscodes/#response-fields-json-format) could be used to figure out the most up to date list of obscodes that use program codes.
There was a problem hiding this comment.
I don't like it either, but a decision was made early on, at the request of some observers, that the ADES tools should not rely on a network connection.
Maybe that is so 2015 and it should be revisited. In that case the validator could also check the MPC-maintained list for mode, notes, astCat, etc.
There was a problem hiding this comment.
Relying on a network connection remains iffy for those in remote locations. But it should be acceptable to require that you have files listing modes, notes, etc. present when you run the tools, and to point out that you'll have to update those files every now and then if you use the latest and greatest modes, notes, etc.
There was a problem hiding this comment.
I'm also not a fan of the hard-coded lists. Perhaps a hybrid approach can be taken where the list of allowable values for program codes (and others) are stored in a data file that is distributed with this code. We can then populate the data file with the MPC APIs at build-time and release it along with the code in our PyPI versioned releases.
There was a problem hiding this comment.
I talked to Mike about this and we also had an internal discussion with Peter W about the possibility of changing the hard-coded list to something more API-driven. At the moment, Peter, even though not a fan of the hard-coded lists, would prefer to maintain the code as it is. We might want to revisit it in the future. Thank you all.
This updates the hard-coded list of known reference star catalogs and the list of observatories that use program codes. No functionality changes: just additions to the lists themselves. The new catalogs will appear on the MPC's documentation shortly.