LSST Applications g07dc498a13+cb17356775,g1409bbee79+cb17356775,g1a7e361dbc+cb17356775,g1fd858c14a+d1a2a640a9,g33399d78f5+fe6948661d,g35bb328faa+e55fef2c71,g3bd4b5ce2c+cac9e18807,g3c79e8cd92+2359a18b76,g43bc871e57+a58ba40925,g53246c7159+e55fef2c71,g60b5630c4e+8133a3545f,g78460c75b0+8427c4cc8f,g78619a8342+55305cb8f0,g786e29fd12+307f82e6af,g8534526c7b+8e1c6b434f,g89139ef638+cb17356775,g8b49a6ea8e+8133a3545f,g8ffcb69f3d+818ab6c36e,g9125e01d80+e55fef2c71,g97b8272a79+98425f45f6,g989de1cb63+cb17356775,g9f33ca652e+4245ceb508,gaaedd4e678+cb17356775,gabe3b4be73+9c0c3c7524,gb1101e3267+3e5ef1d639,gb58c049af0+28045f66fd,gc1fe0db326+8133a3545f,gca43fec769+e55fef2c71,gcf25f946ba+fe6948661d,gd397e13551+64039f84ea,gd6cbbdb0b4+f6e5445f66,gde0f65d7ad+7eb368c542,ge278dab8ac+b4c2c8faf7,geab183fbe5+8133a3545f,gecb8035dfe+1f480bec5e,gefa07fa684+e7bc33f3ea,gf58bf46354+e55fef2c71,gfe7187db8c+e55afb4430,w.2025.03
LSST Data Management Base Package
Loading...
Searching...
No Matches
lsst.meas.base.diaCalculationPlugins.PercentileDiaPsfFlux Class Reference
Inheritance diagram for lsst.meas.base.diaCalculationPlugins.PercentileDiaPsfFlux:
lsst.meas.base.diaCalculation.DiaObjectCalculationPlugin lsst.meas.base.catalogCalculation.CatalogCalculationPlugin lsst.meas.base.pluginsBase.BasePlugin

Public Member Functions

 __init__ (self, config, name, metadata, **kwargs)
 
 getExecutionOrder (cls)
 
 calculate (self, diaObjects, diaSources, filterDiaSources, band, **kwargs)
 

Static Public Attributes

 ConfigClass = PercentileDiaPsfFluxConfig
 
list outputCols = []
 
str plugType = "multi"
 
bool needsFilter = True
 

Detailed Description

Compute percentiles of diaSource fluxes.

Definition at line 349 of file diaCalculationPlugins.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.meas.base.diaCalculationPlugins.PercentileDiaPsfFlux.__init__ ( self,
config,
name,
metadata,
** kwargs )

Reimplemented from lsst.meas.base.diaCalculation.DiaObjectCalculationPlugin.

Definition at line 359 of file diaCalculationPlugins.py.

359 def __init__(self, config, name, metadata, **kwargs):
360 DiaObjectCalculationPlugin.__init__(self,
361 config,
362 name,
363 metadata,
364 **kwargs)
365 self.outputCols = ["psfFluxPercentile{:02d}".format(percent)
366 for percent in self.config.percentiles]
367

Member Function Documentation

◆ calculate()

lsst.meas.base.diaCalculationPlugins.PercentileDiaPsfFlux.calculate ( self,
diaObjects,
diaSources,
filterDiaSources,
band,
** kwargs )
Compute the percentile fluxes of the point source flux.

Parameters
----------
diaObject : `dict`
    Summary object to store values in.
diaSources : `pandas.DataFrame`
    DataFrame representing all diaSources associated with this
    diaObject.
filterDiaSources : `pandas.DataFrame`
    DataFrame representing diaSources associated with this
    diaObject that are observed in the band pass ``band``.
band : `str`
    Simple, string name of the filter for the flux being calculated.
**kwargs
    Any additional keyword arguments that may be passed to the plugin.

Reimplemented from lsst.meas.base.diaCalculation.DiaObjectCalculationPlugin.

Definition at line 373 of file diaCalculationPlugins.py.

378 **kwargs):
379 """Compute the percentile fluxes of the point source flux.
380
381 Parameters
382 ----------
383 diaObject : `dict`
384 Summary object to store values in.
385 diaSources : `pandas.DataFrame`
386 DataFrame representing all diaSources associated with this
387 diaObject.
388 filterDiaSources : `pandas.DataFrame`
389 DataFrame representing diaSources associated with this
390 diaObject that are observed in the band pass ``band``.
391 band : `str`
392 Simple, string name of the filter for the flux being calculated.
393 **kwargs
394 Any additional keyword arguments that may be passed to the plugin.
395 """
396 pTileNames = []
397 dtype = None
398 for tilePercent in self.config.percentiles:
399 pTileName = "{}_psfFluxPercentile{:02d}".format(band,
400 tilePercent)
401 pTileNames.append(pTileName)
402 if pTileName not in diaObjects.columns:
403 diaObjects[pTileName] = np.nan
404 elif dtype is None:
405 dtype = diaObjects[pTileName].dtype
406
407 def _fluxPercentiles(df):
408 pTiles = np.nanpercentile(df["psfFlux"], self.config.percentiles)
409 return pd.Series(
410 dict((tileName, pTile)
411 for tileName, pTile in zip(pTileNames, pTiles)))
412 if dtype is None:
413 diaObjects.loc[:, pTileNames] = filterDiaSources.apply(_fluxPercentiles)
414 else:
415 diaObjects.loc[:, pTileNames] = filterDiaSources.apply(_fluxPercentiles).astype(dtype)
416
417

◆ getExecutionOrder()

lsst.meas.base.diaCalculationPlugins.PercentileDiaPsfFlux.getExecutionOrder ( cls)
Used to set the relative order of plugin execution.

    The values returned by `getExecutionOrder` are compared across all
    plugins, and smaller numbers run first.

    Notes
    -----
    `CatalogCalculationPlugin`\s must run with
    `BasePlugin.DEFAULT_CATALOGCALCULATION` or higher.

    All plugins must implement this method with an appropriate run level

Reimplemented from lsst.meas.base.catalogCalculation.CatalogCalculationPlugin.

Definition at line 369 of file diaCalculationPlugins.py.

369 def getExecutionOrder(cls):
370 return cls.DEFAULT_CATALOGCALCULATION
371

Member Data Documentation

◆ ConfigClass

lsst.meas.base.diaCalculationPlugins.PercentileDiaPsfFlux.ConfigClass = PercentileDiaPsfFluxConfig
static

Definition at line 353 of file diaCalculationPlugins.py.

◆ needsFilter

bool lsst.meas.base.diaCalculationPlugins.PercentileDiaPsfFlux.needsFilter = True
static

Definition at line 357 of file diaCalculationPlugins.py.

◆ outputCols

list lsst.meas.base.diaCalculationPlugins.PercentileDiaPsfFlux.outputCols = []
static

Definition at line 355 of file diaCalculationPlugins.py.

◆ plugType

str lsst.meas.base.diaCalculationPlugins.PercentileDiaPsfFlux.plugType = "multi"
static

Definition at line 356 of file diaCalculationPlugins.py.


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