LSST Applications  21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
Public Member Functions | Static Public Attributes | List of all members
lsst.jointcal.jointcal.JointcalConfig Class Reference
Inheritance diagram for lsst.jointcal.jointcal.JointcalConfig:
lsst.jointcal.jointcal.JointcalTaskConnections

Public Member Functions

def validate (self)
 
def setDefaults (self)
 

Static Public Attributes

 doAstrometry
 
 doPhotometry
 
 coaddName
 
 sourceFluxType
 
 positionErrorPedestal
 
 photometryErrorPedestal
 
 matchCut
 
 minMeasurements
 
 minMeasuredStarsPerCcd
 
 minRefStarsPerCcd
 
 allowLineSearch
 
 astrometrySimpleOrder
 
 astrometryChipOrder
 
 astrometryVisitOrder
 
 useInputWcs
 
 astrometryModel
 
 photometryModel
 
 applyColorTerms
 
 colorterms
 
 photometryVisitOrder
 
 photometryDoRankUpdate
 
 astrometryDoRankUpdate
 
 outlierRejectSigma
 
 astrometryOutlierRelativeTolerance
 
 maxPhotometrySteps
 
 maxAstrometrySteps
 
 astrometryRefObjLoader
 
 photometryRefObjLoader
 
 sourceSelector
 
 astrometryReferenceSelector
 
 photometryReferenceSelector
 
 astrometryReferenceErr
 
 writeInitMatrix
 
 writeChi2FilesInitialFinal
 
 writeChi2FilesOuterLoop
 
 writeInitialModel
 
 debugOutputPath
 
 detailedProfile
 
 inputCamera
 
 inputSourceTableVisit
 
 inputVisitSummary
 
 astrometryRefCat
 
 photometryRefCat
 
 outputWcs
 
 outputPhotoCalib
 
 doc
 
 name
 
 storageClass
 
 dimensions
 

Detailed Description

Configuration for JointcalTask

Definition at line 359 of file jointcal.py.

Member Function Documentation

◆ setDefaults()

def lsst.jointcal.jointcal.JointcalConfig.setDefaults (   self)

Definition at line 594 of file jointcal.py.

594  def setDefaults(self):
595  # Use science source selector which can filter on extendedness, SNR, and whether blended
596  self.sourceSelector.name = 'science'
597  # Use only stars because aperture fluxes of galaxies are biased and depend on seeing
598  self.sourceSelector['science'].doUnresolved = True
599  # with dependable signal to noise ratio.
600  self.sourceSelector['science'].doSignalToNoise = True
601  # Min SNR must be > 0 because jointcal cannot handle negative fluxes,
602  # and S/N > 10 to use sources that are not too faint, and thus better measured.
603  self.sourceSelector['science'].signalToNoise.minimum = 10.
604  # Base SNR on CalibFlux because that is the flux jointcal that fits and must be positive
605  fluxField = f"slot_{self.sourceFluxType}Flux_instFlux"
606  self.sourceSelector['science'].signalToNoise.fluxField = fluxField
607  self.sourceSelector['science'].signalToNoise.errField = fluxField + "Err"
608  # Do not trust blended sources' aperture fluxes which also depend on seeing
609  self.sourceSelector['science'].doIsolated = True
610  # Do not trust either flux or centroid measurements with flags,
611  # chosen from the usual QA flags for stars)
612  self.sourceSelector['science'].doFlags = True
613  badFlags = ['base_PixelFlags_flag_edge', 'base_PixelFlags_flag_saturated',
614  'base_PixelFlags_flag_interpolatedCenter', 'base_SdssCentroid_flag',
615  'base_PsfFlux_flag', 'base_PixelFlags_flag_suspectCenter']
616  self.sourceSelector['science'].flags.bad = badFlags
617 
618  # Default to Gaia-DR2 (with proper motions) for astrometry and
619  # PS1-DR1 for photometry, with a reasonable initial filterMap.
620  self.astrometryRefObjLoader.ref_dataset_name = "gaia_dr2_20200414"
621  self.astrometryRefObjLoader.requireProperMotion = True
622  self.astrometryRefObjLoader.anyFilterMapsToThis = 'phot_g_mean'
623  self.photometryRefObjLoader.ref_dataset_name = "ps1_pv3_3pi_20170110"
624 
625 

