Coverage for python/lsst/meas/extensions/astrometryNet/cleanBadPoints.py : 100%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# # LSST Data Management System # Copyright 2008, 2009, 2010 LSST Corporation. # # This product includes software developed by the # LSST Project (http://www.lsst.org/). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the LSST License Statement and # the GNU General Public License along with this program. If not, # see <http://www.lsstcorp.org/LegalNotices/>. #
"""Remove bad points from srcMatch
Input: srcMatch : list of det::SourceMatch order: Order of polynomial to use in robust fitting nsigma: Sources more than this far away from the robust best fit polynomial are removed
Return: list of det::SourceMatch of the good data points """
# catY = np.zeros(N) # catY[i] = y
# TODO -- why does this only use X?
"""Return a list of indices in the range [0, len(x)] of points that lie less than nsigma away from the robust best fit polynomial """
# Indices of elements of x sorted in order of increasing value
# all remaining points are good; short circuit
if False: import matplotlib.pyplot as plt plt.plot(x, y, 'ks') plt.plot(rx, ry, 'b-') plt.plot(rx, ry, 'bs') plt.plot(rx, fit, 'ms') plt.plot(rx, fit, 'm-') # plt.plot(x[newidx], y[newidx], 'rs') plt.show()
# If we haven't culled any points we're finished cleaning
# We get here because we either a) stopped finding bad points # or b) ran out of iterations. Either way, we just return our # list of indices of good points.
"""Create order+1 values of the ordinate based on the median of groups of elements of x"""
"""Create order+1 values of the ordinate based on the median of groups of elements of y"""
|