Coverage for tests/test_tex.py : 94%

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 2012-2017 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/>. #
"""Test calculation of TEx ellipticity residuals calculations."""
"""Does select_bin_from_corr correctly return only and all the bins that satisfy condition.
This test is meant for maintaining this consistency of performance. These reference *_xip, *_xip_errs were computed based on the above arrays and running through Treecorr wrapper code here manually. It's not testing original correctness of Treecorr. """
select_bin_from_corr(r, xip, xip_err, radius=0, operator=operator.gt)
select_bin_from_corr(r, xip, xip_err, radius=2, operator=operator.lt)
select_bin_from_corr(r, xip, xip_err, radius=1, operator=operator.ge)
"""Does the correlation function correctly compute for a random field?
Our goal is mostly to check that we're calling this function correctly. Tests of the deeper performance are implicitly outsourced to TreeCorr.
Use same approach as TreeCorr galaxy-galaxy test from https://github.com/rmjarvis/TreeCorr/blob/releases/3.3/tests/test_gg.py
Which in turn references http://adsabs.harvard.edu/abs/2002A%26A...389..729S """ # Seed was arbitrarily chosen. # Yes, a million. N this high and L this large # gets xip within 1e-7 absolute of the analytic limit. # Takes 25 seconds to run on an early-2015 MacBook Air 2.2 GHz Intel Core i7
# Ignoring spherical geometry cos(dec) term
correlation_function_ellipticity(ra, dec, g1, g2)
# 2017-08-05 MWV: # I don't know how to calculate the expected xip_err # so there's presently no test for that.
lsst.utils.tests.init() unittest.main() |