lsst.pipe.tasks gcedae5159b+afaec0eb3d
Loading...
Searching...
No Matches
lsst.pipe.tasks.functors.HtmIndex20 Class Reference
Inheritance diagram for lsst.pipe.tasks.functors.HtmIndex20:
lsst.pipe.tasks.functors.Functor

Public Member Functions

 __init__ (self, ra, dec, **kwargs)
 
 name (self)
 
 noDup (self)
 
 columns (self)
 
 multilevelColumns (self, data, columnIndex=None, returnTuple=False)
 
 __call__ (self, data, dropna=False)
 
 difference (self, data1, data2, **kwargs)
 
 fail (self, df)
 
 shortname (self)
 

Public Attributes

 pixelator = sphgeom.HtmPixelization(self.htmLevel)
 
 ra = ra
 
 dec = dec
 
 filt = filt
 
str dataset = dataset if dataset is not None else self._defaultDataset
 
 log = logging.getLogger(type(self).__name__)
 
 name
 

Static Public Attributes

int htmLevel = 20
 

Protected Member Functions

 _func (self, df)
 
 _get_data_columnLevels (self, data, columnIndex=None)
 
 _get_data_columnLevelNames (self, data, columnIndex=None)
 
 _colsFromDict (self, colDict, columnIndex=None)
 
 _get_columnIndex (self, data)
 
 _get_data (self, data)
 
 _setLevels (self, df)
 
 _dropna (self, vals)
 

Protected Attributes

list _columns = [self.ra, self.dec]
 
 _noDup = noDup
 

Static Protected Attributes

bool _radians = True
 
str _defaultDataset = 'ref'
 
tuple _dfLevels = ('column',)
 
bool _defaultNoDup = False
 

Detailed Description

Compute the level 20 HtmIndex for the catalog.

Notes
-----
This functor was implemented to satisfy requirements of old APDB interface
which required the ``pixelId`` column in DiaObject with HTM20 index.
The APDB interface had migrated to not need that information, but we keep
this class in case it may be useful for something else.

Definition at line 772 of file functors.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.pipe.tasks.functors.HtmIndex20.__init__ ( self,
ra,
dec,
** kwargs )

Definition at line 786 of file functors.py.

Member Function Documentation

◆ __call__()

lsst.pipe.tasks.functors.Functor.__call__ ( self,
data,
dropna = False )
inherited

Definition at line 348 of file functors.py.

◆ _colsFromDict()

lsst.pipe.tasks.functors.Functor._colsFromDict ( self,
colDict,
columnIndex = None )
protectedinherited
Converts dictionary column specficiation to a list of columns.

Definition at line 218 of file functors.py.

◆ _dropna()

lsst.pipe.tasks.functors.Functor._dropna ( self,
vals )
protectedinherited

Definition at line 345 of file functors.py.

◆ _func()

lsst.pipe.tasks.functors.HtmIndex20._func ( self,
df )
protected

Reimplemented from lsst.pipe.tasks.functors.Functor.

Definition at line 793 of file functors.py.

◆ _get_columnIndex()

lsst.pipe.tasks.functors.Functor._get_columnIndex ( self,
data )
protectedinherited
Return columnIndex.

Definition at line 294 of file functors.py.

◆ _get_data()

lsst.pipe.tasks.functors.Functor._get_data ( self,
data )
protectedinherited
Retrieve DataFrame necessary for calculation.

The data argument can be a `~pandas.DataFrame`, a
`~lsst.daf.butler.DeferredDatasetHandle`, or
an `~lsst.pipe.base.InMemoryDatasetHandle`.

Returns a DataFrame upon which `self._func` can act.

Definition at line 302 of file functors.py.

◆ _get_data_columnLevelNames()

lsst.pipe.tasks.functors.Functor._get_data_columnLevelNames ( self,
data,
columnIndex = None )
protectedinherited
Gets the content of each of the column levels for a multilevel
table.

Definition at line 204 of file functors.py.

◆ _get_data_columnLevels()

lsst.pipe.tasks.functors.Functor._get_data_columnLevels ( self,
data,
columnIndex = None )
protectedinherited
Gets the names of the column index levels.

This should only be called in the context of a multilevel table.

Parameters
----------
data : various
    The data to be read, can be a
    `~lsst.daf.butler.DeferredDatasetHandle` or
    `~lsst.pipe.base.InMemoryDatasetHandle`.
