Skip to content

feat(object-list): open name catalogs in the names view, with real names first - #696

Merged
brickbots merged 2 commits into
mainfrom
feat/object-list-display-names
Nov 10, 2026
Merged

brickbots merged 2 commits into
mainfrom
feat/object-list-display-names

Conversation

@brickbots

Copy link
Copy Markdown
Owner

Each row of the object list has a second column. You press SQUARE to change what this column shows: the push-to distance, the object names, or the magnitude and size. Before this change, every list opened with the push-to distance. In a list of planets or stars, the rows then showed only a code and a number, such as "SaR233" or "WDS62246". The observer had to press SQUARE to see "RX Peg" or "Mars".

With this change, a list of planets, comets, stars, double stars, asterisms or variable stars opens with the names shown. The other lists open as before. SQUARE works as before.

The names view now also shows real names before catalog numbers. For example, SaM 26 showed "SaM 25, Mu And, h 1057". It now shows "Mu And, h 1057", and the catalog numbers come after. This applies to every list.

Default display mode per catalog

Catalog Opens with Reason
PL (planets), CM (comets) Names The number is only a position in the list.
Str, Nam (named stars) Names Observers know these stars by name (Algol, Nunki).
SaA (SAC asterisms) Names Asterisms have names (Winter Triangle).
SaR (SAC red stars), TLK (variable stars) Names Observers know these stars by name or variable-star designation (RX Peg, SU And).
SaM (SAC doubles), RDS (RASC doubles), WDS Names Observers know double stars by name or discoverer designation (STT 514, STF 3056).
M, NGC, IC, C, Col, Sh2, H, B, Abl, Arp, Ta2, Har, EGC, Lyn Push-to distance (no change) The designation is the name observers use (M 31, NGC 7000).
Mixed lists (All Filtered, Recent, observing lists, name search) Push-to distance (no change) Each row can come from a different catalog.

Nam is the named-stars catalog from #695. That PR is not merged yet. The code is in the list so that the catalog opens with names when it arrives.

Detail

  • The object list already has three display modes: LOCATE (push-to distance), NAME (names) and INFO (magnitude and size). This PR adds only a default start mode for each catalog. It adds no new control.

  • The defaults are one registry in code: NAME_MODE_CATALOGS in catalogs.py. Each Catalog gives its default as Catalog.default_display_mode. PlanetCatalog and CometCatalog get it from Catalog.

  • The registry is in code, not in a database column as Add catalog attribute to track which names should be used in object list #408 suggests. There are two reasons. The planet and comet catalogs are made at run time and are not in the database. A new column also needs a database rebuild.

  • UIObjectList starts in the default mode when it opens a list of one catalog. It moves the mode cycle forward to that mode. Thus SQUARE goes on to the next mode in the usual order: NAME, INFO, LOCATE, NAME.

  • NAME mode orders the names in three groups. The order inside each group stays as in the names table:

    1. real names: every name not in group 2 or 3 ("Mu And", "h 1057", "HD 208526", "STT 514", "Winter Triangle");
    2. PiFinder catalog designations: names that designations.parse_designation reads as a PiFinder listing, and PiFinder's WDS listing form ("SaM 25", "Str 12", "M15", "WDS 4631");
    3. WDS coordinate designations ("WDS J00568+3830").

    No name is removed. The row's own designation is left out, as before. The order applies in every list, also to code-first catalogs and mixed lists.

  • These do not change: the first column of each row, the LOCATE and INFO text, sorting, jump to number, search, the web interface and the API.

  • The PiFinder does not remember the last mode that you chose for a catalog. Each list opens in its default mode.

  • The user guide's object list section names the catalogs that open with names.

NAME-mode text before and after the order change

Rows whose NAME text starts with a designation, before / after:

