|
lsst.afw
14.0-59-g0c7cc230b
|
Functions | |
| def | extraMsg (msg) |
| def | assertAnglesAlmostEqual (testCase, ang0, ang1, maxDiff=0.001 *arcseconds, ignoreWrap=True, msg="Angles differ") |
| Assert that two angles are almost equal, ignoring wrap differences by default. More... | |
| def | assertPairsAlmostEqual (testCase, pair0, pair1, maxDiff=1e-7, msg="Pairs differ") |
| Assert that two Cartesian points are almost equal. More... | |
| def | assertPairListsAlmostEqual (testCase, list0, list1, maxDiff=1e-7, msg=None) |
| Assert that two lists of Cartesian points are almost equal. More... | |
| def | assertSpherePointsAlmostEqual (testCase, sp0, sp1, maxSep=0.001 *arcseconds, msg="") |
| Assert that two SpherePoints are almost equal. More... | |
| def | assertSpherePointListsAlmostEqual (testCase, splist0, splist1, maxSep=0.001 *arcseconds, msg=None) |
| Assert that two lists of SpherePoints are almost equal. More... | |
| def | assertBoxesAlmostEqual (testCase, box0, box1, maxDiff=1e-7, msg="Boxes differ") |
| Assert that two boxes (Box2D or Box2I) are almost equal. More... | |
| def | wcsAlmostEqualOverBBox (wcs0, wcs1, bbox, maxDiffSky=0.01 *arcseconds, maxDiffPix=0.01, nx=5, ny=5) |
| Return True if two WCS are almost equal over a grid of pixel positions, else False. More... | |
| def | assertWcsAlmostEqualOverBBox (testCase, wcs0, wcs1, bbox, maxDiffSky=0.01 *arcseconds, maxDiffPix=0.01, nx=5, ny=5, msg="WCSs differ") |
| Assert that two WCS are almost equal over a grid of pixel positions. More... | |
| def | assertWcsNearlyEqualOverBBox (args, kwargs) |
| def | makeEndpoints (testCase) |
| def | assertAnglesNearlyEqual (args, kwargs) |
| def | assertPairsNearlyEqual (args, kwargs) |
| def | assertBoxesNearlyEqual (args, kwargs) |
| def lsst.afw.geom.utils.assertAnglesAlmostEqual | ( | testCase, | |
| ang0, | |||
| ang1, | |||
maxDiff = 0.001*arcseconds, |
|||
ignoreWrap = True, |
|||
msg = "Angles differ" |
|||
| ) |
Assert that two angles are almost equal, ignoring wrap differences by default.
| [in] | testCase | unittest.TestCase instance the test is part of; an object supporting one method: fail(self, msgStr) |
| [in] | ang0 | angle 0 (an lsst.afw.geom.Angle) |
| [in] | ang1 | angle 1 (an lsst.afw.geom.Angle) |
| [in] | maxDiff | maximum difference between the two angles (an lsst.afw.geom.Angle) |
| [in] | ignoreWrap | ignore wrap when comparing the angles?
|
| [in] | msg | exception message prefix; details of the error are appended after ": " |
| AssertionError | if the difference is greater than maxDiff |
| def lsst.afw.geom.utils.assertAnglesNearlyEqual | ( | args, | |
| kwargs | |||
| ) |
| def lsst.afw.geom.utils.assertBoxesAlmostEqual | ( | testCase, | |
| box0, | |||
| box1, | |||
maxDiff = 1e-7, |
|||
msg = "Boxes differ" |
|||
| ) |
Assert that two boxes (Box2D or Box2I) are almost equal.
| [in] | testCase | unittest.TestCase instance the test is part of; an object supporting one method: fail(self, msgStr) |
| [in] | box0 | box 0 |
| [in] | box1 | box 1 |
| [in] | maxDiff | maximum radial separation between the min points and max points |
| [in] | msg | exception message prefix; details of the error are appended after ": " |
| AssertionError | if the radial difference of the min points or max points is greater than maxDiff |
| def lsst.afw.geom.utils.assertBoxesNearlyEqual | ( | args, | |
| kwargs | |||
| ) |
| def lsst.afw.geom.utils.assertPairListsAlmostEqual | ( | testCase, | |
| list0, | |||
| list1, | |||
maxDiff = 1e-7, |
|||
msg = None |
|||
| ) |
Assert that two lists of Cartesian points are almost equal.
Each point can be any indexable pair of two floats, including Point2D or Extent2D, a list or a tuple.
| [in] | testCase | unittest.TestCase instance the test is part of; an object supporting one method: fail(self, msgStr) |
| [in] | list0 | list of pairs 0 (each element a pair of floats) |
| [in] | list1 | list of pairs 1 |
| [in] | maxDiff | maximum radial separation between the two points |
| [in] | msg | additional information for the error message; appended after ": " |
| AssertionError | if the radial difference is greater than maxDiff |
| def lsst.afw.geom.utils.assertPairsAlmostEqual | ( | testCase, | |
| pair0, | |||
| pair1, | |||
maxDiff = 1e-7, |
|||
msg = "Pairs differ" |
|||
| ) |
Assert that two Cartesian points are almost equal.
Each point can be any indexable pair of two floats, including Point2D or Extent2D, a list or a tuple.
| [in] | testCase | unittest.TestCase instance the test is part of; an object supporting one method: fail(self, msgStr) |
| [in] | pair0 | pair 0 (a pair of floats) |
| [in] | pair1 | pair 1 (a pair of floats) |
| [in] | maxDiff | maximum radial separation between the two points |
| [in] | msg | exception message prefix; details of the error are appended after ": " |
| AssertionError | if the radial difference is greater than maxDiff |
| def lsst.afw.geom.utils.assertPairsNearlyEqual | ( | args, | |
| kwargs | |||
| ) |
| def lsst.afw.geom.utils.assertSpherePointListsAlmostEqual | ( | testCase, | |
| splist0, | |||
| splist1, | |||
maxSep = 0.001*arcseconds, |
|||
msg = None |
|||
| ) |
Assert that two lists of SpherePoints are almost equal.
| [in] | testCase | unittest.TestCase instance the test is part of; an object supporting one method: fail(self, msgStr) |
| [in] | splist0 | list of SpherePoints 0 |
| [in] | splist1 | list of SpherePoints 1 |
| [in] | maxSep | maximum separation, an lsst.afw.geom.Angle |
| [in] | msg | exception message prefix; details of the error are appended after ": " |
| def lsst.afw.geom.utils.assertSpherePointsAlmostEqual | ( | testCase, | |
| sp0, | |||
| sp1, | |||
maxSep = 0.001*arcseconds, |
|||
msg = "" |
|||
| ) |
Assert that two SpherePoints are almost equal.
| [in] | testCase | unittest.TestCase instance the test is part of; an object supporting one method: fail(self, msgStr) |
| [in] | sp0 | SpherePoint 0 |
| [in] | sp1 | SpherePoint 1 |
| [in] | maxSep | maximum separation, an lsst.afw.geom.Angle |
| [in] | msg | extra information to be printed with any error message |
| def lsst.afw.geom.utils.assertWcsAlmostEqualOverBBox | ( | testCase, | |
| wcs0, | |||
| wcs1, | |||
| bbox, | |||
maxDiffSky = 0.01*arcseconds, |
|||
maxDiffPix = 0.01, |
|||
nx = 5, |
|||
ny = 5, |
|||
msg = "WCSs differ" |
|||
| ) |
Assert that two WCS are almost equal over a grid of pixel positions.
Compare pixelToSky and skyToPixel for two WCS over a rectangular grid of pixel positions. If the WCS are too divergent at any point, call testCase.fail; the message describes the largest error measured in pixel coordinates (if sky to pixel error was excessive) and sky coordinates (if pixel to sky error was excessive) across the entire pixel grid.
| [in] | testCase | unittest.TestCase instance the test is part of; an object supporting one method: fail(self, msgStr) |
| [in] | wcs0 | WCS 0 (an lsst.afw.geom.SkyWcs) |
| [in] | wcs1 | WCS 1 (an lsst.afw.geom.SkyWcs) |
| [in] | bbox | boundaries of pixel grid over which to compare the WCSs (an lsst.afw.geom.Box2I or Box2D) |
| [in] | maxDiffSky | maximum separation between sky positions computed using Wcs.pixelToSky (an lsst.afw.geom.Angle) |
| [in] | maxDiffPix | maximum separation between pixel positions computed using Wcs.skyToPixel |
| [in] | nx | number of points in x for the grid of pixel positions |
| [in] | ny | number of points in y for the grid of pixel positions |
| [in] | msg | exception message prefix; details of the error are appended after ": " |
| def lsst.afw.geom.utils.assertWcsNearlyEqualOverBBox | ( | args, | |
| kwargs | |||
| ) |
| def lsst.afw.geom.utils.extraMsg | ( | msg | ) |
| def lsst.afw.geom.utils.makeEndpoints | ( | testCase | ) |
| def lsst.afw.geom.utils.wcsAlmostEqualOverBBox | ( | wcs0, | |
| wcs1, | |||
| bbox, | |||
maxDiffSky = 0.01*arcseconds, |
|||
maxDiffPix = 0.01, |
|||
nx = 5, |
|||
ny = 5 |
|||
| ) |
Return True if two WCS are almost equal over a grid of pixel positions, else False.
| [in] | wcs0 | WCS 0 (an lsst.afw.geom.SkyWcs) |
| [in] | wcs1 | WCS 1 (an lsst.afw.geom.SkyWcs) |
| [in] | bbox | boundaries of pixel grid over which to compare the WCSs (an lsst.afw.geom.Box2I or Box2D) |
| [in] | maxDiffSky | maximum separation between sky positions computed using Wcs.pixelToSky (an lsst.afw.geom.Angle) |
| [in] | maxDiffPix | maximum separation between pixel positions computed using Wcs.skyToPixel |
| [in] | nx | number of points in x for the grid of pixel positions |
| [in] | ny | number of points in y for the grid of pixel positions |
1.8.13