Repository navigation
fix(obslist): read observing-list designations with the catalog import's parser - #693
Merged
Merged
Conversation
…t's parser Fault 6 of mrosseel's review on #670: the observing-list lookup had its own parser, so "H 24" (a double star) resolved to Herschel 400 #24, "Cr 399" resolved to nothing and "Collinder 399" resolved to a Lyngå object. - Move parse_designation, CATALOG_CODE_ALIASES and listing_named into the runtime-safe PiFinder/designations.py; catalog_import_utils re-exports them. - obslist_formats reads every designation (and CSV/NexTour catalog columns) through parse_designation, so ObsListEntry.catalog_code is always a PiFinder catalog code. The native format's key stays an exact lookup. - obslist resolves SkySafari catalog numbers with listing_named; the CATALOG_ALIASES and SKYSAFARI_CATALOG_NAMES maps are gone. - The name lookup (#673's _name_key) keeps its cases ("M 2-9" is not M 29, "NGC 0497" is NGC 497) but refuses a bare A/B/H designation (is_ambiguous_designation), which sources use for different objects. - Catalog CONTEXT.md and the obslist-formats README describe the shared parser. Refs #670, #673. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hat read back PiFinder saves observing lists as SkySafari files with "<code> <seq>". The shared parser refuses a bare "H 24" or "B 33" (double stars in SAC and WDS), so a saved list would lose those objects' catalog identity on reload. write_skylist now writes designations.designation(): "Herschel 24" and "Barnard 33"; other catalogs are unchanged. WDS has no readable designation and still saves by name. Refs #670. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
brickbots
added a commit
that referenced
this pull request
Nov 10, 2026
Brings in #691 (Hipparcos values, IAU WGSN names), #692 (star matching on independent evidence) and #693 (designations.py). No textual conflicts: catalog_import_utils.py, test_catalog_corrections.py and docs/ax/catalog.md merged cleanly. Refs #670 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When you load an observing list, PiFinder finds each object in its catalog.
Before this change, some names found the wrong object or no object.
"H 24" found a Herschel 400 galaxy, but in a double-star list it is a double star.
"Cr 399" found nothing, and "Collinder 399" found a different cluster entry.
Now PiFinder reads each name the same way as when it builds its catalog.
If PiFinder cannot be sure which object a name means, it uses the coordinates in the list, or skips the entry.
This fixes fault 6 of mrosseel's review on #670. Thank you, @mrosseel, for the review and the test cases.
What changes for a user
H 24h 99B 33Barnard 33Cr 399Collinder 399Col 399H 24, read back as Herschel 400 #24Herschel 24, read back as Herschel 400 #24M 2-9NGC 0497Sh2-155A rule from the catalog work applies here too: a name must find the correct object whenever it finds one. A name that finds nothing is acceptable. A name that finds the wrong object is not.
Three parsers before, one now
parse_designation(catalog import)H,AorB,WDS,PK, and compound numbers such asM 2-9.PiFinder/designations.pywithCATALOG_CODE_ALIASESandlisting_named.catalog_import_utilsre-exports all three, so import code and its tests do not change._parse_catalog_name(list formats) withresolve_object(lookup)CrtoCOL,CtoCALandCollindertoCr. None of these is a database code (Col,C), so Collinder numbers and Caldwell numbers never matched by catalog.H 24matched Herschel 400 #24._parse_catalog_nameasksparse_designation.resolve_objectreads each SkySafari catalog number withlisting_named. A CSVCatalogCodecolumn and a NexTour category go through the same parser. The alias mapsCATALOG_ALIASESandSKYSAFARI_CATALOG_NAMESare removed._name_key(name lookup, from #673)H 24,h 99andB 33, and 67 Lyngå entries with names such asCollinder 399.A,BorHprefix (designations.is_ambiguous_designation). #673's cases still hold:M 2-9is not M 29, andNGC 0497matches NGC 497.Details
ObsListEntry.catalog_codenow always holds a PiFinder catalog code or is empty. The readers fill it through the parser, never with a source spelling such asCr.The native
.pifinderformat stores PiFinder's own catalog key. Itscatalog_codeis looked up exactly, with no parsing, so{"catalog_code": "H", "sequence": 24}is still Herschel 400 #1 make POSS/SDSS Fov prettier #24.read_listnow calls one function,resolve_entry, for the catalog lookup. Two error-handling tests patch this function instead ofresolve_object.The SkySafari writer writes the PiFinder designation (
Col 399). The removed map never changed the output, because its keys (CAL,COL) never matched a PiFinder code.Abell 39now finds Abell planetary nebula 39. This is the import's alias (abell→Abl).Docs: the Resolution entry in
docs/ax/catalog/CONTEXT.mdand the CSV section ofdocs/ax/catalog/obslist-formats/README.mdnow describe the shared parser.PiFinder saves observing lists as SkySafari files. Before, it wrote
H 24andB 33for Herschel 400 and Barnard objects. The parser refuses those, so a saved list would lose these objects' catalog identity when you load it again. The writer now writes a designation that the parser reads back to the same object:Herschel 24andBarnard 33(newdesignations.designation). Other catalogs are written as before (NGC 224,Col 399). WDS objects have no readable designation, so they still save by name and load from their coordinates.Lists saved before this change. A SkySafari list that PiFinder saved earlier holds
H 24orB 33for those objects. Such an entry now loads from its coordinates: the position stays, but the entry is not linked to the Herschel 400 or Barnard object. Save the list again to fix it.Not in this change
STF,STT). Refusing them is a separate change.Collinder Nname but are not merged with the Collinder entry. fix(catalog-import): Lyngå's "Collinder nnn" joins Collinder, Harris's "Arp 2" is a common name #680 joins them at import, so the PR 7 database rebuild removes them.Tests
tests/test_obslist_designations.py: each case in the table above, in plain text, SkySafari, CSV and native lists; the ambiguity check; the save round trip for Herschel 400 and Barnard objects; the re-export; and a check thatdesignations.pyimports only the standard library.Refs #670, #673.
🤖 Generated with Claude Code