LSST Applications g063fba187b+fee0456c91,g0f08755f38+ea96e5a5a3,g1653933729+a8ce1bb630,g168dd56ebc+a8ce1bb630,g1a2382251a+90257ff92a,g20f6ffc8e0+ea96e5a5a3,g217e2c1bcf+937a289c59,g28da252d5a+daa7da44eb,g2bbee38e9b+253935c60e,g2bc492864f+253935c60e,g3156d2b45e+6e55a43351,g32e5bea42b+31359a2a7a,g347aa1857d+253935c60e,g35bb328faa+a8ce1bb630,g3a166c0a6a+253935c60e,g3b1af351f3+a8ce1bb630,g3e281a1b8c+c5dd892a6c,g414038480c+416496e02f,g41af890bb2+afe91b1188,g599934f4f4+0db33f7991,g7af13505b9+e36de7bce6,g80478fca09+da231ba887,g82479be7b0+a4516e59e3,g858d7b2824+ea96e5a5a3,g89c8672015+f4add4ffd5,g9125e01d80+a8ce1bb630,ga5288a1d22+bc6ab8dfbd,gb58c049af0+d64f4d3760,gc28159a63d+253935c60e,gcab2d0539d+3f2b72788c,gcf0d15dbbd+4ea9c45075,gda6a2b7d83+4ea9c45075,gdaeeff99f8+1711a396fd,ge79ae78c31+253935c60e,gef2f8181fd+3031e3cf99,gf0baf85859+c1f95f4921,gfa517265be+ea96e5a5a3,gfa999e8aa5+17cd334064,w.2024.50
LSST Data Management Base Package
|
Public Member Functions | |
getColumnView (self) | |
__getitem__ (self, key) | |
__setitem__ (self, key, value) | |
__delitem__ (self, key) | |
append (self, record) | |
insert (self, key, value) | |
clear (self) | |
addNew (self) | |
cast (self, type_, deep=False) | |
copy (self, deep=False) | |
extend (self, iterable, deep=False, mapper=None) | |
__reduce__ (self) | |
asAstropy (self, cls=None, copy=False, unviewable="copy") | |
__dir__ (self) | |
__getattr__ (self, name) | |
__str__ (self) | |
__repr__ (self) | |
extract (self, *patterns, **kwds) | |
Public Attributes | |
table | |
Protected Attributes | |
_columns | |
Properties | |
columns = property(__getColumns, doc="a column view of the catalog") | |
lsst.afw.table._base.Catalog.__delitem__ | ( | self, | |
key ) |
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 311 of file _base.py.
lsst.afw.table._base.Catalog.__getattr__ | ( | self, | |
name ) |
Definition at line 331 of file _base.py.
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.
lsst.afw.table._base.Catalog.__reduce__ | ( | self | ) |
lsst.afw.table._base.Catalog.__repr__ | ( | self | ) |
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 114 of file _base.py.
lsst.afw.table._base.Catalog.__str__ | ( | self | ) |
lsst.afw.table._base.Catalog.addNew | ( | self | ) |
lsst.afw.table._base.Catalog.append | ( | self, | |
record ) |
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 220 of file _base.py.
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 153 of file _base.py.
lsst.afw.table._base.Catalog.clear | ( | self | ) |
lsst.afw.table._base.Catalog.copy | ( | self, | |
deep = False ) |
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 183 of file _base.py.
lsst.afw.table._base.Catalog.extract | ( | self, | |
* | patterns, | ||
** | kwds ) |
Extract a dictionary of {<name>: <column-array>} in which the field names match the given shell-style glob pattern(s). Any number of glob patterns may be passed (including none); the result will be the union of all the result of each glob considered separately. Note that extract("*", copy=True) provides an easy way to transform a catalog into a set of writeable contiguous NumPy arrays. This routines unpacks `Flag` columns into full boolean arrays. String fields are silently ignored. Parameters ---------- patterns : Array of `str` List of glob patterns to use to select field names. kwds : `dict` Dictionary of additional keyword arguments. May contain: ``items`` : `list` The result of a call to self.schema.extract(); this will be used instead of doing any new matching, and allows the pattern matching to be reused to extract values from multiple records. This keyword is incompatible with any position arguments and the regex, sub, and ordered keyword arguments. ``where`` : array index expression Any expression that can be passed as indices to a NumPy array, including slices, boolean arrays, and index arrays, that will be used to index each column array. This is applied before arrays are copied when copy is True, so if the indexing results in an implicit copy no unnecessary second copy is performed. ``copy`` : `bool` If True, the returned arrays will be contiguous copies rather than strided views into the catalog. This ensures that the lifetime of the catalog is not tied to the lifetime of a particular catalog, and it also may improve the performance if the array is used repeatedly. Default is False. Copies are always made if the catalog is noncontiguous, but if ``copy=False`` these set as read-only to ensure code does not assume they are views that could modify the original catalog. ``regex`` : `str` or `re` pattern A regular expression to be used in addition to any glob patterns passed as positional arguments. Note that this will be compared with re.match, not re.search. ``sub`` : `str` A replacement string (see re.MatchObject.expand) used to set the dictionary keys of any fields matched by regex. ``ordered`` : `bool` If True, a collections.OrderedDict will be returned instead of a standard dict, with the order corresponding to the definition order of the Schema. Default is False. Returns ------- d : `dict` Dictionary of extracted name-column array sets. Raises ------ ValueError Raised if a list of ``items`` is supplied with additional keywords.
Definition at line 353 of file _base.py.
lsst.afw.table._base.Catalog.getColumnView | ( | self | ) |
lsst.afw.table._base.Catalog.insert | ( | self, | |
key, | |||
value ) |