lsst.astshim
21.0.0-2-g45278ab+4fcf437b75
|
Go to the documentation of this file.
22 #ifndef ASTSHIM_DETAIL_UTILS_H
23 #define ASTSHIM_DETAIL_UTILS_H
37 static const int FITSLEN = 80;
41 if (
object !=
nullptr) {
47 template <
typename T1,
typename T2>
48 inline void assertEqual(T1 val1, std::string
const &descr1, T2 val2, std::string
const &descr2) {
50 std::ostringstream os;
51 os << descr1 <<
" = " << val1 <<
" != " << descr2 <<
" = " << val2;
52 throw std::invalid_argument(os.str());
61 if (val == AST__BAD) {
62 val = std::numeric_limits<double>::quiet_NaN();
81 os << name <<
"(" << axis <<
")";
88 bool isSeries(AstCmpMap
const *cmpMap);
102 return val != AST__BAD ? val : std::numeric_limits<double>::quiet_NaN();
110 upstr.reserve(str.size());
112 upstr += std::toupper(c);
void annulAstObject(AstObject *object)
A wrapper around astAnnul; intended as a custom deleter for std::unique_ptr.
Definition: utils.h:40
void assertOK(AstObject *rawPtr1=nullptr, AstObject *rawPtr2=nullptr)
Definition: base.cc:49
std::string stringToUpper(std::string const &str)
Definition: utils.h:108
void astBadToNan(std::vector< double > &p)
Definition: utils.h:59
bool isSeries(AstCmpMap const *cmpMap)
Definition: utils.cc:47
ndarray::Array< double, 2, 2 > Array2D
Definition: base.h:42
std::string getClassName(AstObject const *rawObj)
Definition: utils.cc:37
double safeDouble(double val)
Definition: utils.h:100
AST wrapper classes and functions.
Definition: attributes_channel.dox:1
void assertEqual(T1 val1, std::string const &descr1, T2 val2, std::string const &descr2)
Definition: utils.h:48
std::string formatAxisAttr(std::string const &name, int axis)
Definition: utils.h:79