lsst.afw  13.0-100-ge0459d59f+6
Namespaces | Classes | Functions
lsst::afw::formatters Namespace Reference

Namespaces

 formattersLib
 

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...
 
class  TanWcsFormatter
 Class implementing persistence and retrieval for TanWcs objects. More...
 
class  WcsFormatter
 Class implementing persistence and retrieval for Wcs objects. 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...
 
void createTable (lsst::daf::persistence::LogicalLocation const &location, std::shared_ptr< lsst::pex::policy::Policy const > const &policy, std::shared_ptr< lsst::daf::base::PropertySet const > const &properties)
 Creates the table identified by calling getTableName() with the given policy and properties. More...
 
void dropAllSliceTables (lsst::daf::persistence::LogicalLocation const &location, std::shared_ptr< lsst::pex::policy::Policy const > const &policy, std::shared_ptr< lsst::daf::base::PropertySet const > const &properties)
 Drops the database table(s) identified by getAllSliceTables(). 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)
 
std::string formatFitsProperties (lsst::daf::base::PropertySet const &prop)
 Format a PropertySet into a single FITS header string. More...
 
std::string formatFitsProperties (lsst::daf::base::PropertyList const &prop, std::set< std::string > const &excludeNames={})
 Format a PropertyList into a FITS header string. More...
 
int countFitsHeaderCards (lsst::daf::base::PropertySet const &prop)
 
template<class Archive >
void serializeEigenArray (Archive &ar, Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > &m)
 
int extractSliceId (std::shared_ptr< PropertySet const > const &properties)
 
int extractVisitId (std::shared_ptr< PropertySet const > const &properties)
 
int64_t extractFpaExposureId (std::shared_ptr< PropertySet const > const &properties)
 
int extractCcdId (std::shared_ptr< PropertySet const > const &properties)
 
int extractAmpId (std::shared_ptr< PropertySet const > const &properties)
 
int64_t extractCcdExposureId (std::shared_ptr< PropertySet const > const &properties)
 
int64_t extractAmpExposureId (std::shared_ptr< PropertySet const > const &properties)
 
std::string const getItemName (std::shared_ptr< PropertySet const > const &properties)
 
bool extractOptionalFlag (std::shared_ptr< PropertySet const > const &properties, std::string const &name)
 
std::string const getTableName (std::shared_ptr< Policy const > const &policy, std::shared_ptr< PropertySet const > const &properties)
 
std::vector< std::string > getAllSliceTableNames (std::shared_ptr< Policy const > const &policy, std::shared_ptr< PropertySet const > const &properties)
 
void createTable (lsst::daf::persistence::LogicalLocation const &location, std::shared_ptr< lsst::pex::policy::Policy const > const &policy, std::shared_ptr< PropertySet const > const &properties)
 
void dropAllSliceTables (lsst::daf::persistence::LogicalLocation const &location, std::shared_ptr< lsst::pex::policy::Policy const > const &policy, std::shared_ptr< PropertySet const > const &properties)
 

Function Documentation

◆ countFitsHeaderCards()

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

Definition at line 286 of file Utils.cc.

◆ createTable() [1/2]

void lsst::afw::formatters::createTable ( lsst::daf::persistence::LogicalLocation const &  location,
std::shared_ptr< lsst::pex::policy::Policy const > const &  policy,
std::shared_ptr< lsst::daf::base::PropertySet const > const &  properties 
)

Creates the table identified by calling getTableName() with the given policy and properties.

A key named "${itemName}.templateTableName" (where ${itemName} refers to the value of a property named "itemName" extracted from properties) must be available and set to the name of the template table to use for creation.

Note that the template table must exist in the database identified by location, and that if the desired table already exists, an exception is thrown.

◆ createTable() [2/2]

void lsst::afw::formatters::createTable ( lsst::daf::persistence::LogicalLocation const &  location,
std::shared_ptr< lsst::pex::policy::Policy const > const &  policy,
std::shared_ptr< PropertySet const > const &  properties 
)

