Source
359
359
360
360
/*
361
361
cout << "Guess:" << endl
362
362
<< "amp = " << amplitude(solveCPar())
363
363
<< "phase = " << phase(solveCPar())
364
364
<< endl;
365
365
*/
366
366
}
367
367
368
368
369
-
void TJones::guessPar(SDBList& sdbs) {
369
+
void TJones::guessPar(SDBList& sdbs,const Bool&) {
370
370
371
371
if (prtlev()>4) cout << " T::guessPar(sdbs)" << endl;
372
372
373
373
// Assumes: 1. corrs in canonical order
374
374
375
375
// Use just the first SDB in the SDBList, for now
376
376
SolveDataBuffer& sdb(sdbs(0));
377
377
378
378
AlwaysAssert(sdb.nChannels()==1,AipsError);
379
379
857
857
solveCPar()(IPosition(3,1,0,0),IPosition(3,1,0,nAnt()-1))=Complex(0.0);
858
858
859
859
/*
860
860
cout << "Guess:" << endl;
861
861
cout << "amplitude(solveCPar()) = " << amplitude(solveCPar()) << endl;
862
862
cout << "phases = " << phase(solveCPar())*180.0/C::pi << endl;
863
863
cout << "solveParOK() = " << solveParOK() << endl;
864
864
*/
865
865
}
866
866
867
-
void GJones::guessPar(SDBList& sdbs) {
867
+
void GJones::guessPar(SDBList& sdbs, const Bool& corrDepFlags) {
868
868
869
869
if (prtlev()>4) cout << " G::guessPar(sdbs)" << endl;
870
870
871
871
// Use just the first SDB in the SDBList, for now
872
872
SolveDataBuffer& sdb(sdbs(0));
873
873
874
874
// Make a guess at antenna-based G
875
875
// Correlation membership-dependencexm
876
876
// assumes corrs in canonical order
877
877
// nCorr = 1: use icorr=0
904
904
Vector<Bool> rowok(nRow,False);
905
905
for (Int irow=0;irow<nRow;++irow) {
906
906
907
907
const Int& a1(sdb.antenna1()(irow));
908
908
const Int& a2(sdb.antenna2()(irow));
909
909
910
910
// Is this row ok?
911
911
rowok(irow)= (!sdb.flagRow()(irow) &&
912
912
a1!=a2);
913
913
914
-
// All relevant correlations must be good
915
-
for (Int icorr=0;icorr<nCorr;++icorr)
916
-
rowok(irow)=(rowok(irow) && !sdb.flagCube()(corridx[icorr],guesschan,irow));
914
+
if (!corrDepFlags) {
915
+
// All relevant correlations must be good
916
+
for (Int icorr=0;icorr<nCorr;++icorr)
917
+
rowok(irow)=(rowok(irow) && !sdb.flagCube()(corridx[icorr],guesschan,irow));
918
+
}
917
919
918
920
if (rowok(irow)) {
919
921
antok(a1)++;
920
922
antok(a2)++;
921
923
}
922
924
}
923
925
924
926
// Assume refant is the target ant, for starters
925
927
Int guessant(refant());
926
928
// Int guessant(-1);