◆ validate()

def lsst.jointcal.jointcal.JointcalConfig.validate (   self)

Definition at line 584 of file jointcal.py.

584  def validate(self):
585  super().validate()
586  if self.doPhotometry and self.applyColorTerms and len(self.colorterms.data) == 0:
587  msg = "applyColorTerms=True requires the `colorterms` field be set to a ColortermLibrary."
588  raise pexConfig.FieldValidationError(JointcalConfig.colorterms, self, msg)
589  if self.doAstrometry and not self.doPhotometry and self.applyColorTerms:
590  msg = ("Only doing astrometry, but Colorterms are not applied for astrometry;"
591  "applyColorTerms=True will be ignored.")
592  lsst.log.warning(msg)
593 

Member Data Documentation

◆ allowLineSearch

lsst.jointcal.jointcal.JointcalConfig.allowLineSearch
static
Initial value:
= pexConfig.Field(
doc="Allow a line search during minimization, if it is reasonable for the model"
" (models with a significant non-linear component, e.g. constrainedPhotometry).",
dtype=bool,
default=False
)

Definition at line 416 of file jointcal.py.

◆ applyColorTerms

lsst.jointcal.jointcal.JointcalConfig.applyColorTerms
static
Initial value:
= pexConfig.Field(
doc="Apply photometric color terms to reference stars?"
"Requires that colorterms be set to a ColortermLibrary",
dtype=bool,
default=False
)

Definition at line 462 of file jointcal.py.

◆ astrometryChipOrder

lsst.jointcal.jointcal.JointcalConfig.astrometryChipOrder
static
Initial value:
= pexConfig.Field(
doc="Order of the per-chip transform for the constrained astrometry model.",
dtype=int,
default=1,
)

Definition at line 427 of file jointcal.py.

◆ astrometryDoRankUpdate

lsst.jointcal.jointcal.JointcalConfig.astrometryDoRankUpdate
static
Initial value:
= pexConfig.Field(
doc=("Do the rank update step during minimization (should not change the astrometry fit). "
"Skipping this can help deal with models that are too non-linear."),
dtype=bool,
default=True,
)

Definition at line 483 of file jointcal.py.

◆ astrometryModel

lsst.jointcal.jointcal.JointcalConfig.astrometryModel
static
Initial value:
= pexConfig.ChoiceField(
doc="Type of model to fit to astrometry",
dtype=str,
default="constrained",
allowed={"simple": "One polynomial per ccd",
"constrained": "One polynomial per ccd, and one polynomial per visit"}
)

Definition at line 442 of file jointcal.py.

◆ astrometryOutlierRelativeTolerance

lsst.jointcal.jointcal.JointcalConfig.astrometryOutlierRelativeTolerance
static
Initial value:
= pexConfig.Field(
doc=("Convergence tolerance for outlier rejection threshold when fitting astrometry. Iterations will "
"stop when the fractional change in the chi2 cut level is below this value. If tolerance is set "
"to zero, iterations will continue until there are no more outliers. We suggest a value of 0.002"
"as a balance between a shorter minimization runtime and achieving a final fitted model that is"
"close to the solution found when removing all outliers."),
dtype=float,
default=0,
)

Definition at line 494 of file jointcal.py.

◆ astrometryRefCat

