lsst.afw g4f4f280218+33796f850d
Public Member Functions | Properties | List of all members
lsst.afw.table._base.Catalog Class Reference
Inheritance diagram for lsst.afw.table._base.Catalog:

Public Member Functions

def getColumnView (self)
 
def __getitem__ (self, key)
 
def __setitem__ (self, key, value)
 
def __delitem__ (self, key)
 
def append (self, record)
 
def insert (self, key, value)
 
def clear (self)
 
def addNew (self)
 
def cast (self, type_, deep=False)
 
def copy (self, deep=False)
 
def extend (self, iterable, deep=False, mapper=None)
 
def __reduce__ (self)
 
def asAstropy (self, cls=None, copy=False, unviewable="copy")
 
def __dir__ (self)
 
def __getattr__ (self, name)
 
def __str__ (self)
 
def __repr__ (self)
 

Properties

 columns = property(__getColumns, doc="a column view of the catalog")
 

Detailed Description

Definition at line 73 of file _base.py.

Member Function Documentation

◆ __delitem__()

def lsst.afw.table._base.Catalog.__delitem__ (   self,
  key 
)

Definition at line 136 of file _base.py.

◆ __dir__()

def lsst.afw.table._base.Catalog.__dir__ (   self)
This custom dir is necessary due to the custom getattr below.
Without it, not all of the methods available are returned with dir.
See DM-7199.

Definition at line 317 of file _base.py.

◆ __getattr__()

def lsst.afw.table._base.Catalog.__getattr__ (   self,
  name 
)

Definition at line 337 of file _base.py.

◆ __getitem__()

def lsst.afw.table._base.Catalog.__getitem__ (   self,
  key 
)
Return the record at index key if key is an integer,
return a column if `key` is a string field name or Key,
or return a subset of the catalog if key is a slice
or boolean NumPy array.

Definition at line 85 of file _base.py.

◆ __reduce__()

def lsst.afw.table._base.Catalog.__reduce__ (   self)

Definition at line 222 of file _base.py.

◆ __repr__()

def lsst.afw.table._base.Catalog.__repr__ (   self)

Definition at line 356 of file _base.py.

◆ __setitem__()

def lsst.afw.table._base.Catalog.__setitem__ (   self,
  key,
  value 
)
If ``key`` is an integer, set ``catalog[key]`` to
``value``. Otherwise select column ``key`` and set it to
``value``.

Definition at line 120 of file _base.py.

◆ __str__()

def lsst.afw.table._base.Catalog.__str__ (   self)

Definition at line 349 of file _base.py.

◆ addNew()

def lsst.afw.table._base.Catalog.addNew (   self)

Definition at line 155 of file _base.py.

◆ append()

def lsst.afw.table._base.Catalog.append (   self,
  record 
)

Definition at line 143 of file _base.py.

◆ asAstropy()

def lsst.afw.table._base.Catalog.asAstropy (   self,
  cls = None,
  copy = False,
  unviewable = "copy" 
)
Return an astropy.table.Table (or subclass thereof) view into this catalog.

Parameters
----------
cls :
    Table subclass to use; `None` implies `astropy.table.Table`
    itself.  Use `astropy.table.QTable` to get Quantity columns.
copy : bool, optional
    If `True`, copy data from the LSST catalog to the astropy
    table.  Not copying is usually faster, but can keep memory
    from being freed if columns are later removed from the
    Astropy view.
unviewable : `str`, optional
    One of the following options (which is ignored if
    copy=`True` ), indicating how to handle field types (`str`
    and `Flag`) for which views cannot be constructed:

    - 'copy' (default): copy only the unviewable fields.
    - 'raise': raise ValueError if unviewable fields are present.
    - 'skip': do not include unviewable fields in the Astropy Table.

Returns
-------
cls : `astropy.table.Table`
    Astropy view into the catalog.

Raises
------
ValueError
    Raised if the `unviewable` option is not a known value, or
    if the option is 'raise' and an uncopyable field is found.

Definition at line 226 of file _base.py.

◆ cast()

def lsst.afw.table._base.Catalog.cast (   self,
  type_,
  deep = False 
)
Return a copy of the catalog with the given type.

Parameters
----------
type_ :
    Type of catalog to return.
deep : `bool`, optional
    If `True`, clone the table and deep copy all records.

Returns
-------
copy :
    Copy of catalog with the requested type.

Definition at line 159 of file _base.py.

◆ clear()

def lsst.afw.table._base.Catalog.clear (   self)

Definition at line 151 of file _base.py.

◆ copy()

def lsst.afw.table._base.Catalog.copy (   self,
  deep = False 
)
Copy a catalog (default is not a deep copy).

Definition at line 183 of file _base.py.

◆ extend()

def lsst.afw.table._base.Catalog.extend (   self,
  iterable,
  deep = False,
  mapper = None 
)
Append all records in the given iterable to the catalog.

Parameters
----------
iterable :
    Any Python iterable containing records.
deep : `bool`, optional
    If `True`, the records will be deep-copied; ignored if
    mapper is not `None` (that always implies `True`).
mapper : `lsst.afw.table.schemaMapper.SchemaMapper`, optional
    Used to translate records.

Definition at line 189 of file _base.py.

◆ getColumnView()

def lsst.afw.table._base.Catalog.getColumnView (   self)

Definition at line 75 of file _base.py.

◆ insert()

def lsst.afw.table._base.Catalog.insert (   self,
  key,
  value 
)

Definition at line 147 of file _base.py.

Property Documentation

◆ columns

lsst.afw.table._base.Catalog.columns = property(__getColumns, doc="a column view of the catalog")
static

Definition at line 83 of file _base.py.


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