LSST Applications g0f08755f38+9c285cab97,g1635faa6d4+13f3999e92,g1653933729+a8ce1bb630,g1a0ca8cf93+bf6eb00ceb,g28da252d5a+0829b12dee,g29321ee8c0+5700dc9eac,g2bbee38e9b+9634bc57db,g2bc492864f+9634bc57db,g2cdde0e794+c2c89b37c4,g3156d2b45e+41e33cbcdc,g347aa1857d+9634bc57db,g35bb328faa+a8ce1bb630,g3a166c0a6a+9634bc57db,g3e281a1b8c+9f2c4e2fc3,g414038480c+077ccc18e7,g41af890bb2+fde0dd39b6,g5fbc88fb19+17cd334064,g781aacb6e4+a8ce1bb630,g80478fca09+55a9465950,g82479be7b0+d730eedb7d,g858d7b2824+9c285cab97,g9125e01d80+a8ce1bb630,g9726552aa6+10f999ec6a,ga5288a1d22+2a84bb7594,gacf8899fa4+c69c5206e8,gae0086650b+a8ce1bb630,gb58c049af0+d64f4d3760,gc28159a63d+9634bc57db,gcf0d15dbbd+4b7d09cae4,gda3e153d99+9c285cab97,gda6a2b7d83+4b7d09cae4,gdaeeff99f8+1711a396fd,ge2409df99d+5e831397f4,ge79ae78c31+9634bc57db,gf0baf85859+147a0692ba,gf3967379c6+41c94011de,gf3fb38a9a8+8f07a9901b,gfb92a5be7c+9c285cab97,w.2024.46
LSST Data Management Base Package
Loading...
Searching...
No Matches
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

 validate (self)
 
 setDefaults (self)
 

Static Public Attributes

 doAstrometry
 
 doPhotometry
 
 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
 

Detailed Description

Configuration for JointcalTask

Definition at line 197 of file jointcal.py.

Member Function Documentation

◆ setDefaults()

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

Definition at line 426 of file jointcal.py.

426 def setDefaults(self):
427 # Use only primary stars.
428 self.sourceSelector["science"].doRequirePrimary = True
429 # Use only stars because aperture fluxes of galaxies are biased and depend on seeing.
430 self.sourceSelector["science"].doUnresolved = True
431 self.sourceSelector["science"].unresolved.name = "sizeExtendedness"
432 # with dependable signal to noise ratio.
433 self.sourceSelector["science"].doSignalToNoise = True
434 # Min SNR must be > 0 because jointcal cannot handle negative fluxes,
435 # and S/N > 10 to use sources that are not too faint, and thus better measured.
436 self.sourceSelector["science"].signalToNoise.minimum = 10.
437 # Base SNR selection on `sourceFluxType` because that is the flux that jointcal fits.
438 self.sourceSelector["science"].signalToNoise.fluxField = f"{self.sourceFluxType}_instFlux"
439 self.sourceSelector["science"].signalToNoise.errField = f"{self.sourceFluxType}_instFluxErr"
440 # Do not trust blended sources" aperture fluxes which also depend on seeing.
441 self.sourceSelector["science"].doIsolated = True
442 self.sourceSelector["science"].isolated.parentName = "parentSourceId"
443 self.sourceSelector["science"].isolated.nChildName = "deblend_nChild"
444 # Do not trust either flux or centroid measurements with flags,
445 # chosen from the usual QA flags for stars)
446 self.sourceSelector["science"].doFlags = True
447 badFlags = ["pixelFlags_edge",
448 "pixelFlags_saturated",
449 "pixelFlags_interpolatedCenter",
450 "pixelFlags_interpolated",
451 "pixelFlags_crCenter",
452 "pixelFlags_bad",
453 "hsmPsfMoments_flag",
454 f"{self.sourceFluxType}_flag",
455 ]
456 self.sourceSelector["science"].flags.bad = badFlags
457 self.sourceSelector["science"].doRequireFiniteRaDec = True
458 self.sourceSelector["science"].requireFiniteRaDec.raColName = "ra"
459 self.sourceSelector["science"].requireFiniteRaDec.decColName = "dec"
460
461 # Use Gaia-DR2 with proper motions for astrometry; phot_g_mean is the
462 # primary Gaia band, but is not like any normal photometric band.
463 self.astrometryRefObjLoader.requireProperMotion = True
464 self.astrometryRefObjLoader.anyFilterMapsToThis = "phot_g_mean"
465
466

◆ validate()

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

Definition at line 416 of file jointcal.py.

416 def validate(self):
417 super().validate()
418 if self.doPhotometry and self.applyColorTerms and len(self.colorterms.data) == 0:
419 msg = "applyColorTerms=True requires the `colorterms` field be set to a ColortermLibrary."
420 raise pexConfig.FieldValidationError(JointcalConfig.colorterms, self, msg)
421 if self.doAstrometry and not self.doPhotometry and self.applyColorTerms:
422 msg = ("Only doing astrometry, but Colorterms are not applied for astrometry;"
423 "applyColorTerms=True will be ignored.")
424 logging.getLogger("lsst.jointcal").warning(msg)
425

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 248 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 294 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 259 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 315 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 274 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 326 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 365 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 357 of file jointcal.py.

◆ astrometryRefObjLoader

lsst.jointcal.jointcal.JointcalConfig.astrometryRefObjLoader
static
Initial value:
= pexConfig.ConfigField(
dtype=LoadReferenceObjectsConfig,
doc="Reference object loader for astrometric fit",
)

Definition at line 345 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 254 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 264 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 300 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 404 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 410 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 201 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 206 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 228 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 340 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 335 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 238 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 233 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 243 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 321 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 309 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 221 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 281 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 361 of file jointcal.py.

◆ photometryRefObjLoader

lsst.jointcal.jointcal.JointcalConfig.photometryRefObjLoader
static
Initial value:
= pexConfig.ConfigField(
dtype=LoadReferenceObjectsConfig,
doc="Reference object loader for photometric fit",
)

Definition at line 349 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 304 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 216 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='apFlux_12_0'
)

Definition at line 211 of file jointcal.py.

◆ sourceSelector

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

Definition at line 353 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 269 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 383 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 390 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 397 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 375 of file jointcal.py.


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