LSST Applications g034a557a3c+dd8dd8f11d,g0afe43252f+b86e4b8053,g11f7dcd041+017865fdd3,g1cd03abf6b+8446defddb,g1ce3e0751c+f991eae79d,g28da252d5a+ca8a1a9fb3,g2bbee38e9b+b6588ad223,g2bc492864f+b6588ad223,g2cdde0e794+8523d0dbb4,g347aa1857d+b6588ad223,g35bb328faa+b86e4b8053,g3a166c0a6a+b6588ad223,g461a3dce89+b86e4b8053,g52b1c1532d+b86e4b8053,g7f3b0d46df+ad13c1b82d,g80478fca09+f29c5d6c70,g858d7b2824+293f439f82,g8cd86fa7b1+af721d2595,g965a9036f2+293f439f82,g979bb04a14+51ed57f74c,g9ddcbc5298+f24b38b85a,gae0086650b+b86e4b8053,gbb886bcc26+b97e247655,gc28159a63d+b6588ad223,gc30aee3386+a2f0f6cab9,gcaf7e4fdec+293f439f82,gcd45df26be+293f439f82,gcdd4ae20e8+70b5def7e6,gce08ada175+da9c58a417,gcf0d15dbbd+70b5def7e6,gdaeeff99f8+006e14e809,gdbce86181e+6a170ce272,ge3d4d395c2+224150c836,ge5f7162a3a+bb2241c923,ge6cb8fbbf7+d119aed356,ge79ae78c31+b6588ad223,gf048a9a2f4+40ffced2b8,gf0baf85859+b4cca3d10f,w.2024.30
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
lsst.meas.base.diaCalculationPlugins.MaxSlopeDiaPsfFlux Class Reference
Inheritance diagram for lsst.meas.base.diaCalculationPlugins.MaxSlopeDiaPsfFlux:
lsst.meas.base.diaCalculation.DiaObjectCalculationPlugin lsst.meas.base.catalogCalculation.CatalogCalculationPlugin lsst.meas.base.pluginsBase.BasePlugin

Public Member Functions

 getExecutionOrder (cls)
 
 calculate (self, diaObjects, diaSources, filterDiaSources, band, **kwargs)
 

Static Public Attributes

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

Detailed Description

Compute the maximum ratio time ordered deltaFlux / deltaTime.

Definition at line 701 of file diaCalculationPlugins.py.

Member Function Documentation

◆ calculate()

lsst.meas.base.diaCalculationPlugins.MaxSlopeDiaPsfFlux.calculate ( self,
diaObjects,
diaSources,
filterDiaSources,
band,
** kwargs )
Compute the maximum ratio time ordered deltaFlux / deltaTime.

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 717 of file diaCalculationPlugins.py.

722 **kwargs):
723 """Compute the maximum ratio time ordered deltaFlux / deltaTime.
724
725 Parameters
726 ----------
727 diaObject : `dict`
728 Summary object to store values in.
729 diaSources : `pandas.DataFrame`
730 DataFrame representing all diaSources associated with this
731 diaObject.
732 filterDiaSources : `pandas.DataFrame`
733 DataFrame representing diaSources associated with this
734 diaObject that are observed in the band pass ``band``.
735 band : `str`
736 Simple, string name of the filter for the flux being calculated.
737 **kwargs
738 Any additional keyword arguments that may be passed to the plugin.
739 """
740
741 def _maxSlope(df):
742 tmpDf = df[~np.logical_or(np.isnan(df["psfFlux"]),
743 np.isnan(df["midpointMjdTai"]))]
744 if len(tmpDf) < 2:
745 return np.nan
746 times = tmpDf["midpointMjdTai"].to_numpy()
747 timeArgs = times.argsort()
748 times = times[timeArgs]
749 fluxes = tmpDf["psfFlux"].to_numpy()[timeArgs]
750 return (np.diff(fluxes) / np.diff(times)).max()
751
752 column = "{}_psfFluxMaxSlope".format(band)
753 if column in diaObjects:
754 dtype = diaObjects[column].dtype
755 diaObjects.loc[:, column] = filterDiaSources.apply(_maxSlope).astype(dtype)
756 else:
757 diaObjects.loc[:, column] = filterDiaSources.apply(_maxSlope)
758
759
int max

◆ getExecutionOrder()

lsst.meas.base.diaCalculationPlugins.MaxSlopeDiaPsfFlux.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 714 of file diaCalculationPlugins.py.

714 def getExecutionOrder(cls):
715 return cls.DEFAULT_CATALOGCALCULATION
716

Member Data Documentation

◆ ConfigClass

lsst.meas.base.diaCalculationPlugins.MaxSlopeDiaPsfFlux.ConfigClass = MinMaxDiaPsfFluxConfig
static

Definition at line 705 of file diaCalculationPlugins.py.

◆ needsFilter

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

Definition at line 711 of file diaCalculationPlugins.py.

◆ outputCols

list lsst.meas.base.diaCalculationPlugins.MaxSlopeDiaPsfFlux.outputCols = ["psfFluxMaxSlope"]
static

Definition at line 709 of file diaCalculationPlugins.py.

◆ plugType

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

Definition at line 710 of file diaCalculationPlugins.py.


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