Catalog¶
-
class
lsst.afw.table.
Catalog
¶ Bases:
object
Attributes Summary
TEMPLATE_DEFAULTS
TEMPLATE_PARAMS
columns
a column view of the catalog Methods Summary
addNew
()append
(record)asAstropy
([cls, copy, unviewable])Return an astropy.table.Table (or subclass thereof) view into this catalog. cast
(type_[, deep])Return a copy of the catalog with the given type. clear
()copy
([deep])Copy a catalog (default is not a deep copy). extend
(iterable[, deep, mapper])Append all records in the given iterable to the catalog. getColumnView
()insert
(key, value)Attributes Documentation
-
TEMPLATE_DEFAULTS
= (None,)¶
-
TEMPLATE_PARAMS
= ('dtype',)¶
-
columns
¶ a column view of the catalog
Methods Documentation
-
addNew
()¶
-
append
(record)¶
-
asAstropy
(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
impliesastropy.table.Table
itself. Useastropy.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
andFlag
) 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.
-
cast
(type_, deep=False)¶ Return a copy of the catalog with the given type.
Parameters: Returns: - copy :
Copy of catalog with the requested type.
-
clear
()¶
-
copy
(deep=False)¶ Copy a catalog (default is not a deep copy).
-
extend
(iterable, deep=False, mapper=None)¶ Append all records in the given iterable to the catalog.
Parameters:
-
getColumnView
()¶
-
insert
(key, value)¶
-