Namespace lsst::afw::formatters

namespace formatters

Functions

bool extractOptionalFlag(std::shared_ptr<lsst::daf::base::PropertySet const> const &properties, std::string const &name)

Returns true if and only if properties is non-null and contains a unique property with the given name that has type bool and a value of true.

std::string const getItemName(std::shared_ptr<lsst::daf::base::PropertySet const> const &properties)

Extracts and returns the string-valued "itemName" property from the given data property object.

Exceptions
  • lsst::pex::exceptions::InvalidParameterError: If the given pointer is null, or the PropertySet pointed to does not contain a unique property named "itemName".

int extractSliceId(std::shared_ptr<lsst::daf::base::PropertySet const> const &properties)
int64_t extractFpaExposureId(std::shared_ptr<lsst::daf::base::PropertySet const> const &properties)
int64_t extractCcdExposureId(std::shared_ptr<lsst::daf::base::PropertySet const> const &properties)
int64_t extractAmpExposureId(std::shared_ptr<lsst::daf::base::PropertySet const> const &properties)
int extractVisitId(std::shared_ptr<lsst::daf::base::PropertySet const> const &properties)
int extractCcdId(std::shared_ptr<lsst::daf::base::PropertySet const> const &properties)
int extractAmpId(std::shared_ptr<lsst::daf::base::PropertySet const> const &properties)
int countFitsHeaderCards(lsst::daf::base::PropertySet const &prop)
ndarray::Array<std::uint8_t, 1, 1> stringToBytes(std::string const &str)

Encode a std::string as a vector of uint8

std::string bytesToString(ndarray::Array<std::uint8_t const, 1, 1> const &bytes)

Decode a std::string from a vector of uint8 returned by stringToBytes