LSST Applications g063fba187b+66a50001ff,g0f08755f38+1a22dc2551,g1653933729+a8ce1bb630,g168dd56ebc+a8ce1bb630,g217e2c1bcf+12e87a5bd8,g246886dfd9+466c7b6c06,g28da252d5a+858b171e04,g2bbee38e9b+404b60ec9b,g2bc492864f+404b60ec9b,g3156d2b45e+6e55a43351,g347aa1857d+404b60ec9b,g35bb328faa+a8ce1bb630,g3a166c0a6a+404b60ec9b,g3e281a1b8c+c5dd892a6c,g414038480c+6b9177ef31,g41af890bb2+70bea58702,g599934f4f4+b8c5400ca5,g781aacb6e4+a8ce1bb630,g7af13505b9+b5b9cefdb8,g80478fca09+c2997882f3,g82479be7b0+8974e6af0f,g858d7b2824+1a22dc2551,g89c8672015+f4add4ffd5,g8f1c07a47a+de51c9b0a5,g9125e01d80+a8ce1bb630,ga5288a1d22+b66f8cf76b,gb58c049af0+d64f4d3760,gc28159a63d+404b60ec9b,gcab2d0539d+66cf1de5d4,gcf0d15dbbd+12cb7e2563,gda6a2b7d83+12cb7e2563,gdaeeff99f8+1711a396fd,ge79ae78c31+404b60ec9b,gef2f8181fd+414189b318,gf0baf85859+c1f95f4921,gf0c06eb49c+1a22dc2551,gfa517265be+1a22dc2551,gfa999e8aa5+17cd334064,v28.0.0.rc2
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
lsst.meas.base.baseMeasurement.BaseMeasurementConfig Class Reference
Inheritance diagram for lsst.meas.base.baseMeasurement.BaseMeasurementConfig:
lsst.pex.config.config.Config lsst.pex.config.config.ConfigMeta lsst.meas.base.forcedMeasurement.ForcedMeasurementConfig lsst.meas.base.sfm.SingleFrameMeasurementConfig lsst.ip.diffim.dipoleMeasurement.DipoleMeasurementConfig

Public Member Functions

 __new__ (cls, *args, ignoreSlotPluginChecks=False, **kwargs)
 
 validate (self)
 

Static Public Attributes

 slots
 
 doReplaceWithNoise
 
 noiseReplacer
 
 undeblendedPrefix
 

Detailed Description

Base configuration for all measurement driver tasks.

Parameters
----------
ignoreSlotPluginChecks : `bool`, optional
    Do not check that all slots have an associated plugin to run when
    validating this config. This is primarily for tests that were written
    before we made Tasks always call `config.validate()` on init.
    DEPRECATED DM-35949: this is a temporary workaround while we better
    define how config/schema validation works for measurement tasks.

Examples
--------
Subclasses should define the 'plugins' and 'undeblended' registries, e.g.

.. code-block:: py

    plugins = PluginBaseClass.registry.makeField(
        multi=True,
        default=[],
        doc="Plugins to be run and their configuration"
    )
    undeblended = PluginBaseClass.registry.makeField(
        multi=True,
        default=[],
        doc="Plugins to run on undeblended image"
    )

where ``PluginBaseClass`` is the appropriate base class of the plugin
(e.g., `SingleFramePlugin` or `ForcedPlugin`).

Definition at line 140 of file baseMeasurement.py.

Member Function Documentation

◆ __new__()

lsst.meas.base.baseMeasurement.BaseMeasurementConfig.__new__ ( cls,
* args,
kw = False,
** kwargs )
Allocate a new `lsst.pex.config.Config` object.

In order to ensure that all Config object are always in a proper state
when handed to users or to derived `~lsst.pex.config.Config` classes,
some attributes are handled at allocation time rather than at
initialization.

This ensures that even if a derived `~lsst.pex.config.Config` class
implements ``__init__``, its author does not need to be concerned about
when or even the base ``Config.__init__`` should be called.

Reimplemented from lsst.pex.config.config.Config.

Definition at line 172 of file baseMeasurement.py.

172 def __new__(cls, *args, ignoreSlotPluginChecks=False, **kwargs):
173 instance = super().__new__(cls, *args, **kwargs)
174 if ignoreSlotPluginChecks:
175 msg = ("ignoreSlotPluginChecks is deprecated and should only be used in tests."
176 " No removal date has been set; see DM-35949.")
177 warnings.warn(msg, category=FutureWarning, stacklevel=2)
178 object.__setattr__(instance, "_ignoreSlotPluginChecks", ignoreSlotPluginChecks)
179 return instance
180

◆ validate()

lsst.meas.base.baseMeasurement.BaseMeasurementConfig.validate ( self)
Validate the Config, raising an exception if invalid.

Raises
------
lsst.pex.config.FieldValidationError
    Raised if verification fails.

Notes
-----
The base class implementation performs type checks on all fields by
calling their `~lsst.pex.config.Field.validate` methods.

Complex single-field validation can be defined by deriving new Field
types. For convenience, some derived `lsst.pex.config.Field`-types
(`~lsst.pex.config.ConfigField` and
`~lsst.pex.config.ConfigChoiceField`) are defined in
``lsst.pex.config`` that handle recursing into subconfigs.

Inter-field relationships should only be checked in derived
`~lsst.pex.config.Config` classes after calling this method, and base
validation is complete.

Reimplemented from lsst.pex.config.config.Config.

Definition at line 199 of file baseMeasurement.py.

199 def validate(self):
200 super().validate()
201 if self._ignoreSlotPluginChecks:
202 return
203 if self.slots.centroid is not None and self.slots.centroid not in self.plugins.names:
205 self.__class__.slots,
206 self,
207 "source centroid slot algorithm is not being run."
208 )
209 if self.slots.shape is not None and self.slots.shape not in self.plugins.names:
211 self.__class__.slots,
212 self,
213 "source shape slot algorithm '%s' is not being run." % self.slots.shape
214 )
215 for slot in (self.slots.psfFlux, self.slots.apFlux, self.slots.modelFlux,
216 self.slots.gaussianFlux, self.slots.calibFlux):
217 if slot is not None:
218 for name in self.plugins.names:
219 if len(name) <= len(slot) and name == slot[:len(name)]:
220 break
221 else:
223 self.__class__.slots,
224 self,
225 f"Source instFlux algorithm '{slot}' is not being run, required from "
226 f"non-None slots in: {self.slots}."
227 )
228
229

Member Data Documentation

◆ doReplaceWithNoise

lsst.meas.base.baseMeasurement.BaseMeasurementConfig.doReplaceWithNoise
static
Initial value:
dtype=bool, default=True, optional=False,
doc='When measuring, replace other detected footprints with noise?')

Definition at line 186 of file baseMeasurement.py.

◆ noiseReplacer

lsst.meas.base.baseMeasurement.BaseMeasurementConfig.noiseReplacer
static
Initial value:
dtype=NoiseReplacerConfig,
doc="configuration that sets how to replace neighboring sources with noise"
)

Definition at line 190 of file baseMeasurement.py.

◆ slots

lsst.meas.base.baseMeasurement.BaseMeasurementConfig.slots
static
Initial value:
dtype=SourceSlotConfig,
doc="Mapping from algorithms to special aliases in Source."
)

Definition at line 181 of file baseMeasurement.py.

◆ undeblendedPrefix

lsst.meas.base.baseMeasurement.BaseMeasurementConfig.undeblendedPrefix
static
Initial value:
dtype=str, default="undeblended_",
doc="Prefix to give undeblended plugins"
)

Definition at line 194 of file baseMeasurement.py.


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