Namespace lsst::afw::table::python

namespace python

Typedefs

using PyCatalog = pybind11::class_<CatalogT<Record>, std::shared_ptr<CatalogT<Record>>>
using PyColumnView = pybind11::class_<ColumnViewT<Record>, std::shared_ptr<ColumnViewT<Record>>, BaseColumnView>
using PySortedCatalog = pybind11::class_<SortedCatalogT<Record>, std::shared_ptr<SortedCatalogT<Record>>, CatalogT<Record>>

Functions

template<typename T, typename Record>
ndarray::Array<typename Field<T>::Value const, 1, 1> _getArrayFromCatalog(CatalogT<Record> const &catalog, Key<T> const &key)

Extract a column from a potentially non-contiguous Catalog.

Parameters
  • catalog: Catalog

  • key: Key to column to extract

template<typename Record>
ndarray::Array<double const, 1, 1> _getArrayFromCatalog(CatalogT<Record> const &catalog, Key<lsst::geom::Angle> const &key)

Parameters
  • catalog: Catalog

  • key: Key to column to extract

template<typename T, typename Record>
void declareCatalogOverloads(PyCatalog<Record> &cls)

Declare field-type-specific overloaded catalog member functions for one field type

Template Parameters
Parameters
  • [in] cls: Catalog pybind11 class.

template<typename Record>
PyCatalog<Record> declareCatalog(utils::python::WrapperCollection &wrappers, std::string const &name, bool isBase = false)

Wrap an instantiation of lsst::afw::table::CatalogT<Record>.

In addition to calling this method you must call addCatalogMethods on the class object in Python.

Template Parameters
Parameters
  • [in] wrappers: Package manager class will be added to.

  • [in] name: Name prefix of the record type, e.g. “Base” or “Simple”.

  • [in] isBase: Whether this instantiation is only being used as a base class (used to set the class name).

template<typename Record>
PyColumnView<Record> declareColumnView(utils::python::WrapperCollection &wrappers, std::string const &name, bool isBase = false)

Declare member and static functions for a given instantiation of lsst::afw::table::ColumnViewT<RecordT>.

Template Parameters
Parameters
  • [in] wrappers: Package manager class will be added to.

  • [in] name: Name prefix of the record type, e.g. “Base” or “Simple”.

  • [in] isBase: Whether this instantiation is only being used as a base class (used to set the class name).

template<typename Record>
PySortedCatalog<Record> declareSortedCatalog(utils::python::WrapperCollection &wrappers, std::string const &name, bool isBase = false)

Wrap an instantiation of lsst::afw::table::SortedCatalogT<Record>.

In addition to calling this method (which also instantiates and wraps the CatalogT base class), you must call addCatalogMethods on the class object in Python.

Template Parameters
Parameters
  • [in] wrappers: Package manager class will be added to.

  • [in] name: Name prefix of the record type, e.g. “Base” or “Simple”.

  • [in] isBase: Whether this instantiation is only being used as a base class (used to set the class name).