Skip to content

feat(catalogs): add the Perek-Kohoutek planetary nebula catalog - #34

Closed
mrosseel wants to merge 3 commits into
nixosfrom
pk-catalog
Closed

mrosseel wants to merge 3 commits into
nixosfrom
pk-catalog

Conversation

@mrosseel

Copy link
Copy Markdown
Owner

Adds catalog code PK: the 1510 galactic planetary nebulae of Kohoutek's 2001 revision of Perek-Kohoutek 1967.

Decisions and evidence are in docs/adr/0024-perek-kohoutek-catalog.md; data provenance is in astro_data/perek_kohoutek/PROVENANCE.md.

Source

VizieR IV/24 (Kohoutek 2001), the direct successor to CGPN 1967. table2 supplies the 1510 rows, table4 arcsecond positions; V/84 (Acker+ 1992) supplies sizes and cross-identifications; SIMBAD supplies positions and cross-IDs. All vendored under astro_data/perek_kohoutek/ with a fetch_sources.sh that regenerates the snapshot.

Two secondary transcriptions circulate among amateurs — an astronomy.com PDF and a spreadsheet linked from a Google Sites page. Both are reprints of the same Kohoutek 2001 data with the PN G designation, flags and notes stripped and en-dashes substituted for hyphens, so neither is imported. They were used as an independent check instead: all 1510 PK designations and all 1510 other-designations match table2.dat exactly. The check also found the spreadsheet drops a declination sign at row 551, putting that object 88 degrees out.

Epoch

No precession runs in the loader. Every position used is already J2000, and each refined position must agree with the catalogue's own coarse position within 5 arcmin. That guard rejected a four-degree typo in table4 (the equinox-2000 row for Vy 1-4 reads -02 26 where its five sibling rows and SIMBAD read -06 26). Final split: 1399 SIMBAD, 111 table4. Median SIMBAD-to-table4 agreement is 0.04 arcmin, so no B1950 leaked in.

Sequence and magnitude

The Sequence is the printed catalogue's 1-1510 running number, not the PK designation, which is not an integer. So PK 743 is a position in the list; the real designation is stored as a name in both spellings (PK 036+17.1 and PK 036+17 1) and is searchable. Encoding the designation as an integer was rejected: it yields 8-digit sequences, unreadable on a 128px display and impractical by keypad.

No PK source carries a magnitude, so entries are built with an empty one. The 211 entries that resolve to an existing NGC, IC, Messier, Abell or Sharpless object inherit its magnitude and size; the rest fall out of any magnitude filter via UNKNOWN_MAG. 197 entries end up with a real magnitude, 1037 with a size.

Alias matching had to be fixed first

ObjectFinder resolved aliases through ui_utils.normalize(), which strips spaces and hyphens, so any compound numeric part collapsed into a plausible but wrong sequence number. Checked against the shipped database, feeding it this catalogue's name column produced 147 matches, 145 of them false:

Alias normalize() Bound to
M 1-1, M 2-9, M 3-1 (Minkowski) m11, m29, m31 Messier 11, 29, 31
H 1-1, H 3-29 (Haro) h11, h329 Herschel 400 #11, brickbots#329
NGC 650-1 (M76) ngc6501 NGC 6501
Sh 2-176 sh2176 Sharpless 176 — correct

188 of the 1510 names begin M , and every one is Minkowski, not Messier. Left alone, 145 planetary nebulae would have silently displayed Messier and Herschel objects' positions and magnitudes.

catalog_import_utils now carries CATALOG_CODE_ALIASES and parse_designation(), which require an explicitly allowlisted prefix and a bare integer sequence, so a compound designation never reaches hyphen-stripping. This is in the shared util rather than the loader because the defect affects every catalog.

Two knock-on effects, both improvements:

  • post_processing has always listed "Cr 42" among M45's aka names so the Pleiades resolve to one object, but Cr was never mapped to Colthe database shipped two separate Pleiades objects. Now one, listed as both M 45 and Col 42.
  • Two false links in SAC Multistars disappear (2160 -> 2162 distinct objects).

Three data errors this exposed

PK carries independent positions, so every cross-link also checks the catalog it links to. Of 211 links, 6 disagreed by more than 5 arcmin, each tracing to a real defect. All are fixed here, in separate commits so they can be split out:

  1. load_sharpless never precessed declination — it computed j_dec_deg then passed the unconverted dec_deg. All 313 Sharpless objects sat 0.26 to 0.37 degrees off, exactly the 1950-to-2000 shift.
  2. abell.tsv row 47 lost its declination sign. Abell 47 is at -00 13 51. Serpens spans the equator, so nothing else caught it.
  3. abell.tsv had the ngc6742 alias on row 51. NGC 6742 matches row 50 to 0.1 arcmin and is 66 degrees from row 51; V/84 independently gives A 50 as NGC 6742.

After the fixes, 2 of 211 links still disagree — Sh2 176 by 6 arcmin and Sh2 216 by 17. Both are large diffuse nebulae (Sh2 216 spans ~1.6 degrees) where catalogues place the centre differently. Not errors.