Catalog Committed database New database (with #691 and #692)
Str 0 / 0 of 78 1 / 0 of 78
SaA 0 / 0 of 114 0 / 0 of 114
SaR 1 / 0 of 333 16 / 0 of 333
TLK 0 / 0 of 93 26 / 0 of 93
SaM 17 / 0 of 2162 210 / 0 of 2157
RDS 0 / 0 of 110 64 / 0 of 110
WDS 131303 / 6 of 131303 130950 / 6 of 131303

The 6 WDS rows that remain (WDS 15284, 19566, 19662, 19696, 19773, 19830) have only one name that is not a WDS form: "SAR 1" to "SAR 7". SAR is a WDS discoverer code, but parse_designation reads it as SaR, the SAC red stars catalog. These names are the only real names on these rows, so they come first in any case. The text is correct, but the count treats these names as designations.

Examples on the new database:

Object NAME text
SaM 26 Mu And, h 1057, CIA 50, HJ 1057, SaM 25, SaM 27, WDS 4631, WDS J00568+3830
WDS 62246 CVR 117, WDS J11246+2024
TLK 69 Algol, Beta Persei, Beta Per, Prototypical Eclipsing Binary, SAO 38592, CSI 1, LAB 2, BU 526, DAL 46, JNN 3, Str 12, WDS 13962, WDS J03082+4057

Tests

tests/test_object_list_display_mode.py:

  • the registry, and that the planet and comet catalogs use it;
  • each names catalog opens in NAME mode, and the deep-sky catalogs open in LOCATE mode;
  • a comet list opens in NAME mode before the comet catalog exists;
  • SQUARE cycles correctly from a NAME start and from a LOCATE start;
  • mixed lists open in LOCATE mode;
  • the three name groups, the order inside each group, and the SaM 26 and WDS 62246 examples above.

nox lint, format, type_hints, smoke_tests and unit_tests pass. The object list cases of tests/test_ui_modules.py (integration) also pass.

Screenshots (128 px)

In .claude/catalog-work/listnames/:

  • list_PL_128.png: Planets, NAME mode ("MER Mercury").
  • list_Str_128.png, list_SaM_128.png, list_SaR_128.png, list_WDS_128.png: NAME mode.
  • list_WDS_after_square_128.png: the WDS list after one SQUARE, INFO mode.
  • list_NGC_128.png: NGC, LOCATE mode, as before.
  • SaM_after_order_128.png, SaR_after_order_128.png, WDS_after_order_128.png: NAME mode after the order change. The WDS rows now start with the discoverer designation ("ES 2543, WDS J…").

Issues

Closes #408.
Closes #318: the planet list now opens with the planet names shown.

Related to #661: the SaM and RDS lists now open with the other names of each star in the row. These include the discoverer designation: "STT 514" for SaM 1, "HD 21700, STFA 7" for RDS 1. This can close #661, but this PR does not close it.

🤖 Generated with Claude Code

brickbots and others added 2 commits November 9, 2026 21:50
A list of one catalog now opens in that catalog's default display mode.
Planets, comets and the star, double star, asterism and variable star
catalogs (PL, CM, Str, Nam, SaA, SaR, TLK, SaM, RDS, WDS) open in NAME
mode, so the list shows object names next to each row. All other
catalogs, and lists that mix catalogs, open in LOCATE mode as before.
SQUARE cycles on from the start mode in the usual order.

The registry is NAME_MODE_CATALOGS in catalogs.py, exposed as
Catalog.default_display_mode. It is in code, not in objects.db, because
planets and comets are built at run time.

Refs #408

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The names table often puts a designation before the object's name: SaM 26
has "SaM 25, Mu And, h 1057, ...", and every WDS row starts with its
"WDS J..." coordinate designation. NAME mode now orders the names in three
groups: real names, then PiFinder catalog designations (what
parse_designation reads, and "WDS 4631"), then WDS coordinate designations.
The order inside each group is kept. Nothing is removed except the row's
own designation, as before.

Refs #408

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@brickbots
brickbots merged commit 0573881 into main Nov 10, 2026
4 checks passed
Zhuohang-Shen pushed a commit to Zhuohang-Shen/PiFinder that referenced this pull request Nov 15, 2026
Brings in 24 commits of brickbots main: the catalog import fixes
(brickbots#671 to brickbots#694), the Named Stars catalog (brickbots#695), the names view of the
object list (brickbots#696), the Pi OS side of the migration (brickbots#657), the release
workflow (brickbots#658), the OLED SPI clock (brickbots#701) and CI changes.

Conflicts and their resolution:
- Pi OS migration files (migration_gate.json, migration_progress,
  migration_progress.c, nixos_migration_calc.py): nixos keeps them
  deleted. They belong to the Pi OS line.
- noxfile.py, requirements_dev.txt: nixos keeps them deleted. The flake
  dev shell and uv2nix replace them.
- ui/software.py, tests/test_software.py, sys_utils.py, main.py: nixos
  keeps its own software screen. Its keep_awake and on_battery are the
  same feature as upstream's. The migration UI stays out of nixos.
- catalog_imports: upstream's code. The parser moved to designations.py,
  so the local copy of parse_designation goes. The Perek-Kohoutek loader
  stays and runs before the Named Stars loader.
- catalogs.py: upstream's NAME_MODE_CATALOGS. The T9 tables stay in
  catalog_arrays.py.
- object_details.py: upstream's listing index (brickbots#678), with a search on
  the listing_key column for an ObjectSequence.
- obslist.py and its tests: the name index of nixos (resolvers) with
  upstream's ambiguous designation check.
- tests/test_ui_modules.py: upstream's comet retry stub, the catalog
  build of nixos (no background loader).
- docs/ax/catalog.md, CONTEXT.md: text of both sides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Zhuohang-Shen pushed a commit to Zhuohang-Shen/PiFinder that referenced this pull request Nov 15, 2026
Brings the merge of brickbots main into observable-asteroids into
satellites.

Conflicts and their resolution:
- ui/object_list.py: the imports of both sides, one import of
  CatalogState. The names view of upstream (brickbots#696) and the satellite
  status texts both stay.
- docs/source/menu_map.rst: the Stars text of upstream (every IAU-named
  star) and the Small bodies and Satellites texts of this branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
brickbots added a commit that referenced this pull request Nov 19, 2026
…xes (#670) — squash-merge only (#697)

* fix(catalog-corrections): NGC 771 is the star 50 Cas, Named Stars' Gang

Corwin's NGC notes: "NGC 771 = 50 Cassiopeiae is a star" (an A1 V star,
no nebulosity on the POSS1). 50 Cas is HIP 9598, IAU name Gang, which
#695 lists as Nam 9598. The listing joins that star; the match guard
accepts the join (both type *, 0.04' apart).

Refs #670

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* data(catalog): rebuild pifinder_objects.db with the catalog-audit fixes

The one rebuild for the catalog-audit campaign. It carries the import,
loader, star-identity and correction changes of #671 to #696, and the
NGC 771 correction before it. Built from a fresh file with
`python -m PiFinder.catalog_imports.main`; two builds with different
PYTHONHASHSEED values are byte-identical:

sha256 03b6bcb3288b1a2909e4fedb49559f46517c7bf4e3f13ad097f848f2c5ad670e

All 225 corrections apply (70 of them hip identifications).

Refs #670

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(catalog-data): assert the rebuilt database and the campaign's main fixes

test_catalog_data.py reads the committed database, so its assertions
land with the rebuild: 22 catalogs, EGC 102, SaM 2157 (rejected pairs
skipped), Nam 578, and IC 1805 typed C+N (Trumpler "n", #676).

New assertions, each read from the rebuilt file: the M 82 and M 57
preferred names; a not-found NGC object's description; Mizar as one D*
sky object with its Str, SaM, WDS and Nam listings and the double-star
filter magnitude; Vega's V 0.03 and Hipparcos position; SaM 1019 on
HIP 44804; IC 2145 joined to NGC 2086, NGC 771 to Nam 9598, and Gumala
one object (WDS 99456 + Nam 94645); Dhanuśarāgra with its diacritics.

docs/ax/catalog.md §9: the status note goes, since the committed
database now matches the import §9 describes. Its code map and the
ADR 0046 link stay, as a plain paragraph. The compressed size is
about 24 MB.

Refs #670

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(catalog-import): read Collinder's two name columns, not their raw text

load_collinder added the raw text of collinder.txt's "NGC/Other Cat." column
and of collinder2.txt's "Other names" column as names. "581 (M103)" stayed a
plain name, so Col 14 was a second sky object 0.1' from M 103, and Col 399
carried "4-5 Vul." and the one name "Al Sufi's Cluster, Brocchi's Cluster,
Coathanger".

The loader now reads both columns (collinder_names):

- a designation is written out: "581 (M103)" is "NGC 581" and "M 103",
  "IC1848" is "IC 1848", "Tr.9" is "Trumpler 9". 29 Collinder listings now
  join the Messier, NGC or IC object that Collinder names (26 Messier
  clusters, Col 334 = NGC 6374, Col 382 = IC 4725, Col 26 = IC 1805);
- "(incorrectly) 3247" gives no name, so Col 220 can never join NGC 3247;
- "nl", the star numbers "4-5 Vul." and "9-12 Gem", and notes in
  parentheses ("(PMC)", "(Mel 72 per A/H)") are no names;
- "2384a" is the name "NGC 2384a", which joins nothing;
- a comma list is separate names, and a name is listed once.

The IC 2602 correction removed "Theta Carinae Cluster, Southern Pleiades".
The loader now splits that list, so the correction is deleted.

Refs #670

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* data(catalog): rebuild pifinder_objects.db with the Collinder name fix

A fresh-file build of this branch (the database was deleted first), after the
Collinder loader fix. Two builds with PYTHONHASHSEED=1 and 4242 are
byte-identical:

sha256 c3cdb493338f57a4c01d8d69b4170039b8dffedf991b4b93ce73ed961dad861d

The import loads and applies all 224 corrections.

Against the first rebuild of this branch (ead7120, sha256 03b6bcb3...):
146,631 -> 146,602 sky objects, because 29 Collinder listings now share the
Messier, NGC or IC object that Collinder names. The 151,754 catalog listings
are the same. No other join changed.

This replaces ead7120's database. Squash-merge the pull request, so that
only this version of the file lands on main.

Refs #670

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(catalog-data): assert the Collinder name fix in the rebuilt database

Col 399 has "Al Sufi's Cluster", "Brocchi's Cluster" and "Coathanger" as
three names, and no "4-5 Vul.". Col 14, 189, 382, 26 and 334 share the
Messier, NGC or IC object that Collinder names; M 44 keeps "Beehive Cluster"
first, and IC 1805 keeps its type C+N. Col 220 is not NGC 3247, and Col 142
("NGC 2384a") is not NGC 2384. No Collinder name holds raw column text.

Refs #670

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(release-notes): the 2.6.4 catalog changes, as an appendix the release notes link to

Refs #670

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(catalog-import): every WDS pair is a double star unless WDS marks it dubious

The D* rule's WDS clause now types a WDS listing D* if any of its pairs
has a companion magnitude and is not noted X (dubious). Optical pairs
(S, U, Y, L), pairs without the primary (BC), and pairs of any
separation or magnitude difference count. The type says what the
object is; visibility is for the filters (a double filters by its
brighter star) and for the separation and magnitudes the entry shows.
This follows mrosseel's review of #697. The old limits (0.5-60",
5 mag, primary only, no optical flags) typed 40,788 of 131,303 WDS
listings single; the new rule types 10,597 single.

The Vega (SaM 1241) and Fomalhaut (SaM 1633) obj_type corrections are
deleted: they undid the old rule for optical/wide companions, and both
stars are now D* by WDS, as SAC lists them. zeta Scl's (SaM 1745, only
pair X-flagged) agrees with the new rule and stays. 222 corrections.

The type still affects no match: the match guard treats * and D* alike
(is_star_type), and the star identity reads the type only to type the
merged star.

Refs #670

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* data(catalog): rebuild pifinder_objects.db with the WDS double-star rule

Every WDS pair is a double star unless WDS marks it dubious (X) or gives
no companion magnitude. Objects typed D*: 91,444 -> 121,232; WDS
listings D*: 90,916 -> 120,706. Only types change against the previous
build (c3cdb493...): 30,049 listings go from * to D*, no join, value,
name or image changes. 222 corrections apply clean.

Two fresh builds (PYTHONHASHSEED=1 and 4242) are byte-identical:
sha256 474d0331a5bfacebb90b2f2cfd08c1e1db1ca24ac18efc92459aedecf35a52c7

Refs #670

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(catalog-data): assert the WDS double-star rule in the rebuilt database

Atria (optical pair WFC 179) and Suhail (SEE 109, 12.6 mag fainter) are
D*; Arcturus (only pair HDS 2003, flagged X) is *; Vega is D*. WDS
listings by type: 120,706 D*, 10,597 *. The 2.6.4 catalog release note
gets a "Double stars follow WDS" bullet.

Refs #670

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant