Loading [MathJax]/extensions/tex2jax.js
LSST Applications g0000d66e7c+4a51730b0a,g0485b4d2cb+be65c9c1d7,g0fba68d861+f95c35e0c3,g1ec0fe41b4+3ea9d11450,g1fd858c14a+41d169aaf2,g2440f9efcc+8c5ae1fdc5,g35bb328faa+8c5ae1fdc5,g4d2262a081+30937b6477,g53246c7159+8c5ae1fdc5,g55585698de+c657de43f9,g56a49b3a55+7eddd92ad8,g60b5630c4e+c657de43f9,g67b6fd64d1+97cc007aa2,g78460c75b0+7e33a9eb6d,g786e29fd12+668abc6043,g7ac00fbb6c+9304e3655a,g8352419a5c+8c5ae1fdc5,g8852436030+3f3bba821f,g89139ef638+97cc007aa2,g94187f82dc+c657de43f9,g989de1cb63+97cc007aa2,g9d31334357+c657de43f9,g9f33ca652e+06d39d8afb,ga815be3f0b+8e7c4d07ad,gabe3b4be73+8856018cbb,gabf8522325+977d9fabaf,gb1101e3267+12c96a40b1,gb89ab40317+97cc007aa2,gc91f06edcd+2ffb87f22b,gcf25f946ba+3f3bba821f,gd6cbbdb0b4+1cc2750d2e,gde0f65d7ad+bbe98f05bf,ge278dab8ac+6b863515ed,ge410e46f29+97cc007aa2,gf35d7ec915+97dd712d81,gf5e32f922b+8c5ae1fdc5,gf67bdafdda+97cc007aa2,gf6800124b1+bb7d8e732a,w.2025.19
LSST Data Management Base Package
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
lsst.pipe.tasks.postprocess.for Class Reference
Inheritance diagram for lsst.pipe.tasks.postprocess.for:

Static Public Attributes

 funcs :
 
 sourceId :
 
Index x :
 
slot_Centroid_x y :
 
slot_Centroid_y psfFlux :
 
LocalNanojansky args :
 
 psfFluxErr :
 
LocalNanojanskyErr args :
 
 flags :
 

Detailed Description

_defaultRefFlags = []
_defaultFuncs = ()

def __init__(self, handles, functors, filt=None, flags=None, refFlags=None, forcedFlags=None):
    self.handles = handles
    self.functors = functors

    self.filt = filt
    self.flags = list(flags) if flags is not None else []
    self.forcedFlags = list(forcedFlags) if forcedFlags is not None else []
    self.refFlags = list(self._defaultRefFlags)
    if refFlags is not None:
        self.refFlags += list(refFlags)

    self._df = None

@property
def defaultFuncs(self):
    funcs = dict(self._defaultFuncs)
    return funcs

@property
def func(self):
    additionalFuncs = self.defaultFuncs
    additionalFuncs.update({flag: Column(flag, dataset="forced_src") for flag in self.forcedFlags})
    additionalFuncs.update({flag: Column(flag, dataset="ref") for flag in self.refFlags})
    additionalFuncs.update({flag: Column(flag, dataset="meas") for flag in self.flags})

    if isinstance(self.functors, CompositeFunctor):
        func = self.functors
    else:
        func = CompositeFunctor(self.functors)

    func.funcDict.update(additionalFuncs)
    func.filt = self.filt

    return func

@property
def noDupCols(self):
    return [name for name, func in self.func.funcDict.items() if func.noDup]

@property
def df(self):
    if self._df is None:
        self.compute()
    return self._df

def compute(self, dropna=False, pool=None):
    # map over multiple handles
    if type(self.handles) in (list, tuple):
        if pool is None:
            dflist = [self.func(handle, dropna=dropna) for handle in self.handles]
        else:
            # TODO: Figure out why this doesn't work (pyarrow pickling
            # issues?)
            dflist = pool.map(functools.partial(self.func, dropna=dropna), self.handles)
        self._df = pd.concat(dflist)
    else:
        self._df = self.func(self.handles, dropna=dropna)

    return self._df


class TransformCatalogBaseConnections(pipeBase.PipelineTaskConnections,
                                  dimensions=()):
inputCatalog = connectionTypes.Input(
    name="",
    storageClass="DataFrame",
)
outputCatalog = connectionTypes.Output(
    name="",
    storageClass="ArrowAstropy",
)


class TransformCatalogBaseConfig(pipeBase.PipelineTaskConfig,
                             pipelineConnections=TransformCatalogBaseConnections):
functorFile = pexConfig.Field(
    dtype=str,
    doc="Path to YAML file specifying Science Data Model functors to use "
        "when copying columns and computing calibrated values.",
    default=None,
    optional=True
)
primaryKey = pexConfig.Field(
    dtype=str,
    doc="Name of column to be set as the DataFrame index. If None, the index"
        "will be named `id`",
    default=None,
    optional=True
)
columnsFromDataId = pexConfig.ListField(
    dtype=str,
    default=None,
    optional=True,
    doc="Columns to extract from the dataId",
)


class TransformCatalogBaseTask(pipeBase.PipelineTask):

Definition at line 723 of file postprocess.py.

Member Data Documentation

◆ args [1/2]

LocalNanojansky lsst.pipe.tasks.postprocess.for.args :
static

Definition at line 747 of file postprocess.py.

◆ args [2/2]

LocalNanojanskyErr lsst.pipe.tasks.postprocess.for.args :
static

Definition at line 754 of file postprocess.py.

◆ flags

lsst.pipe.tasks.postprocess.for.flags :
static

Definition at line 759 of file postprocess.py.

◆ funcs

lsst.pipe.tasks.postprocess.for.funcs :
static

Definition at line 736 of file postprocess.py.

◆ psfFlux

slot_Centroid_y lsst.pipe.tasks.postprocess.for.psfFlux :
static

Definition at line 745 of file postprocess.py.

◆ psfFluxErr

lsst.pipe.tasks.postprocess.for.psfFluxErr :
static

Definition at line 752 of file postprocess.py.

◆ sourceId

lsst.pipe.tasks.postprocess.for.sourceId :
static

Definition at line 737 of file postprocess.py.

◆ x

Index lsst.pipe.tasks.postprocess.for.x :
static

Definition at line 739 of file postprocess.py.

◆ y

slot_Centroid_x lsst.pipe.tasks.postprocess.for.y :
static

Definition at line 742 of file postprocess.py.


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