Definition at line 246 of file Utils.cc.

◆ dropAllSliceTables() [1/2]

void lsst::afw::formatters::dropAllSliceTables ( lsst::daf::persistence::LogicalLocation const &  location,
std::shared_ptr< lsst::pex::policy::Policy const > const &  policy,
std::shared_ptr< lsst::daf::base::PropertySet const > const &  properties 
)

Drops the database table(s) identified by getAllSliceTables().

◆ dropAllSliceTables() [2/2]

void lsst::afw::formatters::dropAllSliceTables ( lsst::daf::persistence::LogicalLocation const &  location,
std::shared_ptr< lsst::pex::policy::Policy const > const &  policy,
std::shared_ptr< PropertySet const > const &  properties 
)

Definition at line 258 of file Utils.cc.

◆ extractAmpExposureId() [1/2]

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

◆ extractAmpExposureId() [2/2]

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

Definition at line 191 of file Utils.cc.

◆ extractAmpId() [1/2]

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

◆ extractAmpId() [2/2]

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

Definition at line 166 of file Utils.cc.

◆ extractCcdExposureId() [1/2]

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

◆ extractCcdExposureId() [2/2]

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

Definition at line 180 of file Utils.cc.

◆ extractCcdId() [1/2]

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

◆ extractCcdId() [2/2]

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

Definition at line 152 of file Utils.cc.

◆ extractFpaExposureId() [1/2]

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

◆ extractFpaExposureId() [2/2]

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

Definition at line 138 of file Utils.cc.

◆ extractOptionalFlag() [1/2]

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.

◆ extractOptionalFlag() [2/2]

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

Definition at line 212 of file Utils.cc.

◆ extractSliceId() [1/2]

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

Definition at line 110 of file Utils.cc.

◆ extractSliceId() [2/2]

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

◆ extractVisitId() [1/2]

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

Definition at line 127 of file Utils.cc.

◆ extractVisitId() [2/2]

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

◆ formatFitsProperties() [1/2]

std::string lsst::afw::formatters::formatFitsProperties ( lsst::daf::base::PropertySet const &  prop)

Format a PropertySet into a single FITS header string.

This function is designed to format data for creating a WCS. It truncates long string values and skips properties whose type it cannot handle.

Parameters
[in]propProperties to format
Returns
a FITS header string (exactly 80 characters per "card", no line terminators)
Warning
PropertySet is unordered, so the order of entries in the returned string is unpredictable.

Definition at line 270 of file Utils.cc.

◆ formatFitsProperties() [2/2]

std::string lsst::afw::formatters::formatFitsProperties ( lsst::daf::base::PropertyList const &  prop,
std::set< std::string > const &  excludeNames = {} 
)

Format a PropertyList into a FITS header string.

This function is designed to format data for creating a WCS. It truncates long string values and skips properties whose type it cannot handle.

Parameters
[in]propProperties to format
[in]excludeNamesNames of properties to exclude from the returned string
Returns
a FITS header string (exactly 80 characters per "card", no line terminators)

Definition at line 275 of file Utils.cc.

◆ getAllSliceTableNames() [1/2]

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()

◆ getAllSliceTableNames() [2/2]

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

Definition at line 225 of file Utils.cc.

◆ getItemName() [1/2]

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".

◆ getItemName() [2/2]

std::string const lsst::afw::formatters::getItemName ( std::shared_ptr< PropertySet const > const &  properties)

Definition at line 202 of file Utils.cc.

◆ getTableName() [1/2]

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

◆ getTableName() [2/2]

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

Definition at line 219 of file Utils.cc.

◆ serializeEigenArray()

template<class Archive >
void lsst::afw::formatters::serializeEigenArray ( Archive &  ar,
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > &  m 
)

Definition at line 125 of file TanWcsFormatter.cc.