lsst.meas.algorithms g4427e4ee63+8d0bacfcb3
Loading...
Searching...
No Matches
Classes | Functions
lsst.meas.algorithms.testUtils Namespace Reference

Classes

class  MockRefcatDataId
 
class  MockReferenceObjectLoaderFromFiles
 
class  MockReferenceObjectLoaderFromMemory
 

Functions

 plantSources (bbox, kwid, sky, coordList, addPoissonNoise=True)
 
 makeRandomTransmissionCurve (rng, minWavelength=4000.0, maxWavelength=7000.0, nWavelengths=200, maxRadius=80.0, nRadii=30, perturb=0.05)
 
 makeDefectList ()
 

Function Documentation

◆ makeDefectList()

lsst.meas.algorithms.testUtils.makeDefectList ( )
Create a list of defects that can be used for testing.

Returns
-------
defectList = `list` [`lsst.meas.algorithms.Defect`]
    The list of defects.

Definition at line 150 of file testUtils.py.

◆ makeRandomTransmissionCurve()

lsst.meas.algorithms.testUtils.makeRandomTransmissionCurve ( rng,
minWavelength = 4000.0,
maxWavelength = 7000.0,
nWavelengths = 200,
maxRadius = 80.0,
nRadii = 30,
perturb = 0.05 )
Create a random TransmissionCurve with nontrivial spatial and
wavelength variation.

Parameters
----------
rng : numpy.random.RandomState
    Random number generator.
minWavelength : float
    Average minimum wavelength for generated TransmissionCurves (will be
    randomly perturbed).
maxWavelength : float
    Average maximum wavelength for generated TransmissionCurves (will be
    randomly perturbed).
nWavelengths : int
    Number of samples in the wavelength dimension.
maxRadius : float
    Average maximum radius for spatial variation (will be perturbed).
nRadii : int
    Number of samples in the radial dimension.
perturb: float
    Fraction by which wavelength and radius bounds should be randomly
    perturbed.

Definition at line 106 of file testUtils.py.

◆ plantSources()

lsst.meas.algorithms.testUtils.plantSources ( bbox,
kwid,
sky,
coordList,
addPoissonNoise = True )
Make an exposure with stars (modelled as Gaussians)

Parameters
----------
bbox : `lsst.geom.Box2I`
    Parent bbox of exposure
kwid : `int`
    Kernal width (and height; kernal is square)
sky : `float`
    Amount of sky background (counts)
coordList : `list [tuple]`
    A list of [x, y, counts, sigma] where:
        * x,y are relative to exposure origin
        * counts is the integrated counts for the star
        * sigma is the Gaussian sigma in pixels
addPoissonNoise : `bool`
    If True: add Poisson noise to the exposure

Definition at line 42 of file testUtils.py.