LSSTApplications
16.0-10-g0ee56ad+5,16.0-11-ga33d1f2+5,16.0-12-g3ef5c14+3,16.0-12-g71e5ef5+18,16.0-12-gbdf3636+3,16.0-13-g118c103+3,16.0-13-g8f68b0a+3,16.0-15-gbf5c1cb+4,16.0-16-gfd17674+3,16.0-17-g7c01f5c+3,16.0-18-g0a50484+1,16.0-20-ga20f992+8,16.0-21-g0e05fd4+6,16.0-21-g15e2d33+4,16.0-22-g62d8060+4,16.0-22-g847a80f+4,16.0-25-gf00d9b8+1,16.0-28-g3990c221+4,16.0-3-gf928089+3,16.0-32-g88a4f23+5,16.0-34-gd7987ad+3,16.0-37-gc7333cb+2,16.0-4-g10fc685+2,16.0-4-g18f3627+26,16.0-4-g5f3a788+26,16.0-5-gaf5c3d7+4,16.0-5-gcc1f4bb+1,16.0-6-g3b92700+4,16.0-6-g4412fcd+3,16.0-6-g7235603+4,16.0-69-g2562ce1b+2,16.0-8-g14ebd58+4,16.0-8-g2df868b+1,16.0-8-g4cec79c+6,16.0-8-gadf6c7a+1,16.0-8-gfc7ad86,16.0-82-g59ec2a54a+1,16.0-9-g5400cdc+2,16.0-9-ge6233d7+5,master-g2880f2d8cf+3,v17.0.rc1
LSSTDataManagementBasePackage
|
Functions | |
def | createTwoFakeCcdImages (num1=4, num2=4, seed=100, fakeCcdId=12, photoCalibMean1=1e-2, photoCalibMean2=1.2e-2) |
def | createFakeCcdImage (butler, visit, num, fluxFieldName, photoCalibMean=1e-2, photoCalibErr=1.0, fakeCcdId=12) |
def | createFakeCatalog (num, bbox, fluxFieldName, skyWcs=None, refCat=False) |
def | fillCatalog (schema, num, bbox, centroidKey, xErrKey, yErrKey, shapeKey, fluxFieldName, skyWcs=None, fluxErrFraction=0.05, refCat=False) |
def | getMeasuredStarsFromCatalog (catalog, pixToFocal) |
def lsst.jointcal.testUtils.createFakeCatalog | ( | num, | |
bbox, | |||
fluxFieldName, | |||
skyWcs = None , |
|||
refCat = False |
|||
) |
Return a fake minimally-useful catalog for jointcal. Parameters ---------- num : `int` Number of sources to put in the catalogs. Should be a square, to have sqrt(num) centroids on a grid. bbox : `lsst.afw.geom.Box2I` Bounding Box of the detector to populate. fluxFieldName : `str` Name of the flux field to populate in the catalog, without `_instFlux` (e.g. "slot_CalibFlux"). skyWcs : `lsst.afw.geom.SkyWcs` or None, optional If supplied, use this to fill in coordinates from centroids. refCat : `bool`, optional Return a ``SimpleCatalog`` so that it behaves like a reference catalog? Returns ------- catalog : `lsst.afw.table.SourceCatalog` A populated source catalog.
Definition at line 154 of file testUtils.py.
def lsst.jointcal.testUtils.createFakeCcdImage | ( | butler, | |
visit, | |||
num, | |||
fluxFieldName, | |||
photoCalibMean = 1e-2 , |
|||
photoCalibErr = 1.0 , |
|||
fakeCcdId = 12 |
|||
) |
Create a fake CcdImage by making a fake catalog. Parameters ---------- butler : `lsst.daf.persistence.Butler` Butler to load metadata from. visit : `int` Visit identifier to build a butler dataId. num : `int` Number of sources to put in the catalogs. Should be a square, to have sqrt(num) centroids on a grid. fluxFieldName : `str` Name of the flux field to populate in the catalog, without `_instFlux` (e.g. "slot_CalibFlux"). photoCalibMean : `float`, optional Value to set for calibrationMean in the created PhotoCalib. Note: this value is 1/instFluxMag0, so it should be less than 1. photoCalibErr : `float`, optional Value to set for calibrationErr in the created PhotoCalib. fakeCcdId : `int`, optional Use this as the ccdId in the returned CcdImage. Returns ------- struct : `lsst.pipe.base.Struct` Result struct with components: - `catalog` : Catalogs containing fake sources (`lsst.afw.table.SourceCatalog`). - `ccdImage` : CcdImage containing the metadata and fake sources (`lsst.jointcal.CcdImage`). - `bbox` : Bounding Box of the image (`lsst.afw.geom.Box2I`).
Definition at line 103 of file testUtils.py.
def lsst.jointcal.testUtils.createTwoFakeCcdImages | ( | num1 = 4 , |
|
num2 = 4 , |
|||
seed = 100 , |
|||
fakeCcdId = 12 , |
|||
photoCalibMean1 = 1e-2 , |
|||
photoCalibMean2 = 1.2e-2 |
|||
) |
Return two fake ccdImages built on CFHT Megacam metadata. If ``num1 == num2``, the catalogs will align on-sky so each source will have a match in the other catalog. This uses the butler dataset stored in `tests/data/cfht_minimal` to bootstrap the metadata. Parameters ---------- num1, num2 : `int`, optional Number of sources to put in the first and second catalogs. Should be a square, to have sqrt(num) centroids on a grid. seed : `int`, optional Seed value for np.random. fakeCcdId : `int`, optional Sensor identifier to use for both CcdImages. The wcs, bbox, calib, etc. will still be drawn from the CFHT ccd=12 files, as that is the only testdata that is included in this simple test dataset. photoCalibMean1, photoCalibMean2: `float`, optional The mean photometric calibration to pass to each ccdImage construction. Note: this value is 1/instFluxMag0, so it should be less than 1. Returns ------- struct : `lsst.pipe.base.Struct` Result struct with components: - `camera` : Camera representing these catalogs (`lsst.afw.cameraGeom.Camera`). - `catalogs` : Catalogs containing fake sources (`list` of `lsst.afw.table.SourceCatalog`). - `ccdImageList` : CcdImages containing the metadata and fake sources (`list` of `lsst.jointcal.CcdImage`). - `bbox` : Bounding Box of the image (`lsst.afw.geom.Box2I`). - 'fluxFieldName' : name of the instFlux field in the catalogs ('str').
Definition at line 38 of file testUtils.py.
def lsst.jointcal.testUtils.fillCatalog | ( | schema, | |
num, | |||
bbox, | |||
centroidKey, | |||
xErrKey, | |||
yErrKey, | |||
shapeKey, | |||
fluxFieldName, | |||
skyWcs = None , |
|||
fluxErrFraction = 0.05 , |
|||
refCat = False |
|||
) |
Return a catalog populated with fake, but reasonable, sources. Centroids are placed on a uniform grid, errors are normally distributed. Parameters ---------- schema : `lsst.afw.table.Schema` Pre-built schema to make the catalog from. num : `int` Number of sources to put in the catalog. bbox : `lsst.afw.geom.Box2I` Bounding box of the ccd to put sources in. centroidKey : `lsst.afw.table.Key` Key for the centroid field to populate. xErrKey : `lsst.afw.table.Key` Key for the xErr field to populate. yErrKey : `lsst.afw.table.Key` Key for the yErr field to populate. shapeKey : `lsst.afw.table.Key` Key for the shape field to populate. fluxFieldName : `str` Name of the flux field to populate in the catalog, without `_instFlux` (e.g. "slot_CalibFlux"). skyWcs : `lsst.afw.geom.SkyWcs` or None, optional If supplied, use this to fill in coordinates from centroids. fluxErrFraction : `float`, optional Fraction of instFlux to use for the instFluxErr. refCat : `bool`, optional Return a ``SimpleCatalog`` so that it behaves like a reference catalog? Returns ------- catalog : `lsst.afw.table.SourceCatalog` The filled catalog.
Definition at line 199 of file testUtils.py.
def lsst.jointcal.testUtils.getMeasuredStarsFromCatalog | ( | catalog, | |
pixToFocal | |||
) |
Return a list of measuredStars built from a catalog. Parameters ---------- catalog : `lsst.afw.table.SourceCatalog` The table to get sources from. pixToFocal : `lsst.afw.geom.TransformPoint2ToPoint2` Transform that goes from pixel to focal plane coordinates, to set the MeasuredStar x/y focal points. Returns ------- stars : `list` of `lsst.jointcal.MeasuredStar` MeasuredStars built from the catalog sources.
Definition at line 274 of file testUtils.py.