columnIndex (optional): pandas `~pandas.Index` object
    If not passed, then it is read from the
    `~lsst.daf.butler.DeferredDatasetHandle`
    for `~lsst.pipe.base.InMemoryDatasetHandle`.

Definition at line 184 of file functors.py.

◆ _setLevels()

lsst.pipe.tasks.functors.Functor._setLevels ( self,
df )
protectedinherited

Definition at line 340 of file functors.py.

◆ columns()

◆ difference()

lsst.pipe.tasks.functors.Functor.difference ( self,
data1,
data2,
** kwargs )
inherited
Computes difference between functor called on two different
DataFrame/Handle objects.

Definition at line 360 of file functors.py.

◆ fail()

lsst.pipe.tasks.functors.Functor.fail ( self,
df )
inherited

Definition at line 366 of file functors.py.

◆ multilevelColumns()

lsst.pipe.tasks.functors.Functor.multilevelColumns ( self,
data,
columnIndex = None,
returnTuple = False )
inherited
Returns columns needed by functor from multilevel dataset.

To access tables with multilevel column structure, the
`~lsst.daf.butler.DeferredDatasetHandle` or
`~lsst.pipe.base.InMemoryDatasetHandle` needs to be passed
either a list of tuples or a dictionary.

Parameters
----------
data : various
    The data as either `~lsst.daf.butler.DeferredDatasetHandle`, or
    `~lsst.pipe.base.InMemoryDatasetHandle`.
columnIndex (optional): pandas `~pandas.Index` object
    Either passed or read in from
    `~lsst.daf.butler.DeferredDatasetHandle`.
`returnTuple` : `bool`
    If true, then return a list of tuples rather than the column
    dictionary specification.
    This is set to `True` by `CompositeFunctor` in order to be able to
    combine columns from the various component functors.

Reimplemented in lsst.pipe.tasks.functors.Color, and lsst.pipe.tasks.functors.CompositeFunctor.

Definition at line 237 of file functors.py.

◆ name()

◆ noDup()

lsst.pipe.tasks.functors.Functor.noDup ( self)
inherited
Do not explode by band if used on object table.

Definition at line 170 of file functors.py.

◆ shortname()

lsst.pipe.tasks.functors.Functor.shortname ( self)
inherited
Short name of functor (suitable for column name/dict key).

Reimplemented in lsst.pipe.tasks.functors.Color, and lsst.pipe.tasks.functors.MagDiff.

Definition at line 375 of file functors.py.

Member Data Documentation

◆ _columns

list lsst.pipe.tasks.functors.HtmIndex20._columns = [self.ra, self.dec]
protected

Definition at line 790 of file functors.py.

◆ _defaultDataset

str lsst.pipe.tasks.functors.Functor._defaultDataset = 'ref'
staticprotectedinherited

Definition at line 159 of file functors.py.

◆ _defaultNoDup

bool lsst.pipe.tasks.functors.Functor._defaultNoDup = False
staticprotectedinherited

Definition at line 161 of file functors.py.

◆ _dfLevels

tuple lsst.pipe.tasks.functors.Functor._dfLevels = ('column',)
staticprotectedinherited

Definition at line 160 of file functors.py.

◆ _noDup

lsst.pipe.tasks.functors.Functor._noDup = noDup
protectedinherited

Definition at line 166 of file functors.py.

◆ _radians

bool lsst.pipe.tasks.functors.HtmIndex20._radians = True
staticprotected

Definition at line 784 of file functors.py.

◆ dataset

str lsst.pipe.tasks.functors.Functor.dataset = dataset if dataset is not None else self._defaultDataset
inherited

Definition at line 165 of file functors.py.

◆ dec

lsst.pipe.tasks.functors.HtmIndex20.dec = dec

Definition at line 789 of file functors.py.

◆ filt

lsst.pipe.tasks.functors.Functor.filt = filt
inherited

◆ htmLevel

int lsst.pipe.tasks.functors.HtmIndex20.htmLevel = 20
static

Definition at line 783 of file functors.py.

◆ log

lsst.pipe.tasks.functors.Functor.log = logging.getLogger(type(self).__name__)
inherited

Definition at line 167 of file functors.py.

◆ name

◆ pixelator

lsst.pipe.tasks.functors.HtmIndex20.pixelator = sphgeom.HtmPixelization(self.htmLevel)

Definition at line 787 of file functors.py.

◆ ra

lsst.pipe.tasks.functors.HtmIndex20.ra = ra

Definition at line 788 of file functors.py.


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