LSST Applications  21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
Namespaces | Classes | Typedefs | Functions
lsst::afw::table::io Namespace Reference

Namespaces

 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  FitsReader
 A utility class for reading FITS binary tables. More...
 
class  FitsColumnReader
 Polymorphic reader interface used to read different kinds of objects from one or more FITS binary table columns. More...
 
struct  FitsSchemaItem
 A structure that describes a field as a collection of related strings read from the FITS header. More...
 
class  FitsSchemaInputMapper
 A class that describes a mapping from a FITS binary table to an afw::table Schema. 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  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  PersistenceError
 An exception thrown when problems occur during persistence. More...
 
class  MalformedArchiveError
 An exception thrown when an InputArchive's contents do not make sense. 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...
 

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 (utils::python::WrapperCollection &wrappers)
 
void wrapInputArchive (utils::python::WrapperCollection &wrappers)
 
void wrapFits (WrapperCollection &)
 
void wrapPersistable (WrapperCollection &)
 
void wrapInputArchive (WrapperCollection &)
 
void wrapOutputArchive (WrapperCollection &)
 
 PYBIND11_MODULE (_io, mod)
 
void wrapOutputArchive (utils::python::WrapperCollection &wrappers)
 
void wrapPersistable (utils::python::WrapperCollection &wrappers)
 
void erase (int column)
 

Typedef Documentation

◆ PyInputArchive

Definition at line 37 of file _inputArchive.cc.

◆ PyOutputArchive

Definition at line 38 of file _outputArchive.cc.

◆ PyPersistable

Definition at line 37 of file _persistable.cc.

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 }
void wrapPersistable(WrapperCollection &)
void wrapFits(WrapperCollection &)
void wrapOutputArchive(WrapperCollection &)
void wrapInputArchive(WrapperCollection &)

◆ wrapFits() [1/2]

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

Definition at line 36 of file _fits.cc.

36  {
37  wrappers.wrap([](auto& mod) {
38  mod.def("setPreppedRowsFactor",
39  [](std::size_t n) { FitsSchemaInputMapper::PREPPED_ROWS_FACTOR = n; });
40  mod.def("getPreppedRowsFactor", []() { return FitsSchemaInputMapper::PREPPED_ROWS_FACTOR; });
41  });
42 }

◆ wrapFits() [2/2]

void lsst::afw::table::io::wrapFits ( WrapperCollection &  )

◆ wrapInputArchive() [1/2]

void lsst::afw::table::io::wrapInputArchive ( utils::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 }
py::class_< InputArchive, std::shared_ptr< InputArchive > > PyInputArchive

◆ wrapInputArchive() [2/2]

void lsst::afw::table::io::wrapInputArchive ( WrapperCollection &  )

◆ wrapOutputArchive() [1/2]

void lsst::afw::table::io::wrapOutputArchive ( utils::python::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

◆ wrapOutputArchive() [2/2]

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

◆ wrapPersistable() [1/2]

void lsst::afw::table::io::wrapPersistable ( utils::python::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
Definition: _persistable.cc:37

◆ wrapPersistable() [2/2]

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