lsst.afw
20.0.0-4-gde602ef96
|
Go to the documentation of this file.
36 #include "boost/format.hpp"
49 namespace formatters {
52 if (properties->
isArray(
"sliceId")) {
55 int sliceId = properties->
getAsInt(
"sliceId");
59 if (properties->
exists(
"universeSize") && !properties->
isArray(
"universeSize")) {
60 int universeSize = properties->
getAsInt(
"universeSize");
61 if (sliceId >= universeSize) {
69 if (properties->
isArray(
"visitId")) {
72 int visitId = properties->
getAsInt(
"visitId");
80 if (properties->
isArray(
"fpaExposureId")) {
84 if (fpaExposureId < 0) {
87 if ((fpaExposureId & 0xfffffffe00000000LL) != 0LL) {
94 if (properties->
isArray(
"ccdId")) {
97 int ccdId = properties->
getAsInt(
"ccdId");
104 return static_cast<int>(ccdId);
108 if (properties->
isArray(
"ampId")) {
111 int ampId = properties->
getAsInt(
"ampId");
122 if (properties->
isArray(
"ccdExposureId")) {
126 if (ccdExposureId < 0) {
129 return ccdExposureId;
133 if (properties->
isArray(
"ampExposureId")) {
137 if (ampExposureId < 0) {
140 return ampExposureId;
147 if (properties->
isArray(
"itemName")) {
165 auto shape = ndarray::makeVector(nbytes);
166 auto strides = ndarray::makeVector(1);
169 ndarray::Array<std::uint8_t const, 1, 1> localArray = ndarray::external(byteCArr, shape, strides);
170 return ndarray::copy(localArray);
175 char const* charCArr =
reinterpret_cast<char const*
>(
bytes.getData());
int getAsInt(std::string const &name) const
bool getAsBool(std::string const &name) const
bool isArray(std::string const &name) const
bool exists(std::string const &name) const
int64_t getAsInt64(std::string const &name) const
std::string getAsString(std::string const &name) const
A base class for image defects.
std::vector< std::string > paramNames(bool topLevelOnly=true) const
#define LSST_EXCEPT(type,...)