Repository navigation
Eac/standardize x cent and pixel match scale - #23
Merged
Merged
Conversation
…for WcsMatch x_cent / y_cent in ObjectStatsTable and ClusterStatsTable are now stored in x_cell_coadd coordinates (origin at inner left edge of cell, matching the x_cell_coadd column in the source catalogs) instead of x_cell coordinates (origin at the outer edge including the buffer). The shift is cell_data.buf pixels (10 for WCS, 25 for shear). RA, Dec, and x_pix are computed before the conversion so they remain correct. _reconstructCells adds cell.buf back when loading saved centroids to restore the internal x_cell convention. CellData now properly propagates pixel_match_scale through all four counts-map strategy methods (_emptyCountsMaps, _singleCatalogCountsMap, _getFootprints, _associateSourcesToFootprints), so WcsMatch works correctly for any pixel_match_scale value. Three now-redundant overrides are removed from ShearCellData; only _getFootprints is kept (buf=0 vs buf=self.buf is the meaningful difference). A new test testWCSMatchPixelMatchScale verifies the end-to-end behaviour with pms=2. Generated with AI Co-Authored-By: SLAC AI
… join tables Adds central_only=True (default) to extractStats, extractShearStats, and save, and the same flag plus an optional cell_size to buildJoinedObjectTable and buildJoinedClusterTable. When enabled, objects and clusters whose centroid in x_cell_coadd coordinates falls outside [0, cell_size in either axis are excluded. This removes edge objects that straddle a cell boundary and would otherwise be double-counted when multiple cells are concatenated. The filtering in extractStats/extractShearStats uses the internal x_cent values (x_cell convention) compared against [buf, buf+cell_size) to avoid redundant coordinate conversion. The join-table functions apply the equivalent check on the stored x_cent (x_cell_coadd convention, so threshold is 0 for the lower bound and cell_size for the upper bound). New unit tests cover: lower-bound filtering for objects and clusters, and upper-bound filtering via cell_size. Generated with AI Co-Authored-By: SLAC AI EOF )
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.
No description provided.