lsst.jointcal.jointcal.JointcalTaskConnections.astrometryRefCat
staticinherited
Initial value:
= pipeBase.connectionTypes.PrerequisiteInput(
doc="The astrometry reference catalog to match to loaded input catalog sources.",
name="gaia_dr2_20200414",
storageClass="SimpleCatalog",
dimensions=("skypix",),
deferLoad=True,
multiple=True,
lookupFunction=lookupVisitRefCats,
)

Definition at line 251 of file jointcal.py.

◆ astrometryReferenceErr

lsst.jointcal.jointcal.JointcalConfig.astrometryReferenceErr
static
Initial value:
= pexConfig.Field(
doc=("Uncertainty on reference catalog coordinates [mas] to use in place of the `coord_*Err` fields. "
"If None, then raise an exception if the reference catalog is missing coordinate errors. "
"If specified, overrides any existing `coord_*Err` values."),
dtype=float,
default=None,
optional=True
)

Definition at line 533 of file jointcal.py.

◆ astrometryReferenceSelector

lsst.jointcal.jointcal.JointcalConfig.astrometryReferenceSelector
static
Initial value:
= pexConfig.ConfigurableField(
target=ReferenceSourceSelectorTask,
doc="How to down-select the loaded astrometry reference catalog.",
)

Definition at line 525 of file jointcal.py.

◆ astrometryRefObjLoader

lsst.jointcal.jointcal.JointcalConfig.astrometryRefObjLoader
static
Initial value:
= pexConfig.ConfigurableField(
target=LoadIndexedReferenceObjectsTask,
doc="Reference object loader for astrometric fit",
)

Definition at line 513 of file jointcal.py.

◆ astrometrySimpleOrder

lsst.jointcal.jointcal.JointcalConfig.astrometrySimpleOrder
static
Initial value:
= pexConfig.Field(
doc="Polynomial order for fitting the simple astrometry model.",
dtype=int,
default=3,
)

Definition at line 422 of file jointcal.py.

◆ astrometryVisitOrder

lsst.jointcal.jointcal.JointcalConfig.astrometryVisitOrder
static
Initial value:
= pexConfig.Field(
doc="Order of the per-visit transform for the constrained astrometry model.",
dtype=int,
default=5,
)

Definition at line 432 of file jointcal.py.

◆ coaddName

lsst.jointcal.jointcal.JointcalConfig.coaddName
static
Initial value:
= pexConfig.Field(
doc="Type of coadd, typically deep or goodSeeing",
dtype=str,
default="deep"
)

Definition at line 373 of file jointcal.py.

◆ colorterms

lsst.jointcal.jointcal.JointcalConfig.colorterms
static
Initial value:
= pexConfig.ConfigField(
doc="Library of photometric reference catalog name to color term dict.",
dtype=ColortermLibrary,
)

Definition at line 468 of file jointcal.py.

◆ debugOutputPath

lsst.jointcal.jointcal.JointcalConfig.debugOutputPath
static
Initial value:
= pexConfig.Field(
dtype=str,
default=".",
doc=("Path to write debug output files to. Used by "
"`writeInitialModel`, `writeChi2Files*`, `writeInitMatrix`.")
)

Definition at line 572 of file jointcal.py.

◆ detailedProfile

lsst.jointcal.jointcal.JointcalConfig.detailedProfile
static
Initial value:
= pexConfig.Field(
dtype=bool,
default=False,
doc="Output separate profiling information for different parts of jointcal, e.g. data read, fitting"
)

Definition at line 578 of file jointcal.py.

◆ dimensions

lsst.jointcal.jointcal.JointcalTaskConnections.dimensions
staticinherited

Definition at line 298 of file jointcal.py.

◆ doAstrometry

lsst.jointcal.jointcal.JointcalConfig.doAstrometry
static
Initial value:
= pexConfig.Field(
doc="Fit astrometry and write the fitted result.",
dtype=bool,
default=True
)

Definition at line 363 of file jointcal.py.

◆ doc

lsst.jointcal.jointcal.JointcalTaskConnections.doc
staticinherited

Definition at line 295 of file jointcal.py.

