LSST Applications g0fba68d861+539c3c8198,g1ec0fe41b4+f0b7a83aa5,g1fd858c14a+78b1f303e5,g22210bfa2a+8e34e7f00e,g2440f9efcc+8c5ae1fdc5,g3533f9d6cb+f4db8b1b3b,g35bb328faa+8c5ae1fdc5,g3fc7d4f5b9+a4d3a2d8bb,g40d01f57dd+ad4ae80abb,g4178042926+abd409f097,g53246c7159+8c5ae1fdc5,g548d740b8c+47e4a7beb3,g60b5630c4e+f4db8b1b3b,g663da51e9b+e0f2ae43b2,g67b6fd64d1+c104138150,g78460c75b0+7e33a9eb6d,g786e29fd12+668abc6043,g8352419a5c+8c5ae1fdc5,g8852436030+d435302cbd,g89139ef638+c104138150,g8b40312ef5+5b6744d273,g90aefe88b0+c7f866738c,g989de1cb63+c104138150,g9f33ca652e+0b88989aa6,ga2f891cd6c+f4db8b1b3b,gabe3b4be73+8856018cbb,gabf8522325+5cb9e9d408,gb1101e3267+78d08b86ce,gb89ab40317+c104138150,gcf25f946ba+d435302cbd,gd6cbbdb0b4+be834e5da7,gde0f65d7ad+a7114e3dba,ge278dab8ac+fa35eb453c,ge410e46f29+c104138150,gf35d7ec915+97dd712d81,gf5e32f922b+8c5ae1fdc5,gf67bdafdda+c104138150,gffe7e49bb4+f4db8b1b3b,v29.1.0.rc2
LSST Data Management Base Package
Loading...
Searching...
No Matches
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