LSST Applications g0f08755f38+9c285cab97,g1635faa6d4+13f3999e92,g1653933729+a8ce1bb630,g1a0ca8cf93+bf6eb00ceb,g28da252d5a+0829b12dee,g29321ee8c0+5700dc9eac,g2bbee38e9b+9634bc57db,g2bc492864f+9634bc57db,g2cdde0e794+c2c89b37c4,g3156d2b45e+41e33cbcdc,g347aa1857d+9634bc57db,g35bb328faa+a8ce1bb630,g3a166c0a6a+9634bc57db,g3e281a1b8c+9f2c4e2fc3,g414038480c+077ccc18e7,g41af890bb2+fde0dd39b6,g5fbc88fb19+17cd334064,g781aacb6e4+a8ce1bb630,g80478fca09+55a9465950,g82479be7b0+d730eedb7d,g858d7b2824+9c285cab97,g9125e01d80+a8ce1bb630,g9726552aa6+10f999ec6a,ga5288a1d22+2a84bb7594,gacf8899fa4+c69c5206e8,gae0086650b+a8ce1bb630,gb58c049af0+d64f4d3760,gc28159a63d+9634bc57db,gcf0d15dbbd+4b7d09cae4,gda3e153d99+9c285cab97,gda6a2b7d83+4b7d09cae4,gdaeeff99f8+1711a396fd,ge2409df99d+5e831397f4,ge79ae78c31+9634bc57db,gf0baf85859+147a0692ba,gf3967379c6+41c94011de,gf3fb38a9a8+8f07a9901b,gfb92a5be7c+9c285cab97,w.2024.46
LSST Data Management Base Package
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Functions
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...
 

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

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}
Tag types used to declare specialized field types.
Definition misc.h:31
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",
39 [](std::size_t n) { FitsSchemaInputMapper::PREPPED_ROWS_FACTOR = n; });
40 mod.def("getPreppedRowsFactor", []() { return FitsSchemaInputMapper::PREPPED_ROWS_FACTOR; });
41 });
42}
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
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