◆ doPhotometry

lsst.jointcal.jointcal.JointcalConfig.doPhotometry
static
Initial value:
= pexConfig.Field(
doc="Fit photometry and write the fitted result.",
dtype=bool,
default=True
)

Definition at line 368 of file jointcal.py.

◆ inputCamera

lsst.jointcal.jointcal.JointcalTaskConnections.inputCamera
staticinherited
Initial value:
= pipeBase.connectionTypes.PrerequisiteInput(
doc="The camera instrument that took these observations.",
name="camera",
storageClass="Camera",
dimensions=("instrument",),
isCalibration=True,
lookupFunction=lookupStaticCalibrations,
)

Definition at line 225 of file jointcal.py.

◆ inputSourceTableVisit

lsst.jointcal.jointcal.JointcalTaskConnections.inputSourceTableVisit
staticinherited
Initial value:
= pipeBase.connectionTypes.Input(
doc="Source table in parquet format, per visit",
name="sourceTable_visit",
storageClass="DataFrame",
dimensions=("instrument", "visit"),
deferLoad=True,
multiple=True,
)

Definition at line 233 of file jointcal.py.

◆ inputVisitSummary

lsst.jointcal.jointcal.JointcalTaskConnections.inputVisitSummary
staticinherited
Initial value:
= pipeBase.connectionTypes.Input(
doc=("Per-visit consolidated exposure metadata built from calexps. "
"These catalogs use detector id for the id and must be sorted for "
"fast lookups of a detector."),
name="visitSummary",
storageClass="ExposureCatalog",
dimensions=("instrument", "visit"),
deferLoad=True,
multiple=True,
)

Definition at line 241 of file jointcal.py.

◆ matchCut

lsst.jointcal.jointcal.JointcalConfig.matchCut
static
Initial value:
= pexConfig.Field(
doc="Matching radius between fitted and reference stars (arcseconds)",
dtype=float,
default=3.0,
)

Definition at line 396 of file jointcal.py.

◆ maxAstrometrySteps

lsst.jointcal.jointcal.JointcalConfig.maxAstrometrySteps
static
Initial value:
= pexConfig.Field(
doc="Maximum number of minimize iterations to take when fitting astrometry.",
dtype=int,
default=20,
)

Definition at line 508 of file jointcal.py.

◆ maxPhotometrySteps

lsst.jointcal.jointcal.JointcalConfig.maxPhotometrySteps
static
Initial value:
= pexConfig.Field(
doc="Maximum number of minimize iterations to take when fitting photometry.",
dtype=int,
default=20,
)

Definition at line 503 of file jointcal.py.

◆ minMeasuredStarsPerCcd

lsst.jointcal.jointcal.JointcalConfig.minMeasuredStarsPerCcd
static
Initial value:
= pexConfig.Field(
doc="Minimum number of measuredStars per ccdImage before printing warnings",
dtype=int,
default=100,
)

Definition at line 406 of file jointcal.py.

◆ minMeasurements

lsst.jointcal.jointcal.JointcalConfig.minMeasurements
static
Initial value:
= pexConfig.Field(
doc="Minimum number of associated measured stars for a fitted star to be included in the fit",
dtype=int,
default=2,
)

Definition at line 401 of file jointcal.py.

◆ minRefStarsPerCcd

lsst.jointcal.jointcal.JointcalConfig.minRefStarsPerCcd
static
Initial value:
= pexConfig.Field(
doc="Minimum number of measuredStars per ccdImage before printing warnings",
dtype=int,
default=30,
)

Definition at line 411 of file jointcal.py.

◆ name

lsst.jointcal.jointcal.JointcalTaskConnections.name
staticinherited

Definition at line 296 of file jointcal.py.

◆ outlierRejectSigma

lsst.jointcal.jointcal.JointcalConfig.outlierRejectSigma
static
Initial value:
= pexConfig.Field(
doc="How many sigma to reject outliers at during minimization.",
dtype=float,
default=5.0,
)

