lsst.afw  13.0-100-ge0459d59f+5
Functions
lsst.afw.image.basicUtils Namespace Reference

Functions

def makeImageFromArray (array)
 
def makeMaskFromArray (array)
 
def makeMaskedImageFromArrays (image, mask=None, variance=None)
 
def 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. More...
 
def 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. More...
 
def wcsNearlyEqualOverBBox (args, kwargs)
 
def assertWcsNearlyEqualOverBBox (args, kwargs)
 

Function Documentation

◆ assertWcsAlmostEqualOverBBox()

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.

◆ assertWcsNearlyEqualOverBBox()

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

Definition at line 198 of file basicUtils.py.

◆ makeImageFromArray()

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.

◆ makeMaskedImageFromArrays()

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.

◆ makeMaskFromArray()

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.

◆ wcsAlmostEqualOverBBox()

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.

◆ wcsNearlyEqualOverBBox()

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

Definition at line 192 of file basicUtils.py.