LSST Applications g02d81e74bb+86cf3d8bc9,g180d380827+7a4e862ed4,g2079a07aa2+86d27d4dc4,g2305ad1205+e1ca1c66fa,g29320951ab+012e1474a1,g295015adf3+341ea1ce94,g2bbee38e9b+0e5473021a,g337abbeb29+0e5473021a,g33d1c0ed96+0e5473021a,g3a166c0a6a+0e5473021a,g3ddfee87b4+c429d67c83,g48712c4677+f88676dd22,g487adcacf7+27e1e21933,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+b41db86c35,g5a732f18d5+53520f316c,g64a986408d+86cf3d8bc9,g858d7b2824+86cf3d8bc9,g8a8a8dda67+585e252eca,g99cad8db69+84912a7fdc,g9ddcbc5298+9a081db1e4,ga1e77700b3+15fc3df1f7,ga8c6da7877+a2b54eae19,gb0e22166c9+60f28cb32d,gba4ed39666+c2a2e4ac27,gbb8dafda3b+6681f309db,gc120e1dc64+f0fcc2f6d8,gc28159a63d+0e5473021a,gcf0d15dbbd+c429d67c83,gdaeeff99f8+f9a426f77a,ge6526c86ff+0433e6603d,ge79ae78c31+0e5473021a,gee10cc3b42+585e252eca,gff1a9f87cc+86cf3d8bc9,w.2024.17
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 (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}
Tag types used to declare specialized field types.
Definition misc.h:31
void wrapPersistable(WrapperCollection &)
void wrapInputArchive(utils::python::WrapperCollection &wrappers)
void wrapOutputArchive(WrapperCollection &)
void wrapFits(utils::python::WrapperCollection &wrappers)
Definition _fits.cc:36

◆ 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

◆ wrapPersistable() [2/2]

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