Definition at line 489 of file jointcal.py.

◆ outputPhotoCalib

lsst.jointcal.jointcal.JointcalTaskConnections.outputPhotoCalib
staticinherited
Initial value:
= pipeBase.connectionTypes.Output(
doc=("Per-tract, per-visit photometric calibrations derived from the fitted model."
" These catalogs only contain entries for detectors with an output, and use"
" the detector id for the catalog id, sorted on id for fast lookups of a detector."),
name="jointcalPhotoCalibCatalog",
storageClass="ExposureCatalog",
dimensions=("instrument", "visit", "skymap", "tract"),
multiple=True
)

Definition at line 279 of file jointcal.py.

◆ outputWcs

lsst.jointcal.jointcal.JointcalTaskConnections.outputWcs
staticinherited
Initial value:
= pipeBase.connectionTypes.Output(
doc=("Per-tract, per-visit world coordinate systems derived from the fitted model."
" These catalogs only contain entries for detectors with an output, and use"
" the detector id for the catalog id, sorted on id for fast lookups of a detector."),
name="jointcalSkyWcsCatalog",
storageClass="ExposureCatalog",
dimensions=("instrument", "visit", "skymap", "tract"),
multiple=True
)

Definition at line 270 of file jointcal.py.

◆ photometryDoRankUpdate

lsst.jointcal.jointcal.JointcalConfig.photometryDoRankUpdate
static
Initial value:
= pexConfig.Field(
doc=("Do the rank update step during minimization. "
"Skipping this can help deal with models that are too non-linear."),
dtype=bool,
default=True,
)

Definition at line 477 of file jointcal.py.

◆ photometryErrorPedestal

lsst.jointcal.jointcal.JointcalConfig.photometryErrorPedestal
static
Initial value:
= pexConfig.Field(
doc="Systematic term to apply to the measured error on flux or magnitude as a "
"fraction of source flux or magnitude delta (e.g. 0.05 is 5% of flux or +50 millimag).",
dtype=float,
default=0.0,
)

Definition at line 389 of file jointcal.py.

◆ photometryModel

lsst.jointcal.jointcal.JointcalConfig.photometryModel
static
Initial value:
= pexConfig.ChoiceField(
doc="Type of model to fit to photometry",
dtype=str,
default="constrainedMagnitude",
allowed={"simpleFlux": "One constant zeropoint per ccd and visit, fitting in flux space.",
"constrainedFlux": "Constrained zeropoint per ccd, and one polynomial per visit,"
" fitting in flux space.",
"simpleMagnitude": "One constant zeropoint per ccd and visit,"
" fitting in magnitude space.",
"constrainedMagnitude": "Constrained zeropoint per ccd, and one polynomial per visit,"
" fitting in magnitude space.",
}
)

Definition at line 449 of file jointcal.py.

◆ photometryRefCat

lsst.jointcal.jointcal.JointcalTaskConnections.photometryRefCat
staticinherited
Initial value:
= pipeBase.connectionTypes.PrerequisiteInput(
doc="The photometry reference catalog to match to loaded input catalog sources.",
name="ps1_pv3_3pi_20170110",
storageClass="SimpleCatalog",
dimensions=("skypix",),
deferLoad=True,
multiple=True,
lookupFunction=lookupVisitRefCats,
)

Definition at line 260 of file jointcal.py.

◆ photometryReferenceSelector

lsst.jointcal.jointcal.JointcalConfig.photometryReferenceSelector
static
Initial value:
= pexConfig.ConfigurableField(
target=ReferenceSourceSelectorTask,
doc="How to down-select the loaded photometry reference catalog.",
)

Definition at line 529 of file jointcal.py.

◆ photometryRefObjLoader

