24 from lsstDebug
import getDebugFrame
27 from lsst.pipe.base import (InitInputDatasetField, InitOutputDatasetField, InputDatasetField,
28 OutputDatasetField, PipelineTaskConfig, PipelineTask)
30 from lsst.meas.astrom import AstrometryTask, displayAstrometry, denormalizeMatches
37 from lsst.meas.base import (SingleFrameMeasurementTask, ApplyApCorrTask,
38 CatalogCalculationTask)
40 from .fakes
import BaseFakeSourcesTask
41 from .photoCal
import PhotoCalTask
43 __all__ = [
"CalibrateConfig",
"CalibrateTask"]
47 """Config for CalibrateTask""" 48 doWrite = pexConfig.Field(
51 doc=
"Save calibration results?",
53 doWriteHeavyFootprintsInSources = pexConfig.Field(
56 doc=
"Include HeavyFootprint data in source table? If false then heavy " 57 "footprints are saved as normal footprints, which saves some space" 59 doWriteMatches = pexConfig.Field(
62 doc=
"Write reference matches (ignored if doWrite false)?",
64 doWriteMatchesDenormalized = pexConfig.Field(
67 doc=(
"Write reference matches in denormalized format? " 68 "This format uses more disk space, but is more convenient to " 69 "read. Ignored if doWriteMatches=False or doWrite=False."),
71 doAstrometry = pexConfig.Field(
74 doc=
"Perform astrometric calibration?",
76 astromRefObjLoader = pexConfig.ConfigurableField(
77 target=LoadIndexedReferenceObjectsTask,
78 doc=
"reference object loader for astrometric calibration",
80 photoRefObjLoader = pexConfig.ConfigurableField(
81 target=LoadIndexedReferenceObjectsTask,
82 doc=
"reference object loader for photometric calibration",
84 astrometry = pexConfig.ConfigurableField(
85 target=AstrometryTask,
86 doc=
"Perform astrometric calibration to refine the WCS",
88 requireAstrometry = pexConfig.Field(
91 doc=(
"Raise an exception if astrometry fails? Ignored if doAstrometry " 94 doPhotoCal = pexConfig.Field(
97 doc=
"Perform phometric calibration?",
99 requirePhotoCal = pexConfig.Field(
102 doc=(
"Raise an exception if photoCal fails? Ignored if doPhotoCal " 105 photoCal = pexConfig.ConfigurableField(
107 doc=
"Perform photometric calibration",
109 icSourceFieldsToCopy = pexConfig.ListField(
111 default=(
"calib_psf_candidate",
"calib_psf_used",
"calib_psf_reserved"),
112 doc=(
"Fields to copy from the icSource catalog to the output catalog " 113 "for matching sources Any missing fields will trigger a " 114 "RuntimeError exception. Ignored if icSourceCat is not provided.")
116 matchRadiusPix = pexConfig.Field(
119 doc=(
"Match radius for matching icSourceCat objects to sourceCat " 122 checkUnitsParseStrict = pexConfig.Field(
123 doc=(
"Strictness of Astropy unit compatibility check, can be 'raise', " 124 "'warn' or 'silent'"),
128 detection = pexConfig.ConfigurableField(
129 target=SourceDetectionTask,
132 doDeblend = pexConfig.Field(
135 doc=
"Run deblender input exposure" 137 deblend = pexConfig.ConfigurableField(
138 target=SourceDeblendTask,
139 doc=
"Split blended sources into their components" 141 measurement = pexConfig.ConfigurableField(
142 target=SingleFrameMeasurementTask,
143 doc=
"Measure sources" 145 doApCorr = pexConfig.Field(
148 doc=
"Run subtask to apply aperture correction" 150 applyApCorr = pexConfig.ConfigurableField(
151 target=ApplyApCorrTask,
152 doc=
"Subtask to apply aperture corrections" 157 catalogCalculation = pexConfig.ConfigurableField(
158 target=CatalogCalculationTask,
159 doc=
"Subtask to run catalogCalculation plugins on catalog" 161 doInsertFakes = pexConfig.Field(
164 doc=
"Run fake sources injection task" 166 insertFakes = pexConfig.ConfigurableField(
167 target=BaseFakeSourcesTask,
168 doc=
"Injection of fake sources for testing purposes (must be " 172 doc=
"Schema produced by characterize image task, used to initialize this task",
174 storageClass=
"SourceCatalog",
177 doc=
"Schema after CalibrateTask has been initialized",
179 storageClass=
"SourceCatalog",
182 doc=
"Input image to calibrate",
184 storageClass=
"ExposureF",
185 dimensions=(
"instrument",
"visit",
"detector"),
189 doc=
"Backgrounds determined by characterize task",
190 name=
"icExpBackground",
191 storageClass=
"Background",
192 dimensions=(
"instrument",
"visit",
"detector"),
196 doc=
"Source catalog created by characterize task",
198 storageClass=
"SourceCatalog",
199 dimensions=(
"instrument",
"visit",
"detector"),
203 doc=
"Reference catalog to use for astrometry",
205 storageClass=
"SimpleCatalog",
206 dimensions=(
"skypix",),
210 doc=
"Reference catalog to use for photometric calibration",
212 storageClass=
"SimpleCatalog",
213 dimensions=(
"skypix",),
217 doc=
"Exposure after running calibration task",
219 storageClass=
"ExposureF",
220 dimensions=(
"instrument",
"visit",
"detector"),
224 doc=
"Source catalog produced in calibrate task",
226 storageClass=
"SourceCatalog",
227 dimensions=(
"instrument",
"visit",
"detector"),
231 doc=
"Background models estimated in calibration task",
232 name=
"calexpBackground",
233 storageClass=
"Background",
234 dimensions=(
"instrument",
"visit",
"detector"),
238 doc=
"Source/refObj matches from the astrometry solver",
240 storageClass=
"Catalog",
241 dimensions=(
"instrument",
"visit",
"detector"),
245 doc=
"Denormalized matches from astrometry solver",
247 storageClass=
"Catalog",
248 dimensions=(
"instrument",
"visit",
"detector"),
252 doWriteExposure = pexConfig.Field(
255 doc=
"Write the calexp? If fakes have been added then we do not want to write out the calexp as a " 256 "normal calexp but as a fakes_calexp." 261 self.quantum.dimensions = (
"instrument",
"visit",
"detector")
273 r"""!Calibrate an exposure: measure sources and perform astrometric and 274 photometric calibration 276 @anchor CalibrateTask_ 278 @section pipe_tasks_calibrate_Contents Contents 280 - @ref pipe_tasks_calibrate_Purpose 281 - @ref pipe_tasks_calibrate_Initialize 282 - @ref pipe_tasks_calibrate_IO 283 - @ref pipe_tasks_calibrate_Config 284 - @ref pipe_tasks_calibrate_Metadata 285 - @ref pipe_tasks_calibrate_Debug 288 @section pipe_tasks_calibrate_Purpose Description 290 Given an exposure with a good PSF model and aperture correction map 291 (e.g. as provided by @ref CharacterizeImageTask), perform the following 293 - Run detection and measurement 294 - Run astrometry subtask to fit an improved WCS 295 - Run photoCal subtask to fit the exposure's photometric zero-point 297 @section pipe_tasks_calibrate_Initialize Task initialisation 299 @copydoc \_\_init\_\_ 301 @section pipe_tasks_calibrate_IO Invoking the Task 303 If you want this task to unpersist inputs or persist outputs, then call 304 the `runDataRef` method (a wrapper around the `run` method). 306 If you already have the inputs unpersisted and do not want to persist the 307 output then it is more direct to call the `run` method: 309 @section pipe_tasks_calibrate_Config Configuration parameters 311 See @ref CalibrateConfig 313 @section pipe_tasks_calibrate_Metadata Quantities set in exposure Metadata 317 <dt>MAGZERO_RMS <dd>MAGZERO's RMS == sigma reported by photoCal task 318 <dt>MAGZERO_NOBJ <dd>Number of stars used == ngood reported by photoCal 320 <dt>COLORTERM1 <dd>?? (always 0.0) 321 <dt>COLORTERM2 <dd>?? (always 0.0) 322 <dt>COLORTERM3 <dd>?? (always 0.0) 325 @section pipe_tasks_calibrate_Debug Debug variables 327 The @link lsst.pipe.base.cmdLineTask.CmdLineTask command line task@endlink 328 interface supports a flag 329 `--debug` to import `debug.py` from your `$PYTHONPATH`; see @ref baseDebug 330 for more about `debug.py`. 332 CalibrateTask has a debug dictionary containing one key: 335 <dd>frame (an int; <= 0 to not display) in which to display the exposure, 336 sources and matches. See @ref lsst.meas.astrom.displayAstrometry for 337 the meaning of the various symbols. 340 For example, put something like: 344 di = lsstDebug.getInfo(name) # N.b. lsstDebug.Info(name) would 345 # call us recursively 346 if name == "lsst.pipe.tasks.calibrate": 353 lsstDebug.Info = DebugInfo 355 into your `debug.py` file and run `calibrateTask.py` with the `--debug` 358 Some subtasks may have their own debug variables; see individual Task 365 ConfigClass = CalibrateConfig
366 _DefaultName =
"calibrate" 367 RunnerClass = pipeBase.ButlerInitializedTaskRunner
369 def __init__(self, butler=None, astromRefObjLoader=None,
370 photoRefObjLoader=None, icSourceSchema=None,
371 initInputs=None, **kwargs):
372 """!Construct a CalibrateTask 374 @param[in] butler The butler is passed to the refObjLoader constructor 375 in case it is needed. Ignored if the refObjLoader argument 376 provides a loader directly. 377 @param[in] astromRefObjLoader An instance of LoadReferenceObjectsTasks 378 that supplies an external reference catalog for astrometric 379 calibration. May be None if the desired loader can be constructed 380 from the butler argument or all steps requiring a reference catalog 382 @param[in] photoRefObjLoader An instance of LoadReferenceObjectsTasks 383 that supplies an external reference catalog for photometric 384 calibration. May be None if the desired loader can be constructed 385 from the butler argument or all steps requiring a reference catalog 387 @param[in] icSourceSchema schema for icSource catalog, or None. 388 Schema values specified in config.icSourceFieldsToCopy will be 389 taken from this schema. If set to None, no values will be 390 propagated from the icSourceCatalog 391 @param[in,out] kwargs other keyword arguments for 392 lsst.pipe.base.CmdLineTask 396 if icSourceSchema
is None and butler
is not None:
398 icSourceSchema = butler.get(
"icSrc_schema", immediate=
True).schema
400 if icSourceSchema
is None and butler
is None and initInputs
is not None:
401 icSourceSchema = initInputs[
'icSourceSchema'].schema
403 if icSourceSchema
is not None:
406 minimumSchema = afwTable.SourceTable.makeMinimalSchema()
407 self.
schemaMapper.addMinimalSchema(minimumSchema,
False)
416 "Source was detected as an icSource"))
417 missingFieldNames = []
418 for fieldName
in self.config.icSourceFieldsToCopy:
420 schemaItem = icSourceSchema.find(fieldName)
422 missingFieldNames.append(fieldName)
427 if missingFieldNames:
428 raise RuntimeError(
"isSourceCat is missing fields {} " 429 "specified in icSourceFieldsToCopy" 430 .
format(missingFieldNames))
437 self.
schema = afwTable.SourceTable.makeMinimalSchema()
438 self.makeSubtask(
'detection', schema=self.
schema)
445 if self.config.doInsertFakes:
446 self.makeSubtask(
"insertFakes")
448 if self.config.doDeblend:
449 self.makeSubtask(
"deblend", schema=self.
schema)
450 self.makeSubtask(
'measurement', schema=self.
schema,
452 if self.config.doApCorr:
453 self.makeSubtask(
'applyApCorr', schema=self.
schema)
454 self.makeSubtask(
'catalogCalculation', schema=self.
schema)
456 if self.config.doAstrometry:
457 if astromRefObjLoader
is None and butler
is not None:
458 self.makeSubtask(
'astromRefObjLoader', butler=butler)
459 astromRefObjLoader = self.astromRefObjLoader
461 self.makeSubtask(
"astrometry", refObjLoader=astromRefObjLoader,
463 if self.config.doPhotoCal:
464 if photoRefObjLoader
is None and butler
is not None:
465 self.makeSubtask(
'photoRefObjLoader', butler=butler)
466 photoRefObjLoader = self.photoRefObjLoader
467 self.
pixelMargin = photoRefObjLoader.config.pixelMargin
468 self.makeSubtask(
"photoCal", refObjLoader=photoRefObjLoader,
471 if initInputs
is not None and (astromRefObjLoader
is not None or photoRefObjLoader
is not None):
472 raise RuntimeError(
"PipelineTask form of this task should not be initialized with " 473 "reference object loaders.")
478 self.
schema.checkUnits(parse_strict=self.config.checkUnitsParseStrict)
483 return {
'outputSchema': sourceCatSchema}
488 if config.doWriteMatches
is False:
489 outputTypesDict.pop(
"matches")
490 if config.doWriteMatchesDenormalized
is False:
491 outputTypesDict.pop(
"matchesDenormalized")
492 return outputTypesDict
496 return frozenset([
"astromRefCat",
"photoRefCat"])
499 def runDataRef(self, dataRef, exposure=None, background=None, icSourceCat=None,
501 """!Calibrate an exposure, optionally unpersisting inputs and 504 This is a wrapper around the `run` method that unpersists inputs 505 (if `doUnpersist` true) and persists outputs (if `config.doWrite` true) 507 @param[in] dataRef butler data reference corresponding to a science 509 @param[in,out] exposure characterized exposure (an 510 lsst.afw.image.ExposureF or similar), or None to unpersist existing 511 icExp and icBackground. See `run` method for details of what is 513 @param[in,out] background initial model of background already 514 subtracted from exposure (an lsst.afw.math.BackgroundList). May be 515 None if no background has been subtracted, though that is unusual 516 for calibration. A refined background model is output. Ignored if 518 @param[in] icSourceCat catalog from which to copy the fields specified 519 by icSourceKeys, or None; 520 @param[in] doUnpersist unpersist data: 521 - if True, exposure, background and icSourceCat are read from 522 dataRef and those three arguments must all be None; 523 - if False the exposure must be provided; background and 524 icSourceCat are optional. True is intended for running as a 525 command-line task, False for running as a subtask 526 @return same data as the calibrate method 528 self.log.
info(
"Processing %s" % (dataRef.dataId))
531 if any(item
is not None for item
in (exposure, background,
533 raise RuntimeError(
"doUnpersist true; exposure, background " 534 "and icSourceCat must all be None")
535 exposure = dataRef.get(
"icExp", immediate=
True)
536 background = dataRef.get(
"icExpBackground", immediate=
True)
537 icSourceCat = dataRef.get(
"icSrc", immediate=
True)
538 elif exposure
is None:
539 raise RuntimeError(
"doUnpersist false; exposure must be provided")
541 exposureIdInfo = dataRef.get(
"expIdInfo")
545 exposureIdInfo=exposureIdInfo,
546 background=background,
547 icSourceCat=icSourceCat,
550 if self.config.doWrite:
553 exposure=calRes.exposure,
554 background=calRes.background,
555 sourceCat=calRes.sourceCat,
556 astromMatches=calRes.astromMatches,
557 matchMeta=calRes.matchMeta,
563 expId, expBits = butler.registry.packDataId(
"visit_detector",
564 inputDataIds[
'exposure'],
568 if self.config.doAstrometry:
571 config=self.config.astromRefObjLoader,
574 self.astrometry.setRefObjLoader(refObjLoader)
576 if self.config.doPhotoCal:
579 self.config.photoRefObjLoader,
581 self.
pixelMargin = photoRefObjLoader.config.pixelMargin
582 self.photoCal.match.setRefObjLoader(photoRefObjLoader)
584 results = self.
run(**inputData)
586 if self.config.doWriteMatches:
588 normalizedMatches.table.setMetadata(results.matchMeta)
589 if self.config.doWriteMatchesDenormalized:
591 results.matchesDenormalized = denormMatches
592 results.matches = normalizedMatches
595 def run(self, exposure, exposureIdInfo=None, background=None,
597 """!Calibrate an exposure (science image or coadd) 599 @param[in,out] exposure exposure to calibrate (an 600 lsst.afw.image.ExposureF or similar); 605 - MaskedImage has background subtracted 607 - PhotoCalib is replaced 608 @param[in] exposureIdInfo ID info for exposure (an 609 lsst.obs.base.ExposureIdInfo) If not provided, returned 610 SourceCatalog IDs will not be globally unique. 611 @param[in,out] background background model already subtracted from 612 exposure (an lsst.afw.math.BackgroundList). May be None if no 613 background has been subtracted, though that is unusual for 614 calibration. A refined background model is output. 615 @param[in] icSourceCat A SourceCatalog from CharacterizeImageTask 616 from which we can copy some fields. 618 @return pipe_base Struct containing these fields: 619 - exposure calibrate science exposure with refined WCS and PhotoCalib 620 - background model of background subtracted from exposure (an 621 lsst.afw.math.BackgroundList) 622 - sourceCat catalog of measured sources 623 - astromMatches list of source/refObj matches from the astrometry 627 if exposureIdInfo
is None:
630 if background
is None:
632 sourceIdFactory = IdFactory.makeSource(exposureIdInfo.expId,
633 exposureIdInfo.unusedBits)
634 table = SourceTable.make(self.
schema, sourceIdFactory)
637 detRes = self.detection.
run(table=table, exposure=exposure,
639 sourceCat = detRes.sources
640 if detRes.fpSets.background:
641 for bg
in detRes.fpSets.background:
642 background.append(bg)
643 if self.config.doDeblend:
644 self.deblend.
run(exposure=exposure, sources=sourceCat)
645 self.measurement.
run(
648 exposureId=exposureIdInfo.expId
650 if self.config.doApCorr:
651 self.applyApCorr.
run(
653 apCorrMap=exposure.getInfo().getApCorrMap()
655 self.catalogCalculation.
run(sourceCat)
657 if icSourceCat
is not None and \
658 len(self.config.icSourceFieldsToCopy) > 0:
666 if not sourceCat.isContiguous():
667 sourceCat = sourceCat.copy(deep=
True)
673 if self.config.doAstrometry:
675 astromRes = self.astrometry.
run(
679 astromMatches = astromRes.matches
680 matchMeta = astromRes.matchMeta
681 except Exception
as e:
682 if self.config.requireAstrometry:
684 self.log.
warn(
"Unable to perform astrometric calibration " 685 "(%s): attempting to proceed" % e)
688 if self.config.doPhotoCal:
690 photoRes = self.photoCal.
run(exposure, sourceCat=sourceCat, expId=exposureIdInfo.expId)
691 exposure.setPhotoCalib(photoRes.photoCalib)
693 self.log.
info(
"Photometric zero-point: %f" %
694 photoRes.photoCalib.instFluxToMagnitude(1.0))
695 self.
setMetadata(exposure=exposure, photoRes=photoRes)
696 except Exception
as e:
697 if self.config.requirePhotoCal:
699 self.log.
warn(
"Unable to perform photometric calibration " 700 "(%s): attempting to proceed" % e)
703 if self.config.doInsertFakes:
704 self.insertFakes.
run(exposure, background=background)
706 table = SourceTable.make(self.
schema, sourceIdFactory)
709 detRes = self.detection.
run(table=table, exposure=exposure,
711 sourceCat = detRes.sources
712 if detRes.fpSets.background:
713 for bg
in detRes.fpSets.background:
714 background.append(bg)
715 if self.config.doDeblend:
716 self.deblend.
run(exposure=exposure, sources=sourceCat)
717 self.measurement.
run(
720 exposureId=exposureIdInfo.expId
722 if self.config.doApCorr:
723 self.applyApCorr.
run(
725 apCorrMap=exposure.getInfo().getApCorrMap()
727 self.catalogCalculation.
run(sourceCat)
729 if icSourceCat
is not None and \
730 len(self.config.icSourceFieldsToCopy) > 0:
739 matches=astromMatches,
744 return pipeBase.Struct(
746 background=background,
748 astromMatches=astromMatches,
752 outputExposure=exposure,
754 outputBackground=background,
757 def writeOutputs(self, dataRef, exposure, background, sourceCat,
758 astromMatches, matchMeta):
759 """Write output data to the output repository 761 @param[in] dataRef butler data reference corresponding to a science 763 @param[in] exposure exposure to write 764 @param[in] background background model for exposure 765 @param[in] sourceCat catalog of measured sources 766 @param[in] astromMatches list of source/refObj matches from the 769 dataRef.put(sourceCat,
"src")
770 if self.config.doWriteMatches
and astromMatches
is not None:
772 normalizedMatches.table.setMetadata(matchMeta)
773 dataRef.put(normalizedMatches,
"srcMatch")
774 if self.config.doWriteMatchesDenormalized:
776 dataRef.put(denormMatches,
"srcMatchFull")
777 if self.config.doWriteExposure:
778 dataRef.put(exposure,
"calexp")
779 dataRef.put(background,
"calexpBackground")
782 """Return a dict of empty catalogs for each catalog dataset produced 787 return {
"src": sourceCat}
790 """!Set task and exposure metadata 792 Logs a warning and continues if needed data is missing. 794 @param[in,out] exposure exposure whose metadata is to be set 795 @param[in] photoRes results of running photoCal; if None then it was 803 exposureTime = exposure.getInfo().getVisitInfo().getExposureTime()
804 magZero = photoRes.zp - 2.5*math.log10(exposureTime)
805 self.metadata.
set(
'MAGZERO', magZero)
807 self.log.
warn(
"Could not set normalized MAGZERO in header: no " 811 metadata = exposure.getMetadata()
812 metadata.set(
'MAGZERO_RMS', photoRes.sigma)
813 metadata.set(
'MAGZERO_NOBJ', photoRes.ngood)
814 metadata.set(
'COLORTERM1', 0.0)
815 metadata.set(
'COLORTERM2', 0.0)
816 metadata.set(
'COLORTERM3', 0.0)
817 except Exception
as e:
818 self.log.
warn(
"Could not set exposure metadata: %s" % (e,))
821 """!Match sources in icSourceCat and sourceCat and copy the specified fields 823 @param[in] icSourceCat catalog from which to copy fields 824 @param[in,out] sourceCat catalog to which to copy fields 826 The fields copied are those specified by `config.icSourceFieldsToCopy` 827 that actually exist in the schema. This was set up by the constructor 828 using self.schemaMapper. 831 raise RuntimeError(
"To copy icSource fields you must specify " 832 "icSourceSchema nd icSourceKeys when " 833 "constructing this task")
834 if icSourceCat
is None or sourceCat
is None:
835 raise RuntimeError(
"icSourceCat and sourceCat must both be " 837 if len(self.config.icSourceFieldsToCopy) == 0:
838 self.log.
warn(
"copyIcSourceFields doing nothing because " 839 "icSourceFieldsToCopy is empty")
843 mc.findOnlyClosest =
False 845 self.config.matchRadiusPix, mc)
846 if self.config.doDeblend:
847 deblendKey = sourceCat.schema[
"deblend_nChild"].asKey()
849 matches = [m
for m
in matches
if m[1].get(deblendKey) == 0]
856 for m0, m1, d
in matches:
858 match = bestMatches.get(id0)
859 if match
is None or d <= match[2]:
860 bestMatches[id0] = (m0, m1, d)
861 matches =
list(bestMatches.values())
866 numMatches = len(matches)
867 numUniqueSources = len(
set(m[1].getId()
for m
in matches))
868 if numUniqueSources != numMatches:
869 self.log.
warn(
"{} icSourceCat sources matched only {} sourceCat " 870 "sources".
format(numMatches, numUniqueSources))
872 self.log.
info(
"Copying flags from icSourceCat to sourceCat for " 873 "%s sources" % (numMatches,))
877 for icSrc, src, d
in matches:
883 icSrcFootprint = icSrc.getFootprint()
885 icSrc.setFootprint(src.getFootprint())
888 icSrc.setFootprint(icSrcFootprint)
def copyIcSourceFields(self, icSourceCat, sourceCat)
Match sources in icSourceCat and sourceCat and copy the specified fields.
def __init__(self, butler=None, astromRefObjLoader=None, photoRefObjLoader=None, icSourceSchema=None, initInputs=None, kwargs)
Construct a CalibrateTask.
def InitOutputDatasetField
def getPrerequisiteDatasetTypes(cls, config)
def run(self, exposure, exposureIdInfo=None, background=None, icSourceCat=None)
Calibrate an exposure (science image or coadd)
Class for storing ordered metadata with comments.
A mapping between the keys of two Schemas, used to copy data between them.
def denormalizeMatches(matches, matchMeta=None)
Fit spatial kernel using approximate fluxes for candidates, and solving a linear system of equations...
daf::base::PropertySet * set
def writeOutputs(self, dataRef, exposure, background, sourceCat, astromMatches, matchMeta)
bool any(CoordinateExpr< N > const &expr) noexcept
Return true if any elements are true.
def adaptArgsAndRun(self, inputData, inputDataIds, outputDataIds, butler)
Pass parameters to algorithms that match list of sources.
def format(config, name=None, writeSourceLine=True, prefix="", verbose=False)
template BaseCatalog packMatches(SourceMatchVector const &)
A description of a field in a table.
def setMetadata(self, exposure, photoRes=None)
Set task and exposure metadata.
def displayAstrometry(refCat=None, sourceCat=None, distortedCentroidKey=None, bbox=None, exposure=None, matches=None, frame=1, title="", pause=True)
def getDebugFrame(debugDisplay, name)
def getSchemaCatalogs(self)
def getInitOutputDatasets(self)
def InitInputDatasetField
SourceMatchVector matchXy(SourceCatalog const &cat, double radius, bool symmetric)
Compute all tuples (s1,s2,d) where s1 != s2, s1 and s2 both belong to cat, and d, the distance betwee...
def getOutputDatasetTypes(cls, config)
def runDataRef(self, dataRef, exposure=None, background=None, icSourceCat=None, doUnpersist=True)
Calibrate an exposure, optionally unpersisting inputs and persisting outputs.
daf::base::PropertyList * list
Calibrate an exposure: measure sources and perform astrometric and photometric calibration.