New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tickets/dm 7117 #39
Tickets/dm 7117 #39
Conversation
coordList = [src.getCoord() for src in catalog] | ||
center = afwCoord.averageCoord(coordList) | ||
radius = max(center.angularSeparation(coord) for coord in coordList) | ||
return Struct(center=center, radius=radius) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this algorithm good enough for the intended purpose? It is unlikely to be the smallest circle that encloses the catalog (imagine a cluster of many points and a few outliers off to one side).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the best we can do given the available API for the refObjLoader
. It may not be the most efficient algorithm but I don't think it's far off if the sources in the catalog
are constrained to be in the same area, like they are if they're all from the same image; and that's my use case. If not, the user may have to write and retarget
a more efficient implementation.
256d305
to
ecfb335
Compare
center = lsst.afw.coord.IcrsCoord(215.5*lsst.afw.geom.degrees, 53.0*lsst.afw.geom.degrees) | ||
radius = 0.5*lsst.afw.geom.degrees | ||
self.filter = "r" | ||
self.references = refObjLoader.loadSkyCircle(center, radius, self.filter).refCat |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest using the standard name "refCat" as it's less confusing than renaming variables.
The 'match metadata' stores data we need to regenerate the matches (i.e., cone search parameters). The current interface uses a bbox and Wcs, and converts those to the cone search parameters that are stored in the metadata; but there has not been an interface to construct the 'match metadata' given the cone search parameters. Created a new class, MatchMetadata for the purpose of simplifying the creation of the 'match metadata'. Chose to use a class rather than a new factory function because it's more fundamental. The old interface now uses the new class.
The two AstrometryTasks (MatchOptimisticBTask and ANetAstrometryTask) support matching, but these are optimised for determining astrometric solutions so there are a variety of contortions involved, including allowing rotations and distortions and filtering of the input catalog. This new MatchTask is much simpler: * no exposure required, only a catalog; * no rotations or translations are permitted, only a straight match; * no filtering of the input catalog, so all matches are returned; and * no exception is raised when there are no matches. This makes it suitable for gathering a list of matches for QA purposes.
ecfb335
to
7acdb20
Compare
No description provided.