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-12431: re-Verify performance of matchPessimisticB with new distortions. #79

Merged
merged 5 commits into from
Jan 30, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions python/lsst/meas/astrom/matchPessimisticB.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import numpy as np
from scipy.spatial import cKDTree
from scipy.stats import sigmaclip

import lsst.pex.config as pexConfig
import lsst.pipe.base as pipeBase
Expand Down Expand Up @@ -490,15 +491,16 @@ def _doMatch(self, refCat, sourceCat, wcs, refFluxField, numUsableSources,
# we need to remove as many false positives as possible before sending
# the matches off to the solver.
distances_arcsec = np.degrees(matcher_struct.distances_rad) * 3600
clip_max_dist = np.max(
(sigmaclip(distances_arcsec, low=100, high=2)[-1],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the justification for these values of low and high? They just seem like magic numbers here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The are the number of sigma for the clip. Low is 100 because the lower bound is always a value of 0 and high is a 2 sigma cut. I will add a comment explaining this. I could also make the high value a configurable if that is useful.

self.config.minMatchDistPixels * wcs.pixelScale().asArcseconds())
)
# We pick the largest of the the unsoftened maxMatchDistArcSec or
# a user specified distance in pixels. This prevents the
# AstrometryTask._matchAndFitWCS from over-fitting to a small number of
# objects and also allows the WCS fitter to bring in more matches as
# the WCS fit improves.
dist_cut_arcsec = np.max(
(self.config.minMatchDistPixels * wcs.pixelScale().asArcseconds(),
maxMatchDistArcSec)
)
dist_cut_arcsec = np.min((clip_max_dist, maxMatchDistArcSec))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this makes the comment above untrue, right? You are no longer picking the largest of anything, but the smallest of the sigma clipped cut and maxMatchDistArcSec.


# A match has been found, return our list of matches and
# return.
Expand Down