Source
xxxxxxxxxx
//cout << "vCC=" << Vector<Complex>(vb2->visCubeCorrected()(Slice(),Slice(nChan/2),Slice(0))) << endl;
//# tDJones: test polarization terms
//# Copyright (C) 2013
//# 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 std;
using namespace casa;
using namespace casacore;
using namespace casa::vi;
// <summary>
// Test program for XJones-related classes
// </summary>
// Control verbosity
int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
class XJonesTest : public VisCalTestBase {
public:
Cube<Complex> x;
XJonesTest() :
VisCalTestBase(1,5,1,4,4,64,1,true),
x(1,nChan,nAnt,Complex(0.0))
{
for (Int ich=0;ich<nChan;++ich) {
Float a((C::pi/4)*cos(ich*C::pi/90.0));
x(Slice(),Slice(ich,1,1),Slice())=Complex(cos(a),sin(a));
}
//summary("XJonesTest");
//cout << "x = " << phase(x)*180/C::pi << endl;
}
};
TEST_F(XJonesTest, XfJonesTest) {
// Apply-able parang
PJones Papp(msmc);
Papp.setApply();
// Apply-able Xf
XfJones Xapp(msmc);
Xapp.setApply();