LSST Applications
21.0.0+04719a4bac,21.0.0-1-ga51b5d4+f5e6047307,21.0.0-11-g2b59f77+a9c1acf22d,21.0.0-11-ga42c5b2+86977b0b17,21.0.0-12-gf4ce030+76814010d2,21.0.0-13-g1721dae+760e7a6536,21.0.0-13-g3a573fe+768d78a30a,21.0.0-15-g5a7caf0+f21cbc5713,21.0.0-16-g0fb55c1+b60e2d390c,21.0.0-19-g4cded4ca+71a93a33c0,21.0.0-2-g103fe59+bb20972958,21.0.0-2-g45278ab+04719a4bac,21.0.0-2-g5242d73+3ad5d60fb1,21.0.0-2-g7f82c8f+8babb168e8,21.0.0-2-g8f08a60+06509c8b61,21.0.0-2-g8faa9b5+616205b9df,21.0.0-2-ga326454+8babb168e8,21.0.0-2-gde069b7+5e4aea9c2f,21.0.0-2-gecfae73+1d3a86e577,21.0.0-2-gfc62afb+3ad5d60fb1,21.0.0-25-g1d57be3cd+e73869a214,21.0.0-3-g357aad2+ed88757d29,21.0.0-3-g4a4ce7f+3ad5d60fb1,21.0.0-3-g4be5c26+3ad5d60fb1,21.0.0-3-g65f322c+e0b24896a3,21.0.0-3-g7d9da8d+616205b9df,21.0.0-3-ge02ed75+a9c1acf22d,21.0.0-4-g591bb35+a9c1acf22d,21.0.0-4-g65b4814+b60e2d390c,21.0.0-4-gccdca77+0de219a2bc,21.0.0-4-ge8a399c+6c55c39e83,21.0.0-5-gd00fb1e+05fce91b99,21.0.0-6-gc675373+3ad5d60fb1,21.0.0-64-g1122c245+4fb2b8f86e,21.0.0-7-g04766d7+cd19d05db2,21.0.0-7-gdf92d54+04719a4bac,21.0.0-8-g5674e7b+d1bd76f71f,master-gac4afde19b+a9c1acf22d,w.2021.13
LSST Data Management Base Package
|
Public Member Functions | |
def | getTestDir (self) |
def | setUp (self) |
def | makeGoodFrame (cls, name, nAxes=None) |
def | makeFrameSet (self, baseFrame, currFrame) |
def | checkTransformation (self, transform, mapping, msg="") |
def | checkInverseTransformation (self, forward, inverse, msg="") |
def | checkTransformFromMapping (self, fromName, toName) |
def | checkTransformFromFrameSet (self, fromName, toName) |
def | checkInverted (self, fromName, toName) |
def | checkInverseMapping (self, TransformClass, mapping, msg) |
def | checkGetJacobian (self, fromName, toName) |
def | checkThen (self, fromName, midName, toName) |
def | assertTransformsEqual (self, transform1, transform2) |
def | checkPersistence (self, transform) |
Static Public Member Functions | |
def | makeRawArrayData (nPoints, nAxes, delta=0.123) |
def | makeRawPointData (nAxes, delta=0.123) |
def | makeEndpoint (name, nAxes=None) |
def | makeBadFrames (name) |
def | permuteFrameSetIter (frameSet) |
def | makeJacobian (nIn, nOut, inPoint) |
Public Attributes | |
longMessage | |
endpointPrefixes | |
goodNAxes | |
badNAxes | |
frameIdentDict | |
Base class for unit tests of Transform<X>To<Y> Subclasses must call `TransformTestBaseClass.setUp(self)` if they provide their own version. If a package other than afw uses this class then it must override the `getTestDir` method to avoid writing into afw's test directory.
Definition at line 330 of file testUtils.py.
def lsst.afw.geom.testUtils.TransformTestBaseClass.assertTransformsEqual | ( | self, | |
transform1, | |||
transform2 | |||
) |
def lsst.afw.geom.testUtils.TransformTestBaseClass.checkGetJacobian | ( | self, | |
fromName, | |||
toName | |||
) |
Test Transform<fromName>To<toName>.getJacobian Parameters ---------- fromName, toName : `str` Endpoint name prefix for "from" and "to" endpoints, respectively, e.g. "Point2" for `lsst.afw.geom.Point2Endpoint`
Definition at line 943 of file testUtils.py.
def lsst.afw.geom.testUtils.TransformTestBaseClass.checkInverseMapping | ( | self, | |
TransformClass, | |||
mapping, | |||
msg | |||
) |
Test Transform<fromName>To<toName>.inverted for a specific mapping. Also check that inverted() and getInverted() return the same transform. Parameters ---------- TransformClass : `type` The class of transform to test, such as TransformPoint2ToPoint2 mapping : `ast.Mapping` The mapping to use for the transform msg : `str` Error message suffix
Definition at line 919 of file testUtils.py.
def lsst.afw.geom.testUtils.TransformTestBaseClass.checkInverseTransformation | ( | self, | |
forward, | |||
inverse, | |||
msg = "" |
|||
) |
Check that two Transforms are each others' inverses. Parameters ---------- forward : `lsst.afw.geom.Transform` the reference Transform to test inverse : `lsst.afw.geom.Transform` the transform that should be the inverse of `forward` msg : `str` error message suffix describing test parameters
Definition at line 699 of file testUtils.py.
def lsst.afw.geom.testUtils.TransformTestBaseClass.checkInverted | ( | self, | |
fromName, | |||
toName | |||
) |
Test Transform<fromName>To<toName>.inverted Parameters ---------- fromName, toName : `str` Endpoint name prefix for "from" and "to" endpoints, respectively, e.g. "Point2" for `lsst.afw.geom.Point2Endpoint`
Definition at line 891 of file testUtils.py.
def lsst.afw.geom.testUtils.TransformTestBaseClass.checkPersistence | ( | self, | |
transform | |||
) |
Check persistence of a transform
Definition at line 1088 of file testUtils.py.
def lsst.afw.geom.testUtils.TransformTestBaseClass.checkThen | ( | self, | |
fromName, | |||
midName, | |||
toName | |||
) |
Test Transform<fromName>To<midName>.then(Transform<midName>To<toName>) Parameters ---------- fromName : `str` the prefix of the starting endpoint (e.g., "Point2" for a Point2Endpoint) for the final, concatenated Transform midName : `str` the prefix for the shared endpoint where two Transforms will be concatenated toName : `str` the prefix of the ending endpoint for the final, concatenated Transform
Definition at line 975 of file testUtils.py.
def lsst.afw.geom.testUtils.TransformTestBaseClass.checkTransformation | ( | self, | |
transform, | |||
mapping, | |||
msg = "" |
|||
) |
Check applyForward and applyInverse for a transform Parameters ---------- transform : `lsst.afw.geom.Transform` The transform to check mapping : `ast.Mapping` The mapping the transform should use. This mapping must contain valid forward or inverse transformations, but they need not match if both present. Hence the mappings returned by make*PolyMap are acceptable. msg : `str` Error message suffix describing test parameters
Definition at line 625 of file testUtils.py.
def lsst.afw.geom.testUtils.TransformTestBaseClass.checkTransformFromFrameSet | ( | self, | |
fromName, | |||
toName | |||
) |
Check Transform_<fromName>_<toName> using the FrameSet constructor Parameters ---------- fromName, toName : `str` Endpoint name prefix for "from" and "to" endpoints, respectively, e.g. "Point2" for `lsst.afw.geom.Point2Endpoint`
Definition at line 819 of file testUtils.py.
def lsst.afw.geom.testUtils.TransformTestBaseClass.checkTransformFromMapping | ( | self, | |
fromName, | |||
toName | |||
) |
Check Transform_<fromName>_<toName> using the Mapping constructor Parameters ---------- fromName, toName : `str` Endpoint name prefix for "from" and "to" endpoints, respectively, e.g. "Point2" for `lsst.afw.geom.Point2Endpoint` fromAxes, toAxes : `int` number of axes in fromFrame and toFrame, respectively
Definition at line 764 of file testUtils.py.
def lsst.afw.geom.testUtils.TransformTestBaseClass.getTestDir | ( | self | ) |
Return a directory where temporary test files can be written The default implementation returns the test directory of the `afw` package. If this class is used by a test in a package other than `afw` then the subclass must override this method.
Definition at line 341 of file testUtils.py.
|
static |
Return a list of 0 or more frames that are not a valid match for the named endpoint Parameters ---------- name : `str` Endpoint class name prefix; the full class name is name + "Endpoint" Returns ------- Collection of `ast.Frame` A collection of 0 or more frames
Definition at line 494 of file testUtils.py.
|
static |
Make an endpoint Parameters ---------- name : `str` Endpoint class name prefix; the full class name is name + "Endpoint" nAxes : `int` or `None`, optional number of axes; an int is required if `name` == "Generic"; otherwise ignored Returns ------- subclass of `lsst.afw.geom.BaseEndpoint` The constructed endpoint Raises ------ TypeError If `name` == "Generic" and `nAxes` is None or <= 0
Definition at line 440 of file testUtils.py.
def lsst.afw.geom.testUtils.TransformTestBaseClass.makeFrameSet | ( | self, | |
baseFrame, | |||
currFrame | |||
) |
Make a FrameSet The FrameSet will contain 4 frames and three transforms connecting them. The idenity of each frame is provided by self.frameIdentDict Frame Index Mapping from this frame to the next `baseFrame` 1 `ast.UnitMap(nIn)` Frame(nIn) 2 `polyMap` Frame(nOut) 3 `ast.UnitMap(nOut)` `currFrame` 4 where: - `nIn` = `baseFrame.nAxes` - `nOut` = `currFrame.nAxes` - `polyMap` = `makeTwoWayPolyMap(nIn, nOut)` Returns ------ `ast.FrameSet` The FrameSet as described above Parameters ---------- baseFrame : `ast.Frame` base frame currFrame : `ast.Frame` current frame
Definition at line 522 of file testUtils.py.
def lsst.afw.geom.testUtils.TransformTestBaseClass.makeGoodFrame | ( | cls, | |
name, | |||
nAxes = None |
|||
) |
Return the appropriate frame for the given name and nAxes Parameters ---------- name : `str` Endpoint class name prefix; the full class name is name + "Endpoint" nAxes : `int` or `None`, optional number of axes; an int is required if `name` == "Generic"; otherwise ignored Returns ------- `ast.Frame` The constructed frame Raises ------ TypeError If `name` == "Generic" and `nAxes` is `None` or <= 0
Definition at line 470 of file testUtils.py.
|
static |
Make a Jacobian matrix for the equation described by `makeTwoWayPolyMap`. Parameters ---------- nIn, nOut : `int` the dimensions of the input and output data; see makeTwoWayPolyMap inPoint : `numpy.ndarray` an array of size `nIn` representing the point at which the Jacobian is measured Returns ------- J : `numpy.ndarray` an `nOut` x `nIn` array of first derivatives
Definition at line 595 of file testUtils.py.
|
static |
Make an array of generic point data The data will be suitable for spherical points Parameters ---------- nPoints : `int` Number of points in the array nAxes : `int` Number of axes in the point Returns ------- np.array of floats with shape (nAxes, nPoints) The values are as follows; if nAxes != 2: The first point has values `[0, delta, 2*delta, ..., (nAxes-1)*delta]` The Nth point has those values + N if nAxes == 2 then the data is scaled so that the max value of axis 1 is a bit less than pi/2
Definition at line 389 of file testUtils.py.
|
static |
Make one generic point Parameters ---------- nAxes : `int` Number of axes in the point delta : `float` Increment between axis values Returns ------- A list of `nAxes` floats with values `[0, delta, ..., (nAxes-1)*delta]
Definition at line 423 of file testUtils.py.
|
static |
Iterator over 0 or more frameSets with SkyFrames axes permuted Only base and current SkyFrames are permuted. If neither the base nor the current frame is a SkyFrame then no frames are returned. Returns ------- iterator over `PermutedFrameSet`
Definition at line 573 of file testUtils.py.
def lsst.afw.geom.testUtils.TransformTestBaseClass.setUp | ( | self | ) |
Set up a test Subclasses should call this method if they override setUp.
Definition at line 352 of file testUtils.py.
lsst.afw.geom.testUtils.TransformTestBaseClass.badNAxes |
Definition at line 374 of file testUtils.py.
lsst.afw.geom.testUtils.TransformTestBaseClass.endpointPrefixes |
Definition at line 362 of file testUtils.py.
lsst.afw.geom.testUtils.TransformTestBaseClass.frameIdentDict |
Definition at line 381 of file testUtils.py.
lsst.afw.geom.testUtils.TransformTestBaseClass.goodNAxes |
Definition at line 366 of file testUtils.py.
lsst.afw.geom.testUtils.TransformTestBaseClass.longMessage |
Definition at line 359 of file testUtils.py.