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")) {
83 int64_t fpaExposureId = properties->getAsInt64(
"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")) {
125 int64_t ccdExposureId = properties->getAsInt64(
"ccdExposureId");
126 if (ccdExposureId < 0) {
129 return ccdExposureId;
133 if (properties->isArray(
"ampExposureId")) {
136 int64_t ampExposureId = properties->getAsInt64(
"ampExposureId");
137 if (ampExposureId < 0) {
140 return ampExposureId;
147 if (properties->isArray(
"itemName")) {
150 return properties->getAsString(
"itemName");
154 if (properties && properties->exists(
name)) {
155 return properties->getAsBool(
name);
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());
table::Key< std::string > name
#define LSST_EXCEPT(type,...)
std::vector< std::string > paramNames(bool topLevelOnly=true) const
A base class for image defects.
table::Key< table::Array< std::uint8_t > > bytes