} catch (const AipsError& x) {
_log << LogIO::SEVERE << "Exception Reported: " << x.getMesg()
const string& outfile, const string& pixels,
bool overwrite, const string& imagemd
bool overwrite, const string& imagemd, const string& prec
"You must provide an expression using the pixels parameter"
DataType type = ImageExprParse::command(pixels).dataType();
if (type == TpFloat || type == TpInt) {
_imagecalc<Float>(outfile, pixels, overwrite, imagemd)
else if (type == TpComplex) {
_imagecalc<Complex>(outfile, pixels, overwrite, imagemd)
else if (type == TpDouble) {
_imagecalc<Double>(outfile, pixels, overwrite, imagemd)
else if (type == TpDComplex) {
_imagecalc<DComplex>(outfile, pixels, overwrite, imagemd)
auto asFloat = myPrec.startsWith("f");
! myPrec.startsWith("d") && ! asFloat,
"Unsupported value for type, it must be 'float' or 'double'"
if (isReal(ImageExprParse::command(pixels).dataType())) {
_imagecalc<Float>(outfile, pixels, overwrite, imagemd)
_imagecalc<Double>(outfile, pixels, overwrite, imagemd)
ThrowCc("Unsupported data type for resulting image");
_imagecalc<Complex>(outfile, pixels, overwrite, imagemd)
_imagecalc<DComplex>(outfile, pixels, overwrite, imagemd)
catch (const AipsError& x) {
_log << LogIO::SEVERE << "Exception Reported: " << x.getMesg()