A simulated dataset consisting of a test image and an associated truth catalog.
More...
|
def | makeMinimalSchema (cls) |
|
def | __init__ (self, bbox, threshold=10.0, exposure=None, kwds) |
| Initialize the dataset. More...
|
|
def | addSource (self, flux, centroid, shape=None) |
| Add a source to the simulation. More...
|
|
def | addBlend (self) |
| Return a context manager that allows a blend of multiple sources to be added. More...
|
|
def | transform (self, wcs, kwds) |
| Create a copy of the dataset transformed to a new WCS, with new Psf and Calib. More...
|
|
def | realize (self, noise, schema) |
| Create a simulated with noise and a simulated post-detection catalog with (Heavy)Footprints. More...
|
|
|
def | makePerturbedWcs (oldWcs, minScaleFactor=1.2, maxScaleFactor=1.5, minRotation=None, maxRotation=None, minRefShift=None, maxRefShift=None, minPixShift=2.0, maxPixShift=4.0) |
| Create a new undistorted TanWcs that is similar but not identical to another, with random scaling, rotation, and offset (in both pixel position and reference position). More...
|
|
def | makeEmptyExposure (bbox, wcs=None, crval=None, cdelt=None, psfSigma=2.0, psfDim=17, fluxMag0=1E12) |
| Create an Exposure, with a Calib, Wcs, and Psf, but no pixel values set. More...
|
|
def | drawGaussian (bbox, flux, ellipse) |
| Create an image of an elliptical Gaussian. More...
|
|
A simulated dataset consisting of a test image and an associated truth catalog.
TestDataset creates an idealized image made of pure Gaussians (including a Gaussian PSF), with simple noise and idealized Footprints/HeavyFootprints that simulated the outputs of detection and deblending. Multiple noise realizations can be created from the same underlying sources, allowing uncertainty estimates to be verified via Monte Carlo.
Typical usage:
bbox = lsst.afw.geom.Box2I(lsst.afw.geom.Point2I(0,0), lsst.afw.geom.Point2I(100, 100))
dataset = TestDataset(bbox)
dataset.addSource(flux=1E5, centroid=lsst.afw.geom.Point2D(25, 26))
dataset.addSource(flux=2E5, centroid=lsst.afw.geom.Point2D(75, 24),
shape=lsst.afw.geom.ellipses.Quadrupole(8, 7, 2))
with dataset.addBlend() as family:
family.addChild(flux=2E5, centroid=lsst.afw.geom.Point2D(50, 72))
family.addChild(flux=1.5E5, centroid=lsst.afw.geom.Point2D(51, 74))
exposure, catalog = dataset.realize(noise=100.0, schema=TestDataset.makeMinimalSchema())
Definition at line 123 of file tests.py.
def lsst.meas.base.tests.TestDataset.makePerturbedWcs |
( |
|
oldWcs, |
|
|
|
minScaleFactor = 1.2 , |
|
|
|
maxScaleFactor = 1.5 , |
|
|
|
minRotation = None , |
|
|
|
maxRotation = None , |
|
|
|
minRefShift = None , |
|
|
|
maxRefShift = None , |
|
|
|
minPixShift = 2.0 , |
|
|
|
maxPixShift = 4.0 |
|
) |
| |
|
static |
Create a new undistorted TanWcs that is similar but not identical to another, with random scaling, rotation, and offset (in both pixel position and reference position).
The maximum and minimum arguments are interpreted as absolute values for a split range that covers both positive and negative values (as this method is used in testing, it is typically most important to avoid perturbations near zero). Scale factors are treated somewhat differently: the actual scale factor is chosen between minScaleFactor and maxScaleFactor OR (1/maxScaleFactor) and (1/minScaleFactor).
The default range for rotation is 30-60 degrees, and the default range for reference shift is 0.5-1.0 arcseconds (these cannot be safely included directly as default values because Angle objects are mutable).
Definition at line 184 of file tests.py.