Skip to content

feat: multi-format observing list import with native .pifinder support#394

Draft
mrosseel wants to merge 8 commits intobrickbots:mainfrom
mrosseel:feature/skysafari-list
Draft

feat: multi-format observing list import with native .pifinder support#394
mrosseel wants to merge 8 commits intobrickbots:mainfrom
mrosseel:feature/skysafari-list

Conversation

@mrosseel
Copy link
Collaborator

@mrosseel mrosseel commented Mar 8, 2026

Summary

  • New obslist_formats.py library: reads and writes 9 observing list formats: SkySafari, CSV, Plain Text, Stellarium, Autostar Tour, Argo Navis, NexTour, EQMOD Tour, and PiFinder native (.pifinder)
  • Common ObsListEntry/ObsList data model as interchange format between all readers/writers
  • Auto-detection by file extension and content sniffing (JSON with version/objects → .pifinder)
  • Refactored obslist.py to use the format library, with catalog resolution kept separate
  • UI updated to browse/load all supported formats, with [ext] disambiguation when duplicate filenames exist
  • Modernized gen_images.py: concurrent image fetching, SDSS DR18, CLI args, proper DB queries

.pifinder native format

  • JSON format with catalog_code/sequence for catalog objects and full RA/Dec/type for custom objects
  • Epoch support (J2000, J2016.0) with automatic precession
  • Size/extent data preservation (vertex polygons, line segments, position angles)
  • Validation with structured error messages (PiFinderFormatError)
  • Used by py-asterisms to generate observing lists

Details

  • NexTour reader handles both CSOG coord-first (RA#Dec#Name) and web-export variants
  • Catalog name aliases for resolution: Messier→M, Caldwell→C, Collinder→Cr
  • Tour markers ("End of tour") filtered from NexTour/EQMOD imports
  • Autostar .mtf extension support added
  • ObsListEntry.mag now uses MagnitudeObject (structured) instead of Optional[float]
  • ObsListEntry.size added for SizeObject passthrough
  • 18 unit tests covering coordinate roundtrips, all format roundtrips, and format detection

Test plan

  • Unit tests: pytest tests/test_obslist_formats.py — 18 tests passing
  • Cross-format validation: CSOG Andromeda galaxies parsed identically across Argo/NexTour/EQMOD/Autostar
  • Ruff lint clean
  • Manual test: load .pifinder lists from py-asterisms output
  • Manual test: load CSOG lists from each format subdirectory in PiFinder UI
  • Regression: existing .skylist import still works

🤖 Generated with Claude Code

mrosseel and others added 8 commits March 8, 2026 23:08
Adds Objects > Obs Lists menu that lists available .skylist files from
~/PiFinder_data/obslists/, loads the selected list into the observing
list state (enabling chart markers), and displays objects in a list view.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Parse EndObjectRA/EndObjectDec fields to create navigable targets for
objects not in the PiFinder catalog (e.g. asterism stars with TYC IDs).
Also parse Comment field as object description, fix split/strip bugs,
and guard get_lists() against missing directory.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add obslist_formats.py with read/write support for 8 observing list
formats: SkySafari, CSV, Plain Text, Stellarium, Autostar Tour (.mtf),
Argo Navis, NexTour (.hct), and EQMOD Tour (.lst).

- Common ObsListEntry/ObsList data model for format interchange
- Auto-detection by extension and content sniffing
- NexTour supports both CSOG coord-first and web-export variants
- Catalog name aliases (Messier->M, Caldwell->C, Collinder->Cr)
- Duplicate filename disambiguation in UI (e.g. "CSOG [skylist]")
- Tour marker filtering ("End of tour" entries skipped)
- 18 unit tests covering roundtrips and format detection

Refactor obslist.py to use the format library for parsing, keeping
catalog resolution separate. UI updated for multi-extension support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- catalogs: remove false-negative else blocks in CatalogFilter that
  rejected objects with empty constellation or object type
- nearby: guard against empty deduplicated object list in BallTree
- obslist: add constellation lookup for coordinate-based objects
- solver: disable shared memory for Cedar detect (shmem broken)
- object_details: fix catalog initialized check for non-standard codes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Observing list objects (especially coordinate-based ones) were all
rejected by the catalog filter when sorting by nearest, because they
lack obj_type/const fields. Custom object lists should not be filtered
by the global catalog filter since the user explicitly selected them.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of special-casing observing lists to skip the catalog filter,
give coordinate-based objects the '?' (Unknown) type. This integrates
them properly with the existing filter system — users can filter on
magnitude, type, etc. just like catalog objects. The '?' type is
already in both OBJ_TYPES and the filter menu.

Also passes through obj_type from parsed entries when available (e.g.
SkySafari/Argo formats that include object type).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mrosseel mrosseel changed the title feat: add observing list UI for SkySafari .skylist files feat: multi-format observing list import with native .pifinder support Mar 18, 2026
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