lsst.afw  13.0-92-g8ecf155+1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions | Variables
lsst.afw.image.basicUtils Namespace Reference

Functions

def makeImageFromArray
 
def makeMaskFromArray
 
def makeMaskedImageFromArrays
 
def wcsAlmostEqualOverBBox
 Return True if two WCS are almost equal over a grid of pixel positions, else False. More...
 
def assertWcsAlmostEqualOverBBox
 Assert that two WCS are almost equal over a grid of pixel positions. More...
 
def wcsNearlyEqualOverBBox
 
def assertWcsNearlyEqualOverBBox
 

Variables

list __all__
 

Function Documentation

def lsst.afw.image.basicUtils.assertWcsAlmostEqualOverBBox (   testCase,
  wcs0,
  wcs1,
  bbox,
  maxDiffSky = 0.01*afwGeom.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.

Parameters
[in]testCaseunittest.TestCase instance the test is part of; an object supporting one method: fail(self, msgStr)
[in]wcs0WCS 0 (an lsst.afw.image.Wcs)
[in]wcs1WCS 1 (an lsst.afw.image.Wcs)
[in]bboxboundaries of pixel grid over which to compare the WCSs (an lsst.afw.geom.Box2I or Box2D)
[in]maxDiffSkymaximum separation between sky positions computed using Wcs.pixelToSky (an lsst.afw.geom.Angle)
[in]maxDiffPixmaximum separation between pixel positions computed using Wcs.skyToPixel
[in]nxnumber of points in x for the grid of pixel positions
[in]nynumber of points in y for the grid of pixel positions
[in]msgexception message prefix; details of the error are appended after ": "

Definition at line 158 of file basicUtils.py.

def lsst.afw.image.basicUtils.assertWcsNearlyEqualOverBBox (   args,
  kwargs 
)

Definition at line 198 of file basicUtils.py.

def lsst.afw.image.basicUtils.makeImageFromArray (   array)
Construct an Image from a NumPy array, inferring the Image type from
the NumPy type. Return None if input is None.

Definition at line 41 of file basicUtils.py.

def lsst.afw.image.basicUtils.makeMaskedImageFromArrays (   image,
  mask = None,
  variance = None 
)
Construct a MaskedImage from three NumPy arrays, inferring the
MaskedImage types from the NumPy types.

Definition at line 59 of file basicUtils.py.

def lsst.afw.image.basicUtils.makeMaskFromArray (   array)
Construct an Mask from a NumPy array, inferring the Mask type from the
NumPy type. Return None if input is None.

Definition at line 50 of file basicUtils.py.

def lsst.afw.image.basicUtils.wcsAlmostEqualOverBBox (   wcs0,
  wcs1,
  bbox,
  maxDiffSky = 0.01*afwGeom.arcseconds,
  maxDiffPix = 0.01,
  nx = 5,
  ny = 5 
)

Return True if two WCS are almost equal over a grid of pixel positions, else False.

Parameters
[in]wcs0WCS 0 (an lsst.afw.image.Wcs)
[in]wcs1WCS 1 (an lsst.afw.image.Wcs)
[in]bboxboundaries of pixel grid over which to compare the WCSs (an lsst.afw.geom.Box2I or Box2D)
[in]maxDiffSkymaximum separation between sky positions computed using Wcs.pixelToSky (an lsst.afw.geom.Angle)
[in]maxDiffPixmaximum separation between pixel positions computed using Wcs.skyToPixel
[in]nxnumber of points in x for the grid of pixel positions
[in]nynumber of points in y for the grid of pixel positions

Definition at line 132 of file basicUtils.py.

def lsst.afw.image.basicUtils.wcsNearlyEqualOverBBox (   args,
  kwargs 
)

Definition at line 192 of file basicUtils.py.

Variable Documentation

list lsst.afw.image.basicUtils.__all__
Initial value:
1 = ["makeImageFromArray", "makeMaskFromArray", "makeMaskedImageFromArrays",
2  "wcsAlmostEqualOverBBox", "assertWcsAlmostEqualOverBBox",
3  "wcsNearlyEqualOverBBox", "assertWcsNearlyEqualOverBBox"]

Definition at line 24 of file basicUtils.py.