Skip to content
Snippets Groups Projects
Commit 79733e14 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Task #9178: cleaning up stefcal interface

parent d3903dbd
No related branches found
No related tags found
No related merge requests found
......@@ -39,14 +39,12 @@ namespace LOFAR {
public:
enum Status {CONVERGED=1, NOTCONVERGED=2, STALLED=3};
StefCal(uint solInt, uint nChan, string mode, uint maxAntennas);
void doStep_polarized();
void doStep_unpolarized(bool phaseOnly);
Status relax(uint iter);
void resetVis(uint nSt);
void init();
void doStep();
Status relax(uint iter);
casa::Matrix<casa::DComplex> getSolution();
bool converged;
std::vector<int> _antMap; // Length antennaNames, contains size(antennaNames)-nSt times the value -1
// Values are indices in the stefcal internal numbering
casa::Matrix<casa::DComplex> g; // Station, correlation
......@@ -55,6 +53,8 @@ namespace LOFAR {
uint savedNCr; // number of correlations stored (1,2 or 4)
private:
void doStep_polarized();
void doStep_unpolarized(bool phaseOnly);
casa::Matrix<casa::DComplex> gx;
casa::Matrix<casa::DComplex> gxx;
casa::Matrix<casa::DComplex> gold;
......
......@@ -374,11 +374,7 @@ namespace LOFAR {
if (converged[freqCell]==StefCal::CONVERGED) { // Do another step when stalled and not all converged
continue;
}
if (mode=="fulljones") {
iS[freqCell].doStep_polarized();
} else {
iS[freqCell].doStep_unpolarized(itsMode=="phaseonly" || itsMode=="scalarphase");
}
iS[freqCell].doStep();
} // ============================== Relaxation =======================
if (iter % 2 == 1) {
if (itsDebugLevel>7) {
......
......@@ -119,6 +119,15 @@ namespace LOFAR {
gx = g;
}
void StefCal::doStep() {
if (_mode=="fulljones") {
doStep_polarized();
} else {
doStep_unpolarized(_mode=="phaseonly" || _mode=="scalarphase");
}
}
void StefCal::doStep_polarized() {
gold = g;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment