LSST Applications g0265f82a02+0e5473021a,g02d81e74bb+0dd8ce4237,g1470d8bcf6+3ea6592b6f,g2079a07aa2+86d27d4dc4,g2305ad1205+5ca4c0b359,g295015adf3+d10818ec9d,g2a9a014e59+6f9be1b9cd,g2bbee38e9b+0e5473021a,g337abbeb29+0e5473021a,g3ddfee87b4+703ba97ebf,g487adcacf7+4fa16da234,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+ffa42b374e,g5a732f18d5+53520f316c,g64a986408d+0dd8ce4237,g858d7b2824+0dd8ce4237,g8a8a8dda67+585e252eca,g99cad8db69+d39438377f,g9ddcbc5298+9a081db1e4,ga1e77700b3+15fc3df1f7,ga8c6da7877+f1d96605c8,gb0e22166c9+60f28cb32d,gb6a65358fc+0e5473021a,gba4ed39666+c2a2e4ac27,gbb8dafda3b+e5339d463f,gc120e1dc64+da31e9920e,gc28159a63d+0e5473021a,gcf0d15dbbd+703ba97ebf,gdaeeff99f8+f9a426f77a,ge6526c86ff+889fc9d533,ge79ae78c31+0e5473021a,gee10cc3b42+585e252eca,gf18bd8381d+7268b93478,gff1a9f87cc+0dd8ce4237,w.2024.16
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: