Source
xxxxxxxxxx
783
783
const String& cfcache,
784
784
const Double painc,
785
785
const Int fitorder,
786
786
const Float fraction,
787
787
const Int numedge,
788
788
const String& radius,
789
789
const Bool smooth,
790
790
const Bool zerorates,
791
791
const Bool globalsolve,
792
792
const Vector<Double>& delaywindow,
793
-
const Vector<Double>& ratewindow
793
+
const Vector<Double>& ratewindow,
794
+
const String& solmode,
795
+
const Vector<Double>& rmsthresh
794
796
)
795
797
{
796
798
797
799
logSink() << LogOrigin("Calibrater","setsolve") << LogIO::NORMAL3;
798
800
799
801
// Create a record description containing the solver parameters
800
802
RecordDesc solveparDesc;
801
803
solveparDesc.addField ("solint", TpString);
802
804
solveparDesc.addField ("preavg", TpDouble);
803
805
solveparDesc.addField ("apmode", TpString);
807
809
solveparDesc.addField ("table", TpString);
808
810
solveparDesc.addField ("append", TpBool);
809
811
solveparDesc.addField ("solnorm", TpBool);
810
812
solveparDesc.addField ("normtype", TpString);
811
813
solveparDesc.addField ("type", TpString);
812
814
solveparDesc.addField ("combine", TpString);
813
815
solveparDesc.addField ("maxgap", TpInt);
814
816
solveparDesc.addField ("cfcache", TpString);
815
817
solveparDesc.addField ("painc", TpDouble);
816
818
solveparDesc.addField ("fitorder", TpInt);
819
+
solveparDesc.addField ("solmode", TpString);
820
+
solveparDesc.addField ("rmsthresh", TpArrayDouble);
817
821
818
822
// fringe-fit specific fields
819
823
solveparDesc.addField ("zerorates", TpBool);
820
824
solveparDesc.addField ("minsnr", TpFloat);
821
825
solveparDesc.addField ("globalsolve", TpBool);
822
826
solveparDesc.addField ("delaywindow", TpArrayDouble);
823
827
solveparDesc.addField ("ratewindow", TpArrayDouble);
824
828
825
829
// single dish specific fields
826
830
solveparDesc.addField ("fraction", TpFloat);
842
846
solvepar.define ("table", table);
843
847
solvepar.define ("append", append);
844
848
solvepar.define ("solnorm", solnorm);
845
849
solvepar.define ("normtype", normtype);
846
850
// Fringe-fit specific
847
851
solvepar.define ("minsnr", minsnr);
848
852
solvepar.define ("zerorates", zerorates);
849
853
solvepar.define ("globalsolve", globalsolve);
850
854
solvepar.define ("delaywindow", delaywindow);
851
855
solvepar.define ("ratewindow", ratewindow);
856
+
solvepar.define ("solmode", solmode);
857
+
solvepar.define ("rmsthresh", rmsthresh);
852
858
853
859
854
860
String uptype=type;
855
861
uptype.upcase();
856
862
solvepar.define ("type", uptype);
857
863
858
864
String upcomb=combine;
859
865
upcomb.upcase();
860
866
solvepar.define("combine",upcomb);
861
867
solvepar.define("maxgap",fillgaps);
3378
3384
svc_p->setOrVerifyCTFrequencies(thisSpw);
3379
3385
3380
3386
// Size the solvePar arrays inside SVC
3381
3387
// (smart: if freqDepPar()=F, uses 1)
3382
3388
// returns the number of channel solutions to iterate over
3383
3389
Int nChanSol=svc_p->sizeSolveParCurrSpw(sdbs.nChannels());
3384
3390
3385
3391
if (svc_p->useGenericSolveOne()) {
3386
3392
3387
3393
// We'll use the generic solver
3388
-
VisCalSolver2 vcs;
3394
+
VisCalSolver2 vcs(svc_p->solmode(),svc_p->rmsthresh());
3389
3395
3390
3396
// Guess from the data
3391
3397
svc_p->guessPar(sdbs);
3392
3398
3393
3399
Bool totalGoodSol(False); // Will be set True if any channel is good
3394
3400
//for (Int ich=0;ich<nChanSol;++ich) {
3395
3401
for (Int ich=nChanSol-1;ich>-1;--ich) {
3396
3402
svc_p->markTimer();
3397
3403
svc_p->focusChan()=ich;
3398
3404