lsst.afw  16.0-12-gf08c31002
Classes | Functions
lsst::afw::formatters Namespace Reference

Classes

class  DecoratedImageFormatter
 Class implementing persistence and retrieval for DecoratedImages. More...
 
class  DecoratedImageFormatterTraits
 
class  ExposureFormatter
 Class implementing persistence and retrieval for Exposures. More...
 
class  ExposureFormatterTraits
 
class  ImageFormatter
 Class implementing persistence and retrieval for Images. More...
 
class  ImageFormatterTraits
 
class  KernelFormatter
 Formatter for persistence of Kernel instances. More...
 
class  MaskedImageFormatter
 Class implementing persistence and retrieval for MaskedImages. More...
 
class  MaskedImageFormatterTraits
 
class  MaskFormatter
 Class implementing persistence and retrieval for Masks. More...
 
class  MaskFormatterTraits
 
class  PropertyListFormatter
 Class implementing persistence and retrieval for PropertyLists. More...
 

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. More...
 
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. More...
 
std::string const getTableName (std::shared_ptr< lsst::pex::policy::Policy const > const &policy, std::shared_ptr< lsst::daf::base::PropertySet const > const &properties)
 Returns the name of the table that a single slice of a pipeline involved in the processing of a single visit should use for persistence of a particular output. More...
 
std::vector< std::string > getAllSliceTableNames (std::shared_ptr< lsst::pex::policy::Policy const > const &policy, std::shared_ptr< lsst::daf::base::PropertySet const > const &properties)
 Stores the name of the table that each slice of a pipeline involved in processing a visit used for persistence of its outputs. More...
 
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. More...
 
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. More...
 

Function Documentation

◆ bytesToString()

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

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

Definition at line 202 of file Utils.cc.

◆ countFitsHeaderCards()

int lsst::afw::formatters::countFitsHeaderCards ( lsst::daf::base::PropertySet const &  prop)

Definition at line 189 of file Utils.cc.

◆ extractAmpExposureId()

int64_t lsst::afw::formatters::extractAmpExposureId ( std::shared_ptr< lsst::daf::base::PropertySet const > const &  properties)

Definition at line 134 of file Utils.cc.

◆ extractAmpId()

int lsst::afw::formatters::extractAmpId ( std::shared_ptr< lsst::daf::base::PropertySet const > const &  properties)

Definition at line 109 of file Utils.cc.

◆ extractCcdExposureId()

int64_t lsst::afw::formatters::extractCcdExposureId ( std::shared_ptr< lsst::daf::base::PropertySet const > const &  properties)

Definition at line 123 of file Utils.cc.

◆ extractCcdId()

int lsst::afw::formatters::extractCcdId ( std::shared_ptr< lsst::daf::base::PropertySet const > const &  properties)

Definition at line 95 of file Utils.cc.

◆ extractFpaExposureId()

int64_t lsst::afw::formatters::extractFpaExposureId ( std::shared_ptr< lsst::daf::base::PropertySet const > const &  properties)

Definition at line 81 of file Utils.cc.

◆ extractOptionalFlag()

bool lsst::afw::formatters::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.

Definition at line 155 of file Utils.cc.

◆ extractSliceId()

int lsst::afw::formatters::extractSliceId ( std::shared_ptr< lsst::daf::base::PropertySet const > const &  properties)

Definition at line 53 of file Utils.cc.

◆ extractVisitId()

int lsst::afw::formatters::extractVisitId ( std::shared_ptr< lsst::daf::base::PropertySet const > const &  properties)

Definition at line 70 of file Utils.cc.

◆ getAllSliceTableNames()

std::vector< std::string > lsst::afw::formatters::getAllSliceTableNames ( std::shared_ptr< lsst::pex::policy::Policy const > const &  policy,
std::shared_ptr< lsst::daf::base::PropertySet const > const &  properties 
)

Stores the name of the table that each slice of a pipeline involved in processing a visit used for persistence of its outputs.

If slices were configured to all use the same (per-visit) table name, a single name is stored.

Parameters
[in]policyThe Policy containing the table name pattern ("${itemName}.tableNamePattern", where ${itemName} is looked up in properties using the "itemName" key) from which the the actual table name is derived. This pattern may contain a set of parameters in %(key) format - these are interpolated by looking up "key" in the properties PropertySet.
[in]propertiesThe runtime specific properties necessary to construct the table names.

string. The "visitId0" property must also be present, and shall be a non-negative integer of type int64_t uniquely identifying the current LSST visit. If the "${itemName}.isPerSliceTable" property is present, is of type bool and is set to true, then it is assumed that "${itemName}.numSlices" (a positive integer of type int) output tables exist and are to be read in.

Returns
a list of table names
See also
getTableName()

Definition at line 168 of file Utils.cc.

◆ getItemName()

std::string const lsst::afw::formatters::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::InvalidParameterErrorIf the given pointer is null, or the PropertySet pointed to does not contain a unique property named "itemName".

Definition at line 145 of file Utils.cc.

◆ getTableName()

std::string const lsst::afw::formatters::getTableName ( std::shared_ptr< lsst::pex::policy::Policy const > const &  policy,
std::shared_ptr< lsst::daf::base::PropertySet const > const &  properties 
)

Returns the name of the table that a single slice of a pipeline involved in the processing of a single visit should use for persistence of a particular output.

All slices can be configured to use the same (per-visit) table name using policy parameters.

Parameters
[in]policyThe Policy containing the table name pattern ("${itemName}.tableNamePattern", where ${itemName} is looked up in properties using the "itemName" key) from which the the actual table name is derived. This pattern may contain a set of parameters in %(key) format - these are interpolated by looking up "key" in the properties PropertySet.
[in]propertiesProvides runtime specific properties necessary to construct the output table name.
Returns
table name

Definition at line 162 of file Utils.cc.

◆ stringToBytes()

ndarray::Array< std::uint8_t, 1, 1 > lsst::afw::formatters::stringToBytes ( std::string const &  str)

Encode a std::string as a vector of uint8.

Definition at line 191 of file Utils.cc.