The remaining abell.tsv aliases were audited positionally: IC 972, NGC 6742, NGC 7076 and IC 1454 all agree within 0.12 arcmin.

Verification

  • ruff check, ruff format --check, mypy all clean.
  • 1167 unit tests and 5 smoke tests pass. New tests/test_designation_parsing.py covers the alias regression; test_catalog_data.py gains PK counts, PK/NGC/Abell/Sharpless linkage assertions, Minkowski-is-not-Messier assertions, and a Pleiades-is-one-object assertion.
  • Runtime check through CatalogBuilder: PK loads 1510 objects, PK 2 shares its sky object with NGC 40, PK 18 (M 1-1) is correctly not Messier 11, and text search finds both NGC 7009 and 036+17.

Not verified on device. This branch has no cedar-detect-server binary in bin/, so the app could not be launched here; verification was done at the Catalogs layer. Worth an on-device pass of Objects > DSO... and Filters > Catalogs.

Note on the menu label

The entry is labelled "PK Planetary". "Perek-Kohoutek" is 14 characters against an established 12-character maximum on the 128px display. Easy to change if you prefer something else.

🤖 Generated with Claude Code

load_sharpless computed j_dec_deg from b1950_to_j2000() and then passed the
unconverted dec_deg to NewCatalogObject, so only right ascension was
precessed. All 313 Sharpless objects sat 0.26 to 0.37 degrees off in
declination, which is exactly the 1950-to-2000 shift at those coordinates.

Found by cross-checking against the Perek-Kohoutek catalogue, which lists
several of the same nebulae with independent J2000 positions.
abell.tsv carried the ngc6742 alias on row 51. NGC 6742 matches row 50 to
0.1 arcmin and is 66 degrees from row 51, and the Strasbourg-ESO catalogue
independently gives A 50, not A 51, as NGC 6742. The misplaced alias bound
the Abell 51 listing onto NGC 6742's sky object.

Row 47 had lost its declination sign. Abell 47 is at -00 13 51 per SIMBAD
and Kohoutek 2001. Its constellation, Serpens, spans the celestial equator,
so nothing else caught it.

The two remaining aliases were audited positionally: IC 972, NGC 7076 and
IC 1454 all agree within 0.12 arcmin.
Adds catalog code PK: the 1510 galactic planetary nebulae of Kohoutek's
2001 revision of Perek-Kohoutek 1967, from VizieR IV/24. Positions come
from SIMBAD or IV/24 table4, sizes and cross-identifications from V/84.
Sources are vendored under astro_data/perek_kohoutek/ with PROVENANCE.md
and a fetch script; decisions are in docs/adr/0024.

No precession runs here. Every position used is already J2000, and each
refined position must agree with the catalogue's own coarse position
within 5 arcmin, which rejects a four-degree typo in IV/24 table4.

The sequence is the printed catalogue's 1-1510 running number, so "PK 743"
is a list position, not a designation; the real designation is stored as a
name in both spellings. No PK source carries a magnitude, so entries are
built with an empty one: the 211 that resolve to an existing NGC, IC,
Messier, Abell or Sharpless object inherit its magnitude, and the rest fall
out of any magnitude filter via UNKNOWN_MAG.

Alias matching had to be fixed first. ObjectFinder resolved aliases through
ui_utils.normalize(), which strips spaces and hyphens, so any compound
numeric part collapsed into a wrong sequence number. Feeding it this
catalogue's name column produced 147 matches, 145 of them false - 188 of
those names are Minkowski planetary nebulae ("M 1-92"), not Messier
objects, and "H 3-29" is Haro, not Herschel 329. catalog_import_utils now
carries CATALOG_CODE_ALIASES and parse_designation(), which require an
explicitly allowlisted prefix and a bare integer sequence, so a compound
designation never reaches hyphen-stripping.

That fix also makes an existing intent work: post_processing lists "Cr 42"
among M45's aka names so the Pleiades resolve to one object, but Cr had
never been mapped to Col, so the database shipped two Pleiades. It also
removes two false links in SAC Multistars.

Verified against the published 1510-row list transcribed on astronomy.com
and in a widely circulated spreadsheet: all 1510 PK designations and all
1510 other-designations match exactly. That check also found the
spreadsheet drops a declination sign at row 551.
@mrosseel mrosseel added the testable Builds the PR and publishes it to the unstable update channel label Aug 15, 2026
@mrosseel

Copy link
Copy Markdown
Owner Author

Retargeted to brickbots#617 (base main, labeled testable).

Builds for a fork PR publish to the manifest of the repo running the workflow. Devices read brickbots/PiFinder@nixos-manifest (software.py:38, device.nix:158), so a PR on this fork stamps a manifest no device reads and never reaches hardware. Same head branch, mrosseel:pk-catalog.

@mrosseel mrosseel closed this Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testable Builds the PR and publishes it to the unstable update channel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant