|
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) |
|
|
| columns = property(__getColumns, doc="a column view of the catalog") |
|
Definition at line 73 of file _base.py.
◆ __delitem__()
def lsst.afw.table._base.Catalog.__delitem__ |
( |
|
self, |
|
|
|
key |
|
) |
| |
◆ __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 |
|
) |
| |
◆ __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 | ) |
|
◆ __repr__()
def lsst.afw.table._base.Catalog.__repr__ |
( |
|
self | ) |
|
◆ __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 | ) |
|
◆ addNew()
def lsst.afw.table._base.Catalog.addNew |
( |
|
self | ) |
|
◆ append()
def lsst.afw.table._base.Catalog.append |
( |
|
self, |
|
|
|
record |
|
) |
| |
◆ 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 | ) |
|
◆ 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 | ) |
|
◆ insert()
def lsst.afw.table._base.Catalog.insert |
( |
|
self, |
|
|
|
key, |
|
|
|
value |
|
) |
| |
◆ columns
lsst.afw.table._base.Catalog.columns = property(__getColumns, doc="a column view of the catalog") |
|
static |
The documentation for this class was generated from the following file: