Loading [MathJax]/extensions/tex2jax.js
LSST Applications 29.0.0,g04dff08e69+0440ebfea4,g0fba68d861+39c7333094,g1ec0fe41b4+f536777771,g1fd858c14a+a9301854fb,g35bb328faa+fcb1d3bbc8,g4af146b050+f5e27e7465,g4d2262a081+0d1d1daf5f,g53246c7159+fcb1d3bbc8,g5a012ec0e7+3632fc3ff3,g60b5630c4e+197d614feb,g67b6fd64d1+ed4b5058f4,g78460c75b0+2f9a1b4bcd,g786e29fd12+cf7ec2a62a,g8352419a5c+fcb1d3bbc8,g87b7deb4dc+1a86cc64c8,g8852436030+620f385cd0,g89139ef638+ed4b5058f4,g9125e01d80+fcb1d3bbc8,g94187f82dc+197d614feb,g95f8561545+197d614feb,g989de1cb63+ed4b5058f4,g9d31334357+197d614feb,g9f33ca652e+a02529f034,gabe3b4be73+1e0a283bba,gabf8522325+fa80ff7197,gb1101e3267+c9f6ee41af,gb58c049af0+f03b321e39,gb89ab40317+ed4b5058f4,gc0bb628dac+6dec70b359,gcf25f946ba+620f385cd0,gcf6002c91b+54dde5f3ac,gd6cbbdb0b4+bb83cc51f8,gde0f65d7ad+588c1dba32,ge278dab8ac+d65b3c2b70,ge410e46f29+ed4b5058f4,gf23fb2af72+b9bd8e2eff,gf5e32f922b+fcb1d3bbc8,gf67bdafdda+ed4b5058f4
LSST Data Management Base Package
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
lsst::afw::table::io Namespace Reference

Namespaces

namespace  python
 

Classes

struct  ArchiveIndexSchema
 Schema for the index catalog that specifies where objects are stored in the data catalogs. More...
 
class  CatalogVector
 A vector of catalogs used by Persistable. More...
 
class  FitsColumnReader
 Polymorphic reader interface used to read different kinds of objects from one or more FITS binary table columns. More...
 
class  FitsReader
 A utility class for reading FITS binary tables. More...
 
class  FitsSchemaInputMapper
 A class that describes a mapping from a FITS binary table to an afw::table Schema. More...
 
struct  FitsSchemaItem
 A structure that describes a field as a collection of related strings read from the FITS header. More...
 
class  FitsWriter
 Writer object for FITS binary tables. More...
 
class  InputArchive
 A multi-catalog archive object used to load table::io::Persistable objects. More...
 
class  MalformedArchiveError
 An exception thrown when an InputArchive's contents do not make sense. More...
 
class  OutputArchive
 A multi-catalog archive object used to save table::io::Persistable objects. More...
 
class  OutputArchiveHandle
 An object passed to Persistable::write to allow it to persist itself. More...
 
class  Persistable
 A base class for objects that can be persisted via afw::table::io Archive classes. More...
 
class  PersistableFacade
 A CRTP facade class for subclasses of Persistable. More...
 
class  PersistableFactory
 A base class for factory classes used to reconstruct objects from records. More...
 
class  PersistenceError
 An exception thrown when problems occur during persistence. More...
 
