Skip to content

Eac/mst matching - #27

Merged
eacharles merged 5 commits into
mainfrom
eac/mst-matching
Nov 4, 2026
Merged

eacharles merged 5 commits into
mainfrom
eac/mst-matching

Conversation

@eacharles

Copy link
Copy Markdown
Contributor

No description provided.

Introduces MSTWcsMatch and MSTShearMatch, which replace the
footprint/pixelization-based initial clustering with a minimum-spanning-tree
equivalent: sources within mst_cut arcseconds (via a chain of neighbours)
are placed in the same cluster using scipy connected_components on a
sparse near-neighbour graph.

This makes initial cluster assignment robust against pixel scale choices
while preserving the existing hierarchical confusion-resolution pipeline.

New files:
- src/hpmcm/mst_utils.py  -- mst_group_sources()
- src/hpmcm/mst_cell.py   -- MSTCellMixin, MSTCellData, MSTShearCellData
- src/hpmcm/mst_match.py  -- MSTWcsMatch, MSTShearMatch
- tests/test_mst_match.py -- 4 tests including a synthetic grouping check

Generated with AI

Co-Authored-By: SLAC AI
Drop-in replacement for RunMatching.ipynb using MSTShearMatch and
MSTWcsMatch.  Adds mst_cut_shear and mst_cut_wcs tuneable parameters
(in arcseconds) and writes outputs to *_mst_* paths to avoid clobbering
standard-matcher results.

Generated with AI

Co-Authored-By: SLAC AI
mstProcessCluster, mstProcessObject, and mstSplitObject replace the
heirarchical* pixel-zoom functions for MST cells. Splitting now re-runs
mst_group_sources with mst_cut halved at each recursion level, keeping
the entire pipeline free of pixelization choices.

Generated with AI

Co-Authored-By: SLAC AI
Draw MST links between sources instead of a pixel counts-map background.
showMSTCluster colours nodes by catalog ID; showMSTObjects colours
intra-object edges solid by object and inter-object (cut) edges dashed grey.

Generated with AI

Co-Authored-By: SLAC AI
Counterpart to VizMatches.ipynb that loads MST match outputs and
displays clusters and objects with showMSTCluster / showMSTObjects
instead of the pixel counts-map based showCluster.

Generated with AI

Co-Authored-By: SLAC AI
@eacharles
eacharles merged commit 0bbd618 into main Nov 4, 2026
4 checks passed
@eacharles
eacharles deleted the eac/mst-matching branch November 4, 2026 01:17
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