lsst.jointcal.jointcal.JointcalConfig.photometryRefObjLoader
static
Initial value:
= pexConfig.ConfigurableField(
target=LoadIndexedReferenceObjectsTask,
doc="Reference object loader for photometric fit",
)

Definition at line 517 of file jointcal.py.

◆ photometryVisitOrder

lsst.jointcal.jointcal.JointcalConfig.photometryVisitOrder
static
Initial value:
= pexConfig.Field(
doc="Order of the per-visit polynomial transform for the constrained photometry model.",
dtype=int,
default=7,
)

Definition at line 472 of file jointcal.py.

◆ positionErrorPedestal

lsst.jointcal.jointcal.JointcalConfig.positionErrorPedestal
static
Initial value:
= pexConfig.Field(
doc="Systematic term to apply to the measured position error (pixels)",
dtype=float,
default=0.02,
)

Definition at line 384 of file jointcal.py.

◆ sourceFluxType

lsst.jointcal.jointcal.JointcalConfig.sourceFluxType
static
Initial value:
= pexConfig.Field(
dtype=str,
doc="Source flux field to use in source selection and to get fluxes from the catalog.",
default='Calib'
)

Definition at line 379 of file jointcal.py.

◆ sourceSelector

lsst.jointcal.jointcal.JointcalConfig.sourceSelector
static
Initial value:
= sourceSelectorRegistry.makeField(
doc="How to select sources for cross-matching",
default="astrometry"
)

Definition at line 521 of file jointcal.py.

◆ storageClass

lsst.jointcal.jointcal.JointcalTaskConnections.storageClass
staticinherited

Definition at line 297 of file jointcal.py.

◆ useInputWcs

lsst.jointcal.jointcal.JointcalConfig.useInputWcs
static
Initial value:
= pexConfig.Field(
doc="Use the input calexp WCSs to initialize a SimpleAstrometryModel.",
dtype=bool,
default=True,
)

Definition at line 437 of file jointcal.py.

◆ writeChi2FilesInitialFinal

lsst.jointcal.jointcal.JointcalConfig.writeChi2FilesInitialFinal
static
Initial value:
= pexConfig.Field(
dtype=bool,
doc=("Write .csv files containing the contributions to chi2 for the initialization and final fit. "
"Output files will be written to `config.debugOutputPath` and will "
"be of the form `astrometry_[initial|final]_chi2-TRACT-FILTER."),
default=False
)

Definition at line 551 of file jointcal.py.

◆ writeChi2FilesOuterLoop

lsst.jointcal.jointcal.JointcalConfig.writeChi2FilesOuterLoop
static
Initial value:
= pexConfig.Field(
dtype=bool,
doc=("Write .csv files containing the contributions to chi2 for the outer fit loop. "
"Output files will be written to `config.debugOutputPath` and will "
"be of the form `astrometry_init-NN_chi2-TRACT-FILTER`."),
default=False
)

Definition at line 558 of file jointcal.py.

◆ writeInitialModel

lsst.jointcal.jointcal.JointcalConfig.writeInitialModel
static
Initial value:
= pexConfig.Field(
dtype=bool,
doc=("Write the pre-initialization model to text files, for debugging. "
"Output files will be written to `config.debugOutputPath` and will be "
"of the form `initial_astrometry_model-TRACT_FILTER.txt`."),
default=False
)

Definition at line 565 of file jointcal.py.

◆ writeInitMatrix

lsst.jointcal.jointcal.JointcalConfig.writeInitMatrix
static
Initial value:
= pexConfig.Field(
dtype=bool,
doc=("Write the pre/post-initialization Hessian and gradient to text files, for debugging. "
"Output files will be written to `config.debugOutputPath` and will "
"be of the form 'astrometry_[pre|post]init-TRACT-FILTER-mat.txt'. "
"Note that these files are the dense versions of the matrix, and so may be very large."),
default=False
)

Definition at line 543 of file jointcal.py.


The documentation for this class was generated from the following file: