Skip to content

Update catcodes, obscodes with program codes#98

Open
ben-cassese wants to merge 3 commits into
IAU-ADES:masterfrom
ben-cassese:update_catcodes_obscodes
Open

Update catcodes, obscodes with program codes#98
ben-cassese wants to merge 3 commits into
IAU-ADES:masterfrom
ben-cassese:update_catcodes_obscodes

Conversation

@ben-cassese

Copy link
Copy Markdown

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.

@ben-cassese

Copy link
Copy Markdown
Author

@federicaspoto and @stevenstetzler, if you could take a look at this quick update to some hard-coded lists, that'd be great!

@federicaspoto

Copy link
Copy Markdown
Contributor

@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 astrometric catalogs, which means we are now using other symbols. I don't expect it to break anyone codes. This PR should also close at least one open Issue and maybe a few Jira tickets on our side.

@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!
Federica

@stevechesley stevechesley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Bill-Gray added a commit to Bill-Gray/lunar that referenced this pull request May 7, 2026
Comment thread Python/ades/packUtil.py

# 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 = \

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@Bill-Gray Bill-Gray May 9, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

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.

6 participants