|
LSST Applications g00274db5b6+edbf708997,g00d0e8bbd7+edbf708997,g199a45376c+5137f08352,g1fd858c14a+1d4b6db739,g262e1987ae+f4d9505c4f,g29ae962dfc+7156fb1a53,g2cef7863aa+73c82f25e4,g35bb328faa+edbf708997,g3e17d7035e+5b3adc59f5,g3fd5ace14f+852fa6fbcb,g47891489e3+6dc8069a4c,g53246c7159+edbf708997,g64539dfbff+9f17e571f4,g67b6fd64d1+6dc8069a4c,g74acd417e5+ae494d68d9,g786e29fd12+af89c03590,g7ae74a0b1c+a25e60b391,g7aefaa3e3d+536efcc10a,g7cc15d900a+d121454f8d,g87389fa792+a4172ec7da,g89139ef638+6dc8069a4c,g8d7436a09f+28c28d8d6d,g8ea07a8fe4+db21c37724,g92c671f44c+9f17e571f4,g98df359435+b2e6376b13,g99af87f6a8+b0f4ad7b8d,gac66b60396+966efe6077,gb88ae4c679+7dec8f19df,gbaa8f7a6c5+38b34f4976,gbf99507273+edbf708997,gc24b5d6ed1+9f17e571f4,gca7fc764a6+6dc8069a4c,gcc769fe2a4+97d0256649,gd7ef33dd92+6dc8069a4c,gdab6d2f7ff+ae494d68d9,gdbb4c4dda9+9f17e571f4,ge410e46f29+6dc8069a4c,geaed405ab2+e194be0d2b,w.2025.47
LSST Data Management Base Package
|
Functions | |
| makeGaussianNoiseMaskedImage (dimensions, sigma, variance=1.0) | |
| makeRampImage (bbox, start=0, stop=None, imageClass=ImageF) | |
| Make an image whose values are a linear ramp. | |
| assertImagesAlmostEqual (testCase, image0, image1, skipMask=None, rtol=1.0e-05, atol=1e-08, msg="Images differ") | |
| Assert that two images are almost equal, including non-finite values. | |
| assertImagesEqual (*args, **kwds) | |
| Assert that two images are exactly equal, including non-finite values. | |
| assertMasksEqual (testCase, mask0, mask1, skipMask=None, msg="Masks differ") | |
| Assert that two masks are equal. | |
| assertMaskedImagesAlmostEqual (testCase, maskedImage0, maskedImage1, doImage=True, doMask=True, doVariance=True, skipMask=None, rtol=1.0e-05, atol=1e-08, msg="Masked images differ") | |
| Assert that two masked images are nearly equal, including non-finite values. | |
| assertMaskedImagesEqual (*args, **kwds) | |
| Assert that two masked images are exactly equal, including non-finite values. | |
| imagesDiffer (image0, image1, skipMask=None, rtol=1.0e-05, atol=1e-08) | |
| Compare the pixels of two image or mask arrays; return True if close, False otherwise. | |
| lsst.afw.image.testUtils.assertImagesAlmostEqual | ( | testCase, | |
| image0, | |||
| image1, | |||
| skipMask = None, | |||
| rtol = 1.0e-05, | |||
| atol = 1e-08, | |||
| msg = "Images differ" ) |
Assert that two images are almost equal, including non-finite values.
| [in] | testCase | unittest.TestCase instance the test is part of; an object supporting one method: fail(self, msgStr) |
| [in] | image0 | image 0, an lsst.afw.image.Image, lsst.afw.image.Mask, or transposed numpy array (see warning) |
| [in] | image1 | image 1, an lsst.afw.image.Image, lsst.afw.image.Mask, or transposed numpy array (see warning) |
| [in] | skipMask | mask of pixels to skip, or None to compare all pixels; an lsst.afw.image.Mask, lsst.afw.image.Image, or transposed numpy array (see warning); all non-zero pixels are skipped |
| [in] | rtol | maximum allowed relative tolerance; more info below |
| [in] | atol | maximum allowed absolute tolerance; more info below |
| [in] | msg | exception message prefix; details of the error are appended after ": " |
The images are nearly equal if all pixels obey: |val1 - val0| <= rtol*|val1| + atol or, for float types, if nan/inf/-inf pixels match.
| self.failureException | (usually AssertionError) if any of the following are true for un-skipped pixels:
|
| TypeError | if the dimensions of image0, image1 and skipMask do not match, or any are not of a numeric data type. |
Definition at line 74 of file testUtils.py.
| lsst.afw.image.testUtils.assertImagesEqual | ( | * | args, |
| ** | kwds ) |
Assert that two images are exactly equal, including non-finite values.
All arguments are forwarded to assertAnglesAlmostEqual aside from atol and rtol, which are set to zero.
Definition at line 117 of file testUtils.py.
| lsst.afw.image.testUtils.assertMaskedImagesAlmostEqual | ( | testCase, | |
| maskedImage0, | |||
| maskedImage1, | |||
| doImage = True, | |||
| doMask = True, | |||
| doVariance = True, | |||
| skipMask = None, | |||
| rtol = 1.0e-05, | |||
| atol = 1e-08, | |||
| msg = "Masked images differ" ) |
Assert that two masked images are nearly equal, including non-finite values.
| [in] | testCase | unittest.TestCase instance the test is part of; an object supporting one method: fail(self, msgStr) |
| [in] | maskedImage0 | masked image 0 (an lsst.afw.image.MaskedImage or collection of three transposed numpy arrays: image, mask, variance) |
| [in] | maskedImage1 | masked image 1 (an lsst.afw.image.MaskedImage or collection of three transposed numpy arrays: image, mask, variance) |
| [in] | doImage | compare image planes if True |
| [in] | doMask | compare mask planes if True |
| [in] | doVariance | compare variance planes if True |
| [in] | skipMask | mask of pixels to skip, or None to compare all pixels; an lsst.afw.image.Mask, lsst.afw.image.Image, or transposed numpy array; all non-zero pixels are skipped |
| [in] | rtol | maximum allowed relative tolerance; more info below |
| [in] | atol | maximum allowed absolute tolerance; more info below |
| [in] | msg | exception message prefix; details of the error are appended after ": " |
The mask planes must match exactly. The image and variance planes are nearly equal if all pixels obey: |val1 - val0| <= rtol*|val1| + atol or, for float types, if nan/inf/-inf pixels match.
| self.failureException | (usually AssertionError) if any of the following are true for un-skipped pixels:
|
| TypeError | if the dimensions of maskedImage0, maskedImage1 and skipMask do not match, either image or variance plane is not of a numeric data type, either mask plane is not of an integer type (unsigned or signed), or skipMask is not of a numeric data type. |
Definition at line 156 of file testUtils.py.
| lsst.afw.image.testUtils.assertMaskedImagesEqual | ( | * | args, |
| ** | kwds ) |
Assert that two masked images are exactly equal, including non-finite values.
All arguments are forwarded to assertMaskedImagesAlmostEqual aside from atol and rtol, which are set to zero.
Definition at line 254 of file testUtils.py.
| lsst.afw.image.testUtils.assertMasksEqual | ( | testCase, | |
| mask0, | |||
| mask1, | |||
| skipMask = None, | |||
| msg = "Masks differ" ) |
Assert that two masks are equal.
| [in] | testCase | unittest.TestCase instance the test is part of; an object supporting one method: fail(self, msgStr) |
| [in] | mask0 | mask 0, an lsst.afw.image.Mask, lsst.afw.image.Image, or transposed numpy array (see warning) |
| [in] | mask1 | mask 1, an lsst.afw.image.Mask, lsst.afw.image.Image, or transposed numpy array (see warning) |
| [in] | skipMask | mask of pixels to skip, or None to compare all pixels; an lsst.afw.image.Mask, lsst.afw.image.Image, or transposed numpy array (see warning); all non-zero pixels are skipped |
| [in] | msg | exception message prefix; details of the error are appended after ": " |
| self.failureException | (usually AssertionError) if any any un-skipped pixels differ |
| TypeError | if the dimensions of mask0, mask1 and skipMask do not match, or any are not of a numeric data type. |
Definition at line 127 of file testUtils.py.
| lsst.afw.image.testUtils.imagesDiffer | ( | image0, | |
| image1, | |||
| skipMask = None, | |||
| rtol = 1.0e-05, | |||
| atol = 1e-08 ) |
Compare the pixels of two image or mask arrays; return True if close, False otherwise.
| [in] | image0 | image 0, an lsst.afw.image.Image, lsst.afw.image.Mask, or transposed numpy array (see warning) |
| [in] | image1 | image 1, an lsst.afw.image.Image, lsst.afw.image.Mask, or transposed numpy array (see warning) |
| [in] | skipMask | mask of pixels to skip, or None to compare all pixels; an lsst.afw.image.Mask, lsst.afw.image.Image, or transposed numpy array (see warning); all non-zero pixels are skipped |
| [in] | rtol | maximum allowed relative tolerance; more info below |
| [in] | atol | maximum allowed absolute tolerance; more info below |
The images are nearly equal if all pixels obey: |val1 - val0| <= rtol*|val1| + atol or, for float types, if nan/inf/-inf pixels match.
| TypeError | if the dimensions of image0, image1 and skipMask do not match, or any are not of a numeric data type. |
Definition at line 263 of file testUtils.py.
| lsst.afw.image.testUtils.makeGaussianNoiseMaskedImage | ( | dimensions, | |
| sigma, | |||
| variance = 1.0 ) |
Make a gaussian noise MaskedImageF Inputs: - dimensions: dimensions of output array (cols, rows) - sigma; sigma of image plane's noise distribution - variance: constant value for variance plane
Definition at line 34 of file testUtils.py.
| lsst.afw.image.testUtils.makeRampImage | ( | bbox, | |
| start = 0, | |||
| stop = None, | |||
| imageClass = ImageF ) |
Make an image whose values are a linear ramp.
| [in] | bbox | bounding box of image (an lsst.geom.Box2I) |
| [in] | start | starting ramp value, inclusive |
| [in] | stop | ending ramp value, inclusive; if None, increase by integer values |
| [in] | imageClass | type of image (e.g. lsst.afw.image.ImageF) |
Definition at line 51 of file testUtils.py.