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-2755: Iteration and convergence fixes #10

Merged
merged 11 commits into from May 21, 2015
Merged

Conversation

PaulPrice
Copy link
Contributor

No description provided.

r-owen added 11 commits May 20, 2015 17:23
Improved the way matchOptimisticB keeps track of which reference objects
have been used in FinalVerify. Formerly metadata was used in RecordProxy
but this didn't allow saving the closest match. Now a boost multiindex is used
and the match distance is recorded. In theory one can keep the closer match.
In practice this is not being done because it may not be necessary.
Added documentation for the one field in MatchOptimisticBControl that had none,
and made minor improvements to the documentation of a few other fields.
Also documented the value returned by matchOptimisticB.
Renamed showAstrometry to displayAstrometry (ds9) and moved to display.py
Renamed plotMatches to plotAstrometry (matplotlib) and moved to display.py
Made plotAstrometry more like the older displayAstrometry by using the same
symbols and colors.
Modified displayAstrometry to show the matches by drawing a line connecting
the source and reference object (like plotAstrometry).
…sToSources

The new maxMatchDistArcSec argument allows reducing the match distance during iteration,
which can greatly improve the astrometric fit.
Added class attribute MatchOptimisticBTask.SourceInfoClass, to make it easier
to override the selection criteria for usable and good sources.
I also cleaned up SourceInfo a bit, including adding some additional keys
that may prove useful for screening sources and simplified the names
isUsableSource and isGoodSource by removing "Source".
Improved error messages if no sources are usable.
Increased the default maxMatchDistArcSec from 1 to 3 because the improved matcher
and iteration allow it, and it will work for more telescopes.
Simplified and sped up the code a bit; formerly the matcher would first
try on usable sources, then on good sources. It appears sufficient to
just try on usable sources, and that is what Vello Tabur recommends.
Bug fix: _doMatch could return None if no matches; it must always return a list.
Switch from "import numpy" to standard "import numpy as np".
AstrometryTask now iterates the match and fit WCS cycle in a smarter way:
- It checks if each iteration has improved the fit and stops if not
  or if the fit is so good there is no point continuing.
- If a WCS fit fails it either gives up (if it's the first fit)
  or uses the previous iteration
- It reduces the maximum matching distance for each iteration
  based on the measured quality of the fit.
Improved FitTanSipWcsTask in two ways:
- It iterates the fit (since the existing C++ code fits X first, then Y,
  which is something we plan to fix at some point).
- If the fit is terrible it raises an exception.
Change two matchOptimisticB parameters from radians to degrees,
rename one to make its purpose clearer, and update MatchOptimisticBTask accordingly.
Also document some parameters better (there is still one I don't understand).
Two values that were supposed to be different were the same, due to a typo.
Added two config parameters that control termination of match + fit WCS iteration
(rather than using magic numbers).
Improved logging to avoid info-level log messages in a loop.
Renamed SourceInfo._iResolved to isMultiple for accuracy.
Changed SourceInfo.interpolatedKey to SourceInfo.interpolatedCenterKey
because it is more likely useful for detecting sources with untrustworthy centroids.
Corrected documentation if SourceInfo.isUsable, which had some incorrect criteria listed.
MatchOptimisticBTask was not culling non-good sources from the match list
before returning. That was a bug I accidentally introduced while making
other changes.
I also changed the definition of good sources as those that are have no
interpolated pixels in their center, as recommended by Paul Price;
this catches cosmic rays and bad pixels, as well as saturation.
The result of re-introducing the culling is that the CFHT demo
not reaches 18.6 mas scatter of bright stars in only 3 iterations
of the outer loop in AstrometryTask, so I reduced the default accordingly
(still not quite the 2 Paul Price requested, but close).
@r-owen r-owen merged commit 6575307 into master May 21, 2015
@ktlim ktlim deleted the tickets/DM-2755 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
4 participants