Skip to content
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

Merged
merged 7 commits into from Sep 2, 2016
Merged

Tickets/dm 7117 #39

merged 7 commits into from Sep 2, 2016

Conversation

r-owen
Copy link
Contributor

@r-owen r-owen commented Aug 9, 2016

No description provided.

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)
Copy link
Contributor Author

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).

Copy link
Contributor

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.

@PaulPrice PaulPrice force-pushed the tickets/DM-7117 branch 3 times, most recently from 256d305 to ecfb335 Compare August 10, 2016 12:46
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
Copy link
Contributor Author

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.
@PaulPrice PaulPrice merged commit 0d08f61 into master Sep 2, 2016
@ktlim ktlim deleted the tickets/DM-7117 branch August 25, 2018 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants