Source
xxxxxxxxxx
//# Copyright (C) 2000,2001,2003
//# Associated Universities, Inc. Washington DC, USA.
//#
//# This program is free software; you can redistribute it and/or modify it
//# under the terms of the GNU General Public License as published by the Free
//# Software Foundation; either version 2 of the License, or (at your option)
//# any later version.
//#
//# This program is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
//# more details.
//#
//# You should have received a copy of the GNU General Public License along
//# with this program; if not, write to the Free Software Foundation, Inc.,
//# 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//#
//# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory
//# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA
//#
using namespace casa;
void testCorners(const Vector<MDirection>& corners) {
Vector<Bool> found(4, false);
for (uInt i=0; i<4; i++) {
Double ra = corners[i].getAngle("arcmin").getValue("arcmin")[0];
Double dec = corners[i].getAngle("arcmin").getValue("arcmin")[1];
cout << "*** ra dec " << std::setprecision(19) << ra << " " << dec << endl;
if (
near(
ra, -1.140437089542486016
)
) {
AlwaysAssert(! found[0], AipsError);
AlwaysAssert(
near(
dec, 27.58556805004556267
), AipsError
);
found[0] = true;
}
else if (
near(
ra, 24.8405434977460402
)
) {
AlwaysAssert(! found[1], AipsError);
AlwaysAssert(
near(
dec, 12.58525870773907762
), AipsError
);
found[1] = true;
}
else if (
near(
ra, 2.340432320494556961
)
) {
AlwaysAssert(! found[2], AipsError);
AlwaysAssert(
near(
dec, -26.38556820383231738
), AipsError
);
found[2] = true;
}
else if (
near(
ra, -23.64051399776834117
)
) {
AlwaysAssert(! found[3], AipsError);
AlwaysAssert(