LSST Applications g063fba187b+cac8b7c890,g0f08755f38+6aee506743,g1653933729+a8ce1bb630,g168dd56ebc+a8ce1bb630,g1a2382251a+b4475c5878,g1dcb35cd9c+8f9bc1652e,g20f6ffc8e0+6aee506743,g217e2c1bcf+73dee94bd0,g28da252d5a+1f19c529b9,g2bbee38e9b+3f2625acfc,g2bc492864f+3f2625acfc,g3156d2b45e+6e55a43351,g32e5bea42b+1bb94961c2,g347aa1857d+3f2625acfc,g35bb328faa+a8ce1bb630,g3a166c0a6a+3f2625acfc,g3e281a1b8c+c5dd892a6c,g3e8969e208+a8ce1bb630,g414038480c+5927e1bc1e,g41af890bb2+8a9e676b2a,g7af13505b9+809c143d88,g80478fca09+6ef8b1810f,g82479be7b0+f568feb641,g858d7b2824+6aee506743,g89c8672015+f4add4ffd5,g9125e01d80+a8ce1bb630,ga5288a1d22+2903d499ea,gb58c049af0+d64f4d3760,gc28159a63d+3f2625acfc,gcab2d0539d+b12535109e,gcf0d15dbbd+46a3f46ba9,gda6a2b7d83+46a3f46ba9,gdaeeff99f8+1711a396fd,ge79ae78c31+3f2625acfc,gef2f8181fd+0a71e47438,gf0baf85859+c1f95f4921,gfa517265be+6aee506743,gfa999e8aa5+17cd334064,w.2024.51
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