LSST Applications 27.0.0,g0265f82a02+469cd937ee,g02d81e74bb+21ad69e7e1,g1470d8bcf6+cbe83ee85a,g2079a07aa2+e67c6346a6,g212a7c68fe+04a9158687,g2305ad1205+94392ce272,g295015adf3+81dd352a9d,g2bbee38e9b+469cd937ee,g337abbeb29+469cd937ee,g3939d97d7f+72a9f7b576,g487adcacf7+71499e7cba,g50ff169b8f+5929b3527e,g52b1c1532d+a6fc98d2e7,g591dd9f2cf+df404f777f,g5a732f18d5+be83d3ecdb,g64a986408d+21ad69e7e1,g858d7b2824+21ad69e7e1,g8a8a8dda67+a6fc98d2e7,g99cad8db69+f62e5b0af5,g9ddcbc5298+d4bad12328,ga1e77700b3+9c366c4306,ga8c6da7877+71e4819109,gb0e22166c9+25ba2f69a1,gb6a65358fc+469cd937ee,gbb8dafda3b+69d3c0e320,gc07e1c2157+a98bf949bb,gc120e1dc64+615ec43309,gc28159a63d+469cd937ee,gcf0d15dbbd+72a9f7b576,gdaeeff99f8+a38ce5ea23,ge6526c86ff+3a7c1ac5f1,ge79ae78c31+469cd937ee,gee10cc3b42+a6fc98d2e7,gf1cff7945b+21ad69e7e1,gfbcc870c63+9a11dc8c8f
LSST Data Management Base Package
|
Public Member Functions | |
__init__ (self, handles, functors, filt=None, flags=None, refFlags=None, forcedFlags=None) | |
defaultFuncs (self) | |
func (self) | |
noDupCols (self) | |
df (self) | |
compute (self, dropna=False, pool=None) | |
Public Attributes | |
handles | |
functors | |
filt | |
flags | |
forcedFlags | |
refFlags | |
Protected Attributes | |
_df | |
Static Protected Attributes | |
list | _defaultRefFlags = [] |
tuple | _defaultFuncs = () |
Calculate columns from DataFrames or handles storing DataFrames. This object manages and organizes an arbitrary set of computations on a catalog. The catalog is defined by a `DeferredDatasetHandle` or `InMemoryDatasetHandle` object (or list thereof), such as a ``deepCoadd_obj`` dataset, and the computations are defined by a collection of `~lsst.pipe.tasks.functors.Functor` objects (or, equivalently, a ``CompositeFunctor``). After the object is initialized, accessing the ``.df`` attribute (which holds the `pandas.DataFrame` containing the results of the calculations) triggers computation of said dataframe. One of the conveniences of using this object is the ability to define a desired common filter for all functors. This enables the same functor collection to be passed to several different `PostprocessAnalysis` objects without having to change the original functor collection, since the ``filt`` keyword argument of this object triggers an overwrite of the ``filt`` property for all functors in the collection. This object also allows a list of refFlags to be passed, and defines a set of default refFlags that are always included even if not requested. If a list of DataFrames or Handles is passed, rather than a single one, then the calculations will be mapped over all the input catalogs. In principle, it should be straightforward to parallelize this activity, but initial tests have failed (see TODO in code comments). Parameters ---------- handles : `~lsst.daf.butler.DeferredDatasetHandle` or `~lsst.pipe.base.InMemoryDatasetHandle` or list of these. Source catalog(s) for computation. functors : `list`, `dict`, or `~lsst.pipe.tasks.functors.CompositeFunctor` Computations to do (functors that act on ``handles``). If a dict, the output DataFrame will have columns keyed accordingly. If a list, the column keys will come from the ``.shortname`` attribute of each functor. filt : `str`, optional Filter in which to calculate. If provided, this will overwrite any existing ``.filt`` attribute of the provided functors. flags : `list`, optional List of flags (per-band) to include in output table. Taken from the ``meas`` dataset if applied to a multilevel Object Table. refFlags : `list`, optional List of refFlags (only reference band) to include in output table. forcedFlags : `list`, optional List of flags (per-band) to include in output table. Taken from the ``forced_src`` dataset if applied to a multilevel Object Table. Intended for flags from measurement plugins only run during multi-band forced-photometry.
Definition at line 441 of file postprocess.py.
lsst.pipe.tasks.postprocess.PostprocessAnalysis.__init__ | ( | self, | |
handles, | |||
functors, | |||
filt = None, | |||
flags = None, | |||
refFlags = None, | |||
forcedFlags = None ) |
Definition at line 505 of file postprocess.py.
lsst.pipe.tasks.postprocess.PostprocessAnalysis.compute | ( | self, | |
dropna = False, | |||
pool = None ) |
Definition at line 550 of file postprocess.py.
lsst.pipe.tasks.postprocess.PostprocessAnalysis.defaultFuncs | ( | self | ) |
Definition at line 519 of file postprocess.py.
lsst.pipe.tasks.postprocess.PostprocessAnalysis.df | ( | self | ) |
Definition at line 545 of file postprocess.py.
lsst.pipe.tasks.postprocess.PostprocessAnalysis.func | ( | self | ) |
Definition at line 524 of file postprocess.py.
lsst.pipe.tasks.postprocess.PostprocessAnalysis.noDupCols | ( | self | ) |
Definition at line 541 of file postprocess.py.
|
staticprotected |
Definition at line 503 of file postprocess.py.
|
staticprotected |
Definition at line 502 of file postprocess.py.
|
protected |
Definition at line 516 of file postprocess.py.
lsst.pipe.tasks.postprocess.PostprocessAnalysis.filt |
Definition at line 509 of file postprocess.py.
lsst.pipe.tasks.postprocess.PostprocessAnalysis.flags |
Definition at line 510 of file postprocess.py.
lsst.pipe.tasks.postprocess.PostprocessAnalysis.forcedFlags |
Definition at line 511 of file postprocess.py.
lsst.pipe.tasks.postprocess.PostprocessAnalysis.functors |
Definition at line 507 of file postprocess.py.
lsst.pipe.tasks.postprocess.PostprocessAnalysis.handles |
Definition at line 506 of file postprocess.py.
lsst.pipe.tasks.postprocess.PostprocessAnalysis.refFlags |
Definition at line 512 of file postprocess.py.