class  WrapperCollection
 A helper class for subdividing pybind11 module across multiple translation units (i.e. More...
 

Typedefs

using PyInputArchive = py::class_<InputArchive, std::shared_ptr<InputArchive>>
 
using PyOutputArchive = py::class_<OutputArchive, std::shared_ptr<OutputArchive>>
 
using PyPersistable = py::class_<Persistable, std::shared_ptr<Persistable>>
 

Functions

void wrapFits (cpputils::python::WrapperCollection &wrappers)
 
void wrapInputArchive (cpputils::python::WrapperCollection &wrappers)
 
void wrapPersistable (WrapperCollection &)
 
void wrapOutputArchive (WrapperCollection &)
 
 PYBIND11_MODULE (_io, mod)
 
void erase (int column)
 

Typedef Documentation

◆ PyInputArchive

◆ PyOutputArchive

◆ PyPersistable

Function Documentation

◆ erase()

void lsst::afw::table::io::erase ( int column)

◆ PYBIND11_MODULE()

lsst::afw::table::io::PYBIND11_MODULE ( _io ,
mod  )

Definition at line 43 of file _io.cc.

43 {
44 WrapperCollection wrappers(mod, "lsst.afw.table.io");
45 wrapPersistable(wrappers);
46 wrapFits(wrappers);
47 wrapInputArchive(wrappers);
48 wrapOutputArchive(wrappers);
49 wrappers.finish();
50}
A helper class for subdividing pybind11 module across multiple translation units (i....
Definition python.h:242
void wrapPersistable(WrapperCollection &)
void wrapInputArchive(cpputils::python::WrapperCollection &wrappers)
void wrapOutputArchive(WrapperCollection &)
void wrapFits(cpputils::python::WrapperCollection &wrappers)
Definition _fits.cc:36

◆ wrapFits()

void lsst::afw::table::io::wrapFits ( cpputils::python::WrapperCollection & wrappers)

Definition at line 36 of file _fits.cc.

36 {
37 wrappers.wrap([](auto& mod) {
38 mod.def("setPreppedRowsFactor",
40 mod.def("getPreppedRowsFactor", []() { return FitsSchemaInputMapper::PREPPED_ROWS_FACTOR; });
41 });
42}
static std::size_t PREPPED_ROWS_FACTOR
When processing each column, divide this number by the record size (in bytes) and ask CFITSIO to read...
void wrap(WrapperCallback function)
Add a set of wrappers without defining a class.
Definition python.h:369

◆ wrapInputArchive()

void lsst::afw::table::io::wrapInputArchive ( cpputils::python::WrapperCollection & wrappers)

Definition at line 39 of file _inputArchive.cc.

39 {
40 wrappers.wrapType(PyInputArchive(wrappers.module, "InputArchive"), [](auto &mod, auto &cls) {
41 cls.def("get", &InputArchive::get<Persistable>);
42 cls.def("readFits", &InputArchive::readFits);
43 });
44}
PyType wrapType(PyType cls, ClassWrapperCallback function, bool setModuleName=true)
Add a type (class or enum) wrapper, deferring method and other attribute definitions until finish() i...
Definition python.h:391
pybind11::module module
The module object passed to the PYBIND11_MODULE block that contains this WrapperCollection.
Definition python.h:448
py::class_< InputArchive, std::shared_ptr< InputArchive > > PyInputArchive

◆ wrapOutputArchive()

void lsst::afw::table::io::wrapOutputArchive ( WrapperCollection & wrappers)

Definition at line 40 of file _outputArchive.cc.

40 {
41 wrappers.wrapType(PyOutputArchive(wrappers.module, "OutputArchive"), [](auto &mod, auto &cls) {
42 cls.def(py::init<>());
43 cls.def("put",
44 py::overload_cast<std::shared_ptr<Persistable const>, bool>(&OutputArchive::put),
45 "obj"_a, "permissive"_a=false
46 );
47 cls.def("writeFits", &OutputArchive::writeFits);
48 });
49}
py::class_< OutputArchive, std::shared_ptr< OutputArchive > > PyOutputArchive

◆ wrapPersistable()

void lsst::afw::table::io::wrapPersistable ( WrapperCollection & wrappers)

Definition at line 39 of file _persistable.cc.

39 {
40 // TODO: uncomment once afw.fits uses WrapperCollection
41 // wrappers.addSignatureDependency("lsst.afw.fits");
42
43 wrappers.wrapType(PyPersistable(wrappers.module, "Persistable"), [](auto &mod, auto &cls) {
44 cls.def("writeFits",
45 (void (Persistable::*)(std::string const &, std::string const &) const) &
46 Persistable::writeFits,
47 "fileName"_a, "mode"_a = "w");
48 cls.def("writeFits",
49 (void (Persistable::*)(fits::MemFileManager &, std::string const &) const) &
50 Persistable::writeFits,
51 "manager"_a, "mode"_a = "w");
52 cls.def("isPersistable", &Persistable::isPersistable);
53 });
54}
py::class_< Persistable, std::shared_ptr< Persistable > > PyPersistable