29 #if QT_VERSION >= 0x050000
30 # include <QtWidgets/QMessageBox>
32 # include <QtGui/QMessageBox>
36 #include <QtCore/QTextStream>
37 #include <QtCore/QFile>
69 bool stnPosRead, stnVelRead, srcPosRead, srcSmRead, axsOfsRead, hiFyEopRead,
70 stnGrdRead, extErpRead;
88 stnPosRead = stnVelRead = srcPosRead = srcSmRead = axsOfsRead = hiFyEopRead = stnGrdRead =
105 QString(
"").sprintf(
" %d",
apStationPositions_.size()) +
" records of a priori sites positions");
114 QString(
"").sprintf(
" %d",
apStationVelocities_.size()) +
" records of a priori sites velocities");
123 QString(
"").sprintf(
" %d",
apSourcePositions_.size()) +
" records of a priori sources positions");
132 QString(
"").sprintf(
" %d",
apSourceStrModel_.size()) +
" records of source structure model");
141 QString(
"").sprintf(
" %d",
apAxisOffsets_.size()) +
" records of a priori axis offsets");
149 "::collectAPriories(): load from the file " +
apHiFyEop_.
getFileName() +
" model of hi frequency EOP");
159 " records of a priori mean sites gradients");
174 "::collectAPriories(): files with external a priori were read",
true);
191 apRec->at(0).getDvalue(
"2")));
193 "::collectAPriories(): set up external a priori coords for station " +
194 si->
getKey() +
"; the diff is " +
195 QString(
"").sprintf(
"%.1f mm", (si->
getR() - si->
getR_ea()).module()*1.0e3) +
202 "::collectAPriories(): cannot find station " + si->
getKey() +
203 " in the list of a priori coordinates");
209 apRec->at(0).getDvalue(
"2")));
214 "::collectAPriories(): cannot find station " + si->
getKey() +
215 " in the list of a priori velocities");
228 "::collectAPriories(): set an external a priori axis offset for station " +
229 si->
getKey() +
"; the diff is " +
232 if (fabs(si->
getAxisOffset() - apRec->at(0).getDvalue(
"0")) > 1.0e-4)
234 "::collectAPriories(): a priori axis offset for station " + si->
getKey() +
235 QString(
"").sprintf(
" has different value in the database (%.1f mm) and "
236 "the external file (%.1f mm)", si->
getAxisOffset()*1.0e3, apRec->at(0).getDvalue(
"0")*1.0e3));
242 "::collectAPriories(): cannot find station " + si->
getKey() +
243 " in the list of a priori axis offsets");
256 "::collectAPriories(): a priori gradients " + QString(
"").sprintf(
"(%6.2f and %6.1f mm)",
258 " have been set up for station " + si->
getKey());
262 "::collectAPriories(): cannot find station " + si->
getKey() +
263 " in the list of a priori mean site gradients");
268 "::collectAPriories(): the stations were done",
true);
282 si->
setRA_ea(apRec->at(0).getDvalue(
"0"));
283 si->
setDN_ea(apRec->at(0).getDvalue(
"1"));
288 "::collectAPriories(): set up external a priori coords for source " + si->
getKey() +
289 "; the diff is " + QString(
"").sprintf(
"%.3f mas",
296 "::collectAPriories(): cannot find source " + si->
getKey() +
297 " in the list of a priori coordinates");
310 for (
int i=0; i<apRec->size(); i++)
315 er = ek = eb =
false;
316 x = apRec->at(i).getDvalue(
"MP_X");
317 y = apRec->at(i).getDvalue(
"MP_Y");
318 k = apRec->at(i).getDvalue(
"MP_K");
319 b = apRec->at(i).getDvalue(
"MP_B");
320 er= apRec->at(i).getBvalue(
"MP_ER");
321 ek= apRec->at(i).getBvalue(
"MP_EK");
322 eb= apRec->at(i).getBvalue(
"MP_EB");
335 if ((1.0e-6 < fabs(x) || 1.0e-6 < fabs(y)) && 0.0 < k && k < 1.0)
339 "::collectAPriories(): found " + QString(
"").setNum(apRec->size()) +
340 "-component multipoint SS model for the source \"" + si->
getKey() +
"\"");
351 "::collectAPriories(): the sources were done",
true);
361 "::collectAPriories(): ERP were prepared for interpolation",
true);
365 "::collectAPriories(): cannot make ERP interpolation: data are not provided",
true);
374 double dUt, dPx, dPy, dCx, dCy;
375 double ut0i, px0i, py0i;
376 double ut0e, px0e, py0e;
379 dUt = dPx = dPy = dCx = dCy = 0.0;
405 std::cout <<
" -- no HF calculated\n";
485 "::collectAPriories(): the observations have been updated with external model "
486 "of high frequency EOP variations");
488 "::collectAPriories(): the observations were done",
true);
495 double& vUt1,
double& rUt1,
496 double& vPx,
double& rPx,
double& vPy,
double& rPy,
497 double& vCx,
double& rCx,
double& vCy,
double& rCy)
499 vUt1 = rUt1 = vPx = rPx = vPy = rPy = vCx = rCx = vCy = rCy = 0.0;
529 "::getAprioriErp(): the ERP apriori for the epoch " + (epoch + dT).toString() +
" are:");
531 "::getAprioriErp(): ut1: " +
532 QString(
"").sprintf(
"%12.6fms %12.6fms/d", vUt1*1.0e3*
DAY2SEC, rUt1*1.0e3*
DAY2SEC));
534 "::getAprioriErp(): p_x: " +
535 QString(
"").sprintf(
"%12.6fmas %12.6fmas/d", vPx*
RAD2MAS, rPx*
RAD2MAS));
537 "::getAprioriErp(): p_y: " +
538 QString(
"").sprintf(
"%12.6fmas %12.6fmas/d", vPy*
RAD2MAS, rPy*
RAD2MAS));
540 "::getAprioriErp(): CIP_x: " +
541 QString(
"").sprintf(
"%12.6fmas %12.6fmas/d", vCx*
RAD2MAS, rCx*
RAD2MAS));
543 "::getAprioriErp(): CIP_y: " +
544 QString(
"").sprintf(
"%12.6fmas %12.6fmas/d", vCy*
RAD2MAS, rCy*
RAD2MAS));
581 "::prepare4ErpInterpolation(): the spliners were created",
true);
586 for (
int i=0; i<n; i++)
593 for (
int i=0; i<n; i++)
600 "::prepare4ErpInterpolation(): the inner interpolator has been fed",
true);
604 double utOffset = 0.0;
610 "::prepare4ErpInterpolation(): UT1-UTC will be adjusted by " + QString(
"").setNum(utOffset) +
611 " secs to get TAI",
true);
615 for (
int i=0; i<n; i++)
640 "::prepare4ErpInterpolation(): the outer interpolator has been fed",
true);
645 "::prepare4ErpInterpolation(): database and external file UT1 types mismatch!"
646 " Trying to adjust, however, it was not tested.");
658 "::prepare4ErpInterpolation(): the UT1type has been adjusted",
true);
661 "::prepare4ErpInterpolation(): the UT1type was checked",
true);
670 "::prepare4ErpInterpolation(): the spliners were prepared",
true);
713 int numOfCorrected=0;
716 return numOfCorrected;
722 for (QMap<QString, SgVlbiObservable*>::iterator it=obs->
observableByKey().begin();
750 "::suppressNotSoGoodObs(): " + QString(
"").setNum(numOfCorrected) +
751 " observation" + (numOfCorrected==1?
" was":
"s were") +
752 " deselected due to not sufficiently high Quality Code, " +
755 return numOfCorrected;
767 "::doPostReadActions_old(): post read actions initiated for the session " +
getName(),
true);
786 "::doPostReadActions_old(): evaluating ionospheric corrections for single band delays",
true);
793 "::doPostReadActions_old(): running clock break detections, early stage",
true);
800 "::doPostReadActions_old(): elimination of outliers, early stage",
true);
819 "::process(): called in nonappropriate form: config of parametersDescriptor is NULL, ignoring");
824 hasArc = hasStc =
false;
833 if (hasArc && hasStc)
835 QMessageBox::warning(NULL,
"Cannot estimate",
"The software is unable to estimate a combination of "
836 "arc or piece-wise parameters and stochastic parameters. Latter releases will do it. Sorry for "
839 "::process(): cannot estimate arc or pwl AND stochastic parameters in one solution");
854 bool have2reloadEfas(
false);
857 have2reloadEfas =
true;
860 have2reloadEfas =
true;
864 have2reloadEfas =
true;
867 have2reloadEfas =
true;
870 have2reloadEfas =
true;
873 have2reloadEfas =
true;
876 have2reloadEfas =
true;
879 have2reloadEfas =
true;
883 if (have2reloadEfas ||
918 "::process(): reading an external weights file failed, no weights were applied");
927 "::process(): starting analysis of the " + bandKey +
"-band");
952 mgr->
run(haveProcessAllBands);
977 QString st1Name, st2Name;
979 st1Name = bi->
getKey().left(8);
980 st2Name = bi->
getKey().right(8);
981 if ((si->
getKey() == st1Name || si->
getKey() == st2Name) &&
989 "::checkExcludedStations(): all baselines of the station " + si->
getKey() +
990 " are deselected, the station is turned off too");
1020 SgVlbiBand* band,
double& cbShift,
double& cbSigma)
1025 for (
int iBaseline=0; baselineItr!=band->
baselinesByName().end(); ++baselineItr, iBaseline++)
1028 if ( baselineInfo &&
1033 int numOnLeft=0, numOnRight=0;
1035 for (
int idx=0; idx<observables->size(); idx++)
1037 if (observables->at(idx)->epoch()<=tBreak)
1042 if (numOnLeft>2 && numOnRight>2)
1043 baselines.append(baselineInfo);
1046 if (!baselines.size())
1049 "::calculateClockBreakParameter(): cannot evaluate clock break parameters: num of baselines==0");
1054 "::calculateClockBreakParameter(): collected " + QString(
"").setNum(baselines.size()) +
1055 " baselines for the station " + stn->
getKey());
1058 for (
int iBaseline=0; iBaseline<baselines.size(); iBaseline++)
1062 for (
int idx=0; idx<observables->size(); idx++)
1072 localParameters->append(pC);
1073 for (
int iBaseline=0; iBaseline<baselines.size(); iBaseline++)
1076 pAi =
new SgParameter(
"A_" + QString(
"").sprintf(
"%03d_(", iBaseline) +
1077 baselineInfo->
getKey() +
")");
1078 pBi =
new SgParameter(
"B_" + QString(
"").sprintf(
"%03d_(", iBaseline) +
1079 baselineInfo->
getKey() +
")");
1082 localParameters->append(pAi);
1083 localParameters->append(pBi);
1089 double res, sig, sign;
1093 for (
int iBaseline=0; iBaseline<baselines.size(); iBaseline++)
1099 pAi = localParameters->at(2*iBaseline + 1);
1100 pBi = localParameters->at(2*iBaseline + 2);
1102 for (
int idx=0; idx<observables->size(); idx++)
1112 if (o->
epoch()<=tBreak)
1115 pC->
setD(1.0E-9*sign);
1117 pBi->
setD(1.0E-9*(o->
epoch() - tBreak));
1118 vO_C.setElement (0, res);
1128 for (
int i=0; i<localParameters->size(); i++)
1129 delete localParameters->at(i);
1130 delete localParameters;
1131 localParameters = NULL;
1140 if (!band || !agents.size())
1145 QMap<QString, SgVlbiBaselineInfo*>
1149 for (
int iBaseline=0; it!=band->
baselinesByName().end(); ++it, iBaseline++)
1154 for (
int idxAgent=0; idxAgent<agents.size(); idxAgent++)
1160 "::calculateClockBreaksParameters(): gathering info for CB on " + agent->
epoch_.
toString() +
1163 int numOnLeft=0, numOnRight=0;
1165 for (
int idx=0; idx<observables->size(); idx++)
1168 observables->at(idx)->epoch() < agent->
epoch_)
1171 agent->
epoch_ < observables->at(idx)->epoch())
1174 if (numOnLeft>2 && numOnRight>2)
1178 baselines.append(blInfo);
1181 nZ += numOnLeft + numOnRight;
1188 if (!baselines.size())
1191 "::calculateClockBreaksParameters(): cannot evaluate clock break parameters: num of baselines==0");
1196 "::calculateClockBreaksParameters(): collect " + QString(
"").setNum(baselines.size()) +
1197 " baselines for clock breaks evaluation");
1203 for (
int idxAgent=0; idxAgent<agents.size(); idxAgent++)
1207 QString(
"").sprintf(
"_%03d", idxAgent));
1209 localParameters->append(agent->
pC_);
1212 QMap< QString, QList<SgParameter*> >
1213 parametersByBaseline;
1214 for (
int iBaseline=0; iBaseline<baselines.size(); iBaseline++)
1226 for (
int idxP=0; idxP<nOrder; idxP++)
1228 pAi =
new SgParameter(
"A_" + QString(
"").sprintf(
"%02d_%03d_(", idxP, iBaseline) +
1229 baselineInfo->
getKey() +
")");
1231 localParameters->append(pAi);
1232 parList.append(pAi);
1234 parametersByBaseline.insert(baselineInfo->
getKey(), parList);
1240 double res, sig, sign;
1242 for (
int iBaseline=0; iBaseline<baselines.size(); iBaseline++)
1247 for (
int idx=0; idx<observables->size(); idx++)
1256 for (
int idxAgent=0; idxAgent<agents.size(); idxAgent++)
1266 pC->
setD(1.0E-9*sign);
1270 for (
int idxP=0; idxP<parList.size(); idxP++)
1272 pAi = parList.at(idxP);
1273 pAi->
setD(1.0E-9*d);
1276 vO_C.setElement (0, res);
1285 for (
int idxAgent=0; idxAgent<agents.size(); idxAgent++)
1293 for (
int i=0; i<localParameters->size(); i++)
1294 delete localParameters->at(i);
1295 delete localParameters;
1296 localParameters = NULL;
1309 for (
int iBaseline=0; itBaselineInfo!=band->
baselinesByName().end(); ++itBaselineInfo, iBaseline++)
1320 candidates.insert(baselineInfo->
getKey(), baselineInfo);
1331 if (!candidates.size())
1334 double maxConsumed=0.0;
1336 QString blName, stnName_1, stnName_2;
1338 for (; iBli!=candidates.end(); ++iBli)
1339 if (maxConsumed < iBli.value()->cbIndicator()->totWrms_ - iBli.value()->cbIndicator()->minWrms_)
1341 maxConsumed = iBli.value()->
cbIndicator()->
totWrms_ - iBli.value()->cbIndicator()->minWrms_;
1342 blName = iBli.key();
1343 tBreak = iBli.value()->cbIndicator()->epoch_;
1351 "::detectClockBreaks(): baseline name " + blName +
1352 " is not in band's baselinesByName_ container");
1370 QMap<QString, int> numByName;
1371 iBli = candidates.begin();
1372 for (; iBli!=candidates.end(); ++iBli)
1373 if (iBli.key().contains(stnName_1) || iBli.key().contains(stnName_2))
1382 QMap<QString, int>::iterator iAux=numByName.begin();
1383 int minN=iAux.value(), maxN=iAux.value();
1384 stnName = iAux.key();
1385 for (; iAux!=numByName.end(); ++iAux)
1393 stnName = iAux.key();
1405 iBli = candidates.begin();
1406 for (; iBli!=candidates.end(); ++iBli)
1407 if (iBli.key().contains(stnName) &&
1408 iBli.value()->cbIndicator()->tOnLeft_ <= tBreak &&
1409 tBreak <= iBli.value()->cbIndicator()->tOnRight_)
1411 if (tBreak < iBli.value()->cbIndicator()->epoch_)
1413 tBreak = iBli.value()->cbIndicator()->epoch_;
1423 "::detectClockBreaks(): stnName " + stnName +
" is not in stationsByName() container");
1427 "::detectClockBreaks(): impossible to guess the station name: maxN==minN==" +
1428 QString(
"").setNum(maxN));
1438 if (bandIdx<0 || bandIdx>
bands_.size()-1)
1444 "::checkBandForClockBreaks(): got wrong band (=NULL) for the band index " +
1445 QString(
"").setNum(bandIdx));
1450 "::checkBandForClockBreaks(): processing observations from " + band->
getKey() +
"-band",
true);
1451 QString stnName(
"");
1453 int limit=5, idx=0, bandIdxSaved;
1459 "::checkBandForClockBreaks(): detected clock break #" + QString(
"").setNum(idx) +
" at " +
1460 stnName +
" on " + tBreak.
toString(),
true);
1465 double shift, sigma;
1468 shift = round(1.0E9*shift);
1471 shift = round(1.0E12*shift)*1.0E-3;
1473 if (fabs(shift) > 3.0*sigma)
1478 "::checkBandForClockBreaks(): detected clock break at " + stnBreak->
getKey() +
1479 " station on " + tBreak.
toString() +
"; shift on " +
1480 QString(
"").sprintf(
"%.4f ns", shift),
true);
1496 "::detectAndProcessClockBreaks(): clock break detection procedure initiated",
true);
1508 const SgMJD& tBreak,
double shift,
double sigma,
bool have2AdjustResiduals,
bool have2Complain)
1512 if (have2Complain &&
1514 QMessageBox::warning(NULL,
"A clock break is at a reference clock station",
1515 "A clock break has occured at clocks of a reference clock station.\n"
1516 "It is suggested to assign a reference clock station attribute to another station "
1517 "and reprocess data.\n"
1519 QMessageBox::Yes | QMessageBox::No, QMessageBox::No)==QMessageBox::No)
1527 stn2Correct = stnInfo;
1534 for (
int i=0; i<stn2Correct->
clockBreaks().size(); i++)
1535 if (fabs(*(stn2Correct->
clockBreaks().at(i)) - tBreak) < 5.5E-6)
1540 clockBreak->
setS0(sigma);
1542 "::processClockBreakMarks(): the clock break at " + stn2Correct->
getKey() +
1543 " station on " + tBreak.
toString() +
"; has been updated to " +
1544 QString(
"").sprintf(
"%.4f ns", clockBreak->
getA0()));
1549 clockBreak->
setS0(sigma);
1552 "::processClockBreakMarks(): the new break has been appended to the model");
1555 "::processClockBreakMarks(): adding new clock break at " + stn2Correct->
getKey() +
1556 " station on " + tBreak.
toString() +
" failed");
1565 if (have2AdjustResiduals)
1569 for (
int iObs=0; iObs<band->
observables().size(); iObs++)
1613 if (bandIdx<0 || bandIdx>
bands_.size()-1)
1619 "::eliminateOutliersSimpleMode(): got wrong band (=NULL) for the band index " +
1620 QString(
"").setNum(bandIdx));
1623 int numOfEliminated, numOfPasses;
1625 bool hasBeenModified;
1626 bool need2check4absValue=upperLimit>0.0;
1631 numOfEliminated = 0;
1633 hasBeenModified =
true;
1639 while (hasBeenModified && (numOfPasses<maxNumOfPasses))
1644 hasBeenModified =
false;
1645 for (
int idx=0; idx<band->
observables().size(); idx++)
1652 (need2check4absValue && fabs(m->
getResidual()) > upperLimit) )
1656 hasBeenModified =
true;
1665 "::eliminateOutliersSimpleMode(): eliminated " + QString(
"").setNum(numOfEliminated) +
1667 " observables from the " + band->
getKey() +
"-band in " + QString(
"").setNum(numOfPasses) +
1668 " passes, the threshold is " + QString(
"").setNum(threshold));
1669 if (elluminated.size())
1672 "::eliminateOutliersSimpleMode(): the eliminated observations are:");
1673 for (
int i=0; i<elluminated.size(); i++)
1681 QString(
"").sprintf(
"%.3f +/- %.3f (ns) | %.3f with QC %d",
1686 elluminated.clear();
1696 if (bandIdx<0 || bandIdx>
bands_.size()-1)
1702 "::eliminateLargeOutliers(): got wrong band (=NULL) for the band index " +
1703 QString(
"").setNum(bandIdx));
1708 bool hasBeenModified;
1709 double sigma, prevSigma, residMax;
1713 hasBeenModified =
true;
1723 "::eliminateLargeOutliers(): start of the procedure");
1724 while (hasBeenModified &&
1725 (numOfPasses < maxNumOfPasses) &&
1731 hasBeenModified =
false;
1733 for (
int idx=0; idx<band->
observables().size(); idx++)
1749 "::eliminateLargeOutliers(): found a candidate: " + testedObs->
strId() +
" with norm.resid= " +
1750 QString(
"").sprintf(
"%10.4f", residMax));
1760 if (wrmsRatio < prevSigma/sigma)
1762 hasBeenModified =
true;
1763 elliminated << testedObs;
1766 "::eliminateLargeOutliers(): the obs is removed");
1773 "::eliminateLargeOutliers(): the obs is ok");
1778 "::eliminateLargeOutliers(): the observable is NULL");
1783 "::eliminateLargeOutliers(): eliminated " + QString(
"").setNum(elliminated.size()) +
1785 " observables from the " + band->
getKey() +
"-band in " + QString(
"").setNum(numOfPasses) +
1787 if (elliminated.size())
1790 "::eliminateLargeOutliers(): the eliminated observations are:");
1791 for (
int i=0; i<elliminated.size(); i++)
1796 "::eliminateLargeOutliers(): # " +
1800 QString(
"").sprintf(
"%.3f +/- %.3f (ns) | %.3f with QC %d",
1805 elliminated.clear();
1816 if (bandIdx<0 || bandIdx>
bands_.size()-1)
1822 "::eliminateOutliers(): got wrong band (=NULL) for the band index " +
1823 QString(
"").setNum(bandIdx));
1827 int numOfEliminated, numOfPasses, maxNumOfPasses;
1829 bool hasBeenModified;
1831 bool wasMeddledIntoWc=
false;
1837 wasMeddledIntoWc =
true;
1842 numOfEliminated = 0;
1844 hasBeenModified =
true;
1851 (*longOperationStart_)(numOfPasses, maxNumOfPasses,
"");
1855 while (hasBeenModified && (numOfPasses<maxNumOfPasses))
1860 for (
int idx=0; idx<band->
observables().size(); idx++)
1866 outlierCandidates << o;
1869 if (outlierCandidates.size())
1873 double max=fabs(outlierCandidates.first()->activeDelay()->getResidualNorm());
1874 if (outlierCandidates.size()>2 && max>2.0*threshold)
1877 std::cout <<
" MODE: cluster\n";
1879 while (fabs(outlierCandidates.last()->activeDelay()->getResidualNorm())<max-0.5*threshold &&
1880 outlierCandidates.size()>1)
1881 outlierCandidates.removeLast();
1886 std::cout <<
" MODE: the largest one\n";
1889 outlierCandidates.clear();
1890 outlierCandidates << o;
1894 std::cout <<
"Pass # " << numOfPasses <<
" (" << maxNumOfPasses <<
") "
1895 <<
"observations to be excluded:\n";
1897 for (
int idx=0; idx<outlierCandidates.size(); idx++)
1911 hasBeenModified =
true;
1916 (*longOperationMessage_)(
"Processing outliers: pass " +
1917 QString(
"").setNum(numOfPasses) +
" from " + QString(
"").setNum(maxNumOfPasses));
1919 (*longOperationProgress_)(numOfPasses);
1925 hasBeenModified =
false;
1927 std::cout <<
"the size is 0\n";
1930 outlierCandidates.clear();
1934 if (numOfPasses==maxNumOfPasses)
1935 std::cout <<
"reached max passing number (" << numOfPasses <<
")\n";
1940 "::eliminateOutliers(): eliminated " + QString(
"").setNum(numOfEliminated) +
1941 " observables from " + band->
getKey() +
"-band in " + QString(
"").setNum(numOfPasses) +
1942 " passes with the threshold " + QString(
"").setNum(threshold));
1943 if (elluminated.size())
1946 "::eliminateOutliers(): the eliminated observations are:");
1947 for (
int i=0; i<elluminated.size(); i++)
1955 QString(
"").sprintf(
"%.3f +/- %.3f (ns) | %.3f with QC %d",
1960 elluminated.clear();
1965 if (wasMeddledIntoWc)
1969 (*longOperationStop_)();
1972 return numOfEliminated;
1980 if (bandIdx<0 || bandIdx>
bands_.size()-1)
1986 "::restoreOutliers(): got wrong band (=NULL) for the band index " +
1987 QString(
"").setNum(bandIdx));
1991 int numOfRestored, numOfPasses, maxNumOfPasses;
1993 bool hasBeenModified;
1995 bool wasMeddledIntoWc=
false;
1999 wasMeddledIntoWc =
true;
2006 hasBeenModified =
true;
2012 while (hasBeenModified && (numOfPasses<maxNumOfPasses))
2014 if (numOfPasses > 0)
2017 for (
int idx=0; idx<band->
observables().size(); idx++)
2026 outlierCandidates << o;
2029 if (outlierCandidates.size())
2034 max = fabs(outlierCandidates.first()->activeDelay()->getResidualNorm());
2035 min = fabs(outlierCandidates.last ()->activeDelay()->getResidualNorm());
2036 if (outlierCandidates.size()>2 && min<1.0)
2039 std::cout <<
" MODE: cluster-bottom\n";
2041 while (fabs(outlierCandidates.first()->activeDelay()->getResidualNorm())>1.0 &&
2042 outlierCandidates.size()>1)
2043 outlierCandidates.removeFirst();
2045 else if (outlierCandidates.size()>2 && max>1.0)
2051 std::cout <<
" MODE: cluster-top\n";
2057 std::cout <<
" MODE: the smallest one\n";
2060 outlierCandidates.clear();
2061 outlierCandidates << o;
2064 std::cout <<
"Pass # " << numOfPasses <<
" (" << maxNumOfPasses <<
") "
2065 <<
"observation to be restored:\n";
2067 for (
int idx=0; idx<outlierCandidates.size(); idx++)
2079 hasBeenModified =
true;
2083 hasBeenModified =
false;
2085 std::cout <<
"the size is 0\n";
2088 outlierCandidates.clear();
2092 if (numOfPasses==maxNumOfPasses)
2093 std::cout <<
"reached max passing number (" << numOfPasses <<
")\n";
2097 "::restoreOutliers(): restored " + QString(
"").setNum(numOfRestored) +
2098 " observables from " + band->
getKey() +
"-band in " + QString(
"").setNum(numOfPasses) +
2099 " passes with the threshold " + QString(
"").setNum(threshold));
2102 if (wasMeddledIntoWc)
2107 return numOfRestored;
2121 if (bandIdx<0 || bandIdx>
bands_.size()-1)
2127 "::scanBaselines4GrDelayAmbiguities(): got wrong band (=NULL) for the band index " +
2128 QString(
"").setNum(bandIdx));
2141 for (; itBaselineInfo!=band->
baselinesByName().end(); ++itBaselineInfo)
2182 if (m < stn->numProcessed(
DT_DELAY))
2193 refStation = station;
2195 "::resolveGrAmbigTriangles(): cannot find the reference clock station, picked " +
2196 refStation->
getKey() +
" as the reference one");
2201 "::resolveGrAmbigTriangles(): unable to determine the reference clock station");
2207 "::resolveGrAmbigTriangles(): found " + refStation->
getKey() +
" as the reference clock station");
2219 stations.append(it.value());
2223 baselines.append(it.value());
2225 int numOfStations=stations.size();
2226 int numOfBaselines=baselines.size();
2232 for (
int iBaseline=0; iBaseline<numOfBaselines; iBaseline++)
2235 pN =
new SgParameter(
"N_" + QString(
"").sprintf(
"%03d_(", iBaseline) +
2236 baselineInfo->
getKey() +
")");
2238 baselineInfo->
pAux() = pN;
2239 localParameters->append(pN);
2242 estimator->
prepare2Run(numOfStations*(numOfStations-1)*(numOfStations-2)/2/3 + 10,
2248 for (
int i=0; i<numOfBaselines; i++)
2251 if (bl->
getKey().contains(refStation->
getKey() +
":") ||
2265 for (
int i=0; i<numOfStations; i++)
2267 stI = stations.at(i);
2268 for (
int j=i+1; j<numOfStations; j++)
2270 stJ = stations.at(j);
2288 for (
int k=j+1; k<numOfStations; k++)
2290 stK = stations.at(k);
2346 vO_C.setElement (0, b);
2355 for (
int iBaseline=0; iBaseline<numOfBaselines; iBaseline++)
2368 for (
int i=0; i<localParameters->size(); i++)
2369 delete localParameters->at(i);
2370 delete localParameters;
2371 localParameters = NULL;
2387 "::need2runAutomaticDataProcessing(): this session is not processed yet");
2392 int ver, verOfExactAcFullName, verOfAcFullName, verOfAcAbbrevName;
2393 int verOfDomainName;
2395 if (history.size()<3)
2398 "::need2runAutomaticDataProcessing(): the history too short");
2405 "::need2runAutomaticDataProcessing(): the reporter is not exists yet");
2411 QStringList ambigNames, fullNameElements, abbrevNameElements;
2412 ambigNames <<
"Authority" <<
"Center" <<
"Centre" <<
"Centro" <<
"Institute" <<
"National"
2413 <<
"Observatory" <<
"Observatoire" <<
"Technology" <<
"University";
2416 for (
int i=0; i<ambigNames.size()-1; i++)
2417 str += ambigNames.at(i) +
"|";
2418 str += ambigNames.at(ambigNames.size()-1) +
")";
2420 QRegExp rxF(str), rxA, rxM;
2421 rxF.setCaseSensitivity(Qt::CaseInsensitive);
2422 rxA.setCaseSensitivity(Qt::CaseInsensitive);
2423 rxM.setCaseSensitivity(Qt::CaseInsensitive);
2426 fullNameElements = ids->
getAcFullName().split(QRegExp(
"\\W+"), QString::SkipEmptyParts);
2428 for (
int i=0; i<fullNameElements.size(); i++)
2429 if (!fullNameElements.at(i).contains(rxF))
2430 str += fullNameElements.at(i) +
"|";
2431 if (str[str.size()-1] == QChar(
'|'))
2432 str[str.size()-1] = QChar(
')');
2433 rxF.setPattern(str);
2436 abbrevNameElements = ids->
getAcAbbrevName().split(QRegExp(
"\\W+"), QString::SkipEmptyParts);
2438 for (
int i=0; i<abbrevNameElements.size(); i++)
2439 str += abbrevNameElements.at(i) +
"|";
2440 if (str[str.size()-1] == QChar(
'|'))
2441 str[str.size()-1] = QChar(
')');
2442 rxA.setPattern(str);
2446 QString domainName(
"");
2448 rxM.setPattern(
"\\s*([A-Za-z0-9_]+)@([A-Za-z0-9_]+\\.[A-Za-z0-9_]+)");
2451 domainName = rxM.cap(2);
2453 ver = history.last()->getVersion() - 1;
2454 verOfExactAcFullName = verOfAcFullName = verOfAcAbbrevName = verOfDomainName = -1;
2455 for (
int i=0; i<history.size(); i++)
2457 const QString& st=history.at(i)->getText();
2458 int v=history.at(i)->getVersion();
2460 verOfExactAcFullName = v;
2461 if (st.contains(rxF))
2462 verOfAcFullName = v;
2463 if (st.contains(rxA))
2464 verOfAcAbbrevName = v;
2465 if (domainName.size()>0 && st.contains(domainName, Qt::CaseInsensitive))
2466 verOfDomainName = v;
2469 if (verOfAcFullName == -1)
2472 "::need2runAutomaticDataProcessing(): cannot find AC full name (" +
2476 if (verOfAcAbbrevName == -1)
2479 "::need2runAutomaticDataProcessing(): cannot find AC abbreviated name, " + ids->
getAcAbbrevName() +
2480 ", in the history");
2486 if (verOfExactAcFullName == ver)
2489 "::need2runAutomaticDataProcessing(): we know this session, found exact full AC name");
2492 if (domainName.size()>0 && verOfDomainName==ver)
2495 "::need2runAutomaticDataProcessing(): we know this session, found contact info from our domain");
2500 if (verOfAcFullName < ver || verOfAcAbbrevName < ver)
2503 "::need2runAutomaticDataProcessing(): found fingerprints (" +
2504 QString(
"").sprintf(
"%d,%d", verOfAcFullName, verOfAcAbbrevName) +
2505 ") but not for the last version (" + QString(
"").sprintf(
"%d", ver) +
")");
2511 "::need2runAutomaticDataProcessing(): the session looks familiar");
2556 if (!f.open(QIODevice::WriteOnly))
2559 "::writeUserData2File(): error opening output file \"" + f.fileName() +
"\"");
2564 QMap<QString, QString> hasReported;
2569 <<
"#YYY MM DD HH MM SS Station_ _ScanID_ Elevation SlntHDel SlntWDel ___partial___ "
2570 <<
"SlntHRte SlntWRte ___partial___\n"
2582 hasReported.clear();
2585 if (auxObs_1 && auxObs_2)
2587 if (!hasReported.contains(obs->
stn_1()->
getKey()))
2589 str.sprintf(
"%s %8s %10s %9.6f %10.2f %8.2f %15.6e %10.2f %8.2f %15.6e",
2604 if (!hasReported.contains(obs->
stn_2()->
getKey()))
2606 str.sprintf(
"%s %8s %10s %9.6f %10.2f %8.2f %15.6e %10.2f %8.2f %15.6e",
2610 auxObs_2->getElevationAngle()*
RAD2DEG,
2611 1.0e12*auxObs_2->getSlantDelayH(),
2612 1.0e12*auxObs_2->getSlantDelayW(),
2613 auxObs_2->getPartDelayW(),
2614 1.0e15*auxObs_2->getSlantRateH(),
2615 1.0e15*auxObs_2->getSlantRateW(),
2616 auxObs_2->getPartRateW()
2657 double& pCal4GrpDelay,
double& pCalSigma4GrpDelay,
2658 int obsIdx,
const SgMJD& epoch,
2659 const QString& sourceName,
const QString& baselineName)
2661 int numOfActualChannels = rFreqByChan.
n();
2662 while (rFreqByChan.
getElement(numOfActualChannels-1)==0.0)
2663 numOfActualChannels--;
2665 if (numOfChannels != numOfActualChannels)
2667 QString(
"").sprintf(
"evaluatePCal4GrpDelay(): number of actual channels (%d) is not equal"
2668 "to the declared number (%d), for the Obs#%d, %s @%s, on ",
2669 numOfActualChannels, numOfChannels, obsIdx, qPrintable(sourceName), qPrintable(baselineName))
2672 if (!numOfActualChannels)
2675 QString(
"").sprintf(
"evaluatePCal4GrpDelay(): number of actual channels is zero, "
2676 "nothing to do, for the Obs#%d, %s @%s, on ",
2677 obsIdx, qPrintable(sourceName), qPrintable(baselineName)) + epoch.
toString());
2680 if (numOfActualChannels==1)
2683 QString(
"").sprintf(
"evaluatePCal4GrpDelay(): only one actual channel, "
2684 "nothing to do, for the Obs#%d, %s @%s, on ",
2685 obsIdx, qPrintable(sourceName), qPrintable(baselineName)) + epoch.
toString());
2689 for (
int i=0; i<numOfActualChannels; i++)
2692 for (
int i=0; i<numOfActualChannels; i++)
2695 for (
int i=0; i<numOfActualChannels; i++)
2703 for (
int i=0; i<numOfActualChannels; i++)
2706 for (
int j=0; j<2; j++)
2707 for (
int i=0; i<numOfActualChannels-1; i++)
2717 double sum=0.0, sumX=0.0, sumY=0.0;
2718 double sumXY=0.0, sumX2=0.0, sumY2=0.0;
2719 double a=0.0, b=0.0, sigmaB=0.0;
2720 for (
int i=0; i<numOfActualChannels; i++)
2729 double delta = sum*sumX2 - sumX*sumX;
2730 a = (sumX2*sumY - sumX*sumXY)/delta;
2731 b = (sumXY*sum - sumX*sumY )/delta;
2733 if (numOfActualChannels>2)
2735 varnc = (sumY2 + a*a*sum + b*b*sumX2 - 2.0*(a*sumY + b*sumXY - a*b*sumX))/(numOfActualChannels - 2);
2737 sigmaB = sqrt(varnc*sum /delta);
2745 pCal4GrpDelay = b*1.0e6;
2746 pCalSigma4GrpDelay = sigmaB*1.0e6;
2764 const SgVector& numOfAccPeriodsByChan_USB,
const SgVector& numOfAccPeriodsByChan_LSB,
2766 const SgVector& numOfSamplesByChan_USB,
const SgVector& numOfSamplesByChan_LSB,
2767 double sampleRate,
double refFreq,
int numOfChannels,
2769 double& effFreq4GR,
double& effFreq4PH,
double& effFreq4RT,
2771 const QString& oId,
bool useEqualWeights)
2774 effFreq4GR = effFreq4PH = effFreq4RT = refFreq;
2777 int numOfActualChannels=refFreqByChan.
n();
2778 while (numOfActualChannels && refFreqByChan.
getElement(numOfActualChannels-1)==0.0)
2779 numOfActualChannels--;
2781 if (numOfChannels != numOfActualChannels)
2783 QString(
"").sprintf(
"evaluateEffectiveFreqs_old(): number of actual channels (%d) is not equal"
2784 "to the declared number (%d) for obs ", numOfActualChannels, numOfChannels) + oId);
2785 if (numOfActualChannels == 0)
2788 "evaluateEffectiveFreqs_old(): number of actual channels is zero, nothing to do for obs " + oId);
2791 if (numOfActualChannels == 1)
2794 "evaluateEffectiveFreqs_old(): only one actual channel, nothing to do for obs " + oId);
2798 int numOfGoodChannels=0;
2799 int numOfGoodAccPeriods=0;
2800 bool hasBadAmplitude=
false;
2801 bool hasSequenceBug=
true;
2802 bool areSampleNumsUsable=
false;
2803 bool areAllFreqsSame=
false;
2804 double minFrq, maxFrq, d;
2805 minFrq = maxFrq = refFreqByChan.
getElement(0);
2807 for (
int i=0; i<numOfActualChannels; i++)
2811 hasBadAmplitude =
true;
2814 fringeAmplitudeByChan.
getElement(i) > 1.0E-8)
2815 numOfGoodChannels++;
2818 numOfGoodAccPeriods++;
2820 if (i>0 && numOfAccPeriodsByChan_LSB.
getElement(i)-1 != numOfAccPeriodsByChan_LSB.
getElement(i-1))
2821 hasSequenceBug =
false;
2824 areSampleNumsUsable =
true;
2832 if (maxFrq-minFrq < 0.001)
2833 areAllFreqsSame =
true;
2835 if (areAllFreqsSame)
2838 "evaluateEffectiveFreqs_old(): all frequencies are the same, nothing to do for obs " + oId);
2842 if (numOfActualChannels!=numOfGoodChannels || numOfActualChannels!=numOfGoodAccPeriods)
2844 QString(
"").sprintf(
"evaluateEffectiveFreqs_old(): the numbers of actual channels (%d), "
2845 "good channels (%d) and good accumulated periods (%d) are not the same "
2846 "for obs ", numOfActualChannels, numOfGoodChannels, numOfGoodAccPeriods) + oId);
2848 SgVector weightByChan(numOfActualChannels);
2850 SgVector weightByChan_USB(numOfActualChannels);
2851 SgVector weightByChan_LSB(numOfActualChannels);
2853 if (numOfGoodChannels<2 || numOfGoodAccPeriods<2 || hasSequenceBug || hasBadAmplitude)
2854 for (
int i=0; i<numOfActualChannels; i++)
2860 else if (!areSampleNumsUsable)
2861 for (
int i=0; i<numOfActualChannels; i++)
2864 if (!useEqualWeights)
2872 for (
int i=0; i<numOfActualChannels; i++)
2875 if (!useEqualWeights)
2877 *fringeAmplitudeByChan.
getElement(i)/sampleRate;
2891 double halfBw=sampleRate/4.0/1.0e6;
2894 for (
int i=0; i<numOfActualChannels; i++)
2899 frq_i = refFreqByChan.
getElement(i) - halfBw;
2901 frq_i = refFreqByChan.
getElement(i) + halfBw;
2903 df = frq_i - refFreq;
2907 sumFq2 += weightByChan.
getElement(i)*frq_i*frq_i;
2909 sumDfi += weightByChan.
getElement(i)*df/frq_i;
2911 double da=sumWei*sumFr2 - sumFr1*sumFr1;
2912 double db=sumFri*sumFr1 - sumDfi*sumWei;
2913 double dc=sumFri*sumFr2 - sumDfi*sumFr1;
2915 effFreq4GR = (fabs(db)>1.0E-10)?sqrt(da/db):refFreq;
2916 effFreq4PH = (fabs(dc)>1.0E-10)?sqrt(refFreq*da/dc):refFreq;
2917 effFreq4RT = sqrt(sumFq2/sumWei);
2933 const SgVector& numOfAccPeriodsByChan_USB,
const SgVector& numOfAccPeriodsByChan_LSB,
2935 const SgVector& numOfSamplesByChan_USB,
const SgVector& numOfSamplesByChan_LSB,
2936 double sampleRate,
double refFreq,
int numOfChannels,
2938 double& effFreq4GR,
double& effFreq4PH,
double& effFreq4RT,
2940 const QString& correlatorType,
2942 const QString& oId,
bool useEqualWeights)
2952 effFreq4GR = effFreq4PH = effFreq4RT = refFreq;
2955 int numOfActualChannels=refFreqByChan.
n();
2956 while (numOfActualChannels && fabs(refFreqByChan.
getElement(numOfActualChannels-1))<1.0e-6)
2957 numOfActualChannels--;
2960 if (numOfActualChannels == 0)
2963 "evaluateEffectiveFreqs(): number of actual channels is zero, nothing to do for the obs " + oId);
2966 if (numOfActualChannels == 1)
2969 "evaluateEffectiveFreqs(): only one actual channel, nothing to do for the obs " + oId);
2973 if (!(correlatorType.contains(
"GSI", Qt::CaseInsensitive) ||
2974 correlatorType.contains(
"K5", Qt::CaseInsensitive)) &&
2975 numOfChannels != numOfActualChannels)
2977 QString(
"").sprintf(
"evaluateEffectiveFreqs(): number of actual channels (%d) is not equal"
2978 "to the declared number (%d) for the obs ", numOfActualChannels, numOfChannels) + oId);
2981 int numOfGoodChannels=0;
2982 int numOfGoodAccPeriods=0;
2983 bool hasBadAmplitude=
false;
2984 bool hasSequenceBug=
true;
2985 bool areSampleNumsUsable=
false;
2986 bool areAllFreqsSame=
false;
2987 double minFrq, maxFrq;
2988 minFrq = maxFrq = refFreqByChan.
getElement(0);
2990 for (
int i=0; i<numOfActualChannels; i++)
2994 hasBadAmplitude =
true;
2997 fringeAmplitudeByChan.
getElement(i) > 1.0E-8)
2998 numOfGoodChannels++;
3001 numOfGoodAccPeriods++;
3003 if (i>0 && numOfAccPeriodsByChan_LSB.
getElement(i)-1 != numOfAccPeriodsByChan_LSB.
getElement(i-1))
3004 hasSequenceBug =
false;
3007 areSampleNumsUsable =
true;
3017 if (maxFrq-minFrq < 0.001)
3018 areAllFreqsSame =
true;
3020 if (areAllFreqsSame)
3023 "evaluateEffectiveFreqs(): all frequencies are the same, nothing to do for obs " + oId);
3027 if (!(correlatorType.contains(
"GSI", Qt::CaseInsensitive) ||
3028 correlatorType.contains(
"K5", Qt::CaseInsensitive)) &&
3029 (numOfActualChannels!=numOfGoodChannels || numOfActualChannels!=numOfGoodAccPeriods))
3031 QString(
"").sprintf(
"evaluateEffectiveFreqs(): the numbers of actual channels (%d), "
3032 "good channels (%d) and good accumulated periods (%d) are not the same "
3033 "for obs ", numOfActualChannels, numOfGoodChannels, numOfGoodAccPeriods) + oId);
3034 if (hasBadAmplitude)
3036 "evaluateEffectiveFreqs(): bad amplitudes are detected for the obs " + oId);
3039 "evaluateEffectiveFreqs(): the sequence bug is detected for the obs " + oId);
3042 SgVector noAP_USB(numOfActualChannels);
3043 SgVector noAP_LSB(numOfActualChannels);
3044 for (
int i=0; i<numOfActualChannels; i++)
3046 if (useEqualWeights)
3048 if (numOfSamplesByChan_USB.
getElement(i) > 0.0)
3052 if (numOfSamplesByChan_LSB.
getElement(i) > 0.0)
3057 else if (areSampleNumsUsable)
3077 double halfBw=sampleRate/4.0/1.0e6;
3078 double df, frq_i, wei2, weiUSB, weiLSB;
3083 for (
int i=0; i<numOfActualChannels; i++)
3086 df = frq_i - refFreq;
3087 if (!useEqualWeights)
3089 if (!areSampleNumsUsable)
3100 sumFr2 += wei2*df*df;
3101 sumFq2 += wei2*frq_i*frq_i;
3102 sumFri += wei2/frq_i;
3103 sumDfi += wei2*df/frq_i;
3109 for (
int i=0; i<numOfActualChannels; i++)
3113 if (!useEqualWeights)
3115 if (!areSampleNumsUsable)
3122 weiUSB = numOfSamplesByChan_USB.
getElement(i);
3123 weiLSB = numOfSamplesByChan_LSB.
getElement(i);
3125 wei2 = (weiUSB + weiLSB)*fringeAmplitudeByChan.
getElement(i);
3126 if (weiUSB>0.0 && weiLSB>0.0)
3129 else if (weiUSB > 0.0)
3132 else if (weiLSB > 0.0)
3139 df = frq_i - refFreq;
3143 sumFr2 += wei2*df*df;
3144 sumFq2 += wei2*frq_i*frq_i;
3145 sumFri += wei2/frq_i;
3146 sumDfi += wei2*df/frq_i;
3150 double da=sumWei*sumFr2 - sumFr1*sumFr1;
3151 double db=sumFri*sumFr1 - sumWei*sumDfi;
3152 double dc=sumFri*sumFr2 - sumFr1*sumDfi;
3154 effFreq4GR = (fabs(db)<1.0E-12)?refFreq:sqrt(da/db);
3155 effFreq4PH = (fabs(dc)<1.0E-12)?refFreq:sqrt(refFreq*da/dc);
3156 effFreq4RT = (sumWei<1.0E-16)?refFreq:sqrt(sumFq2/sumWei);
3159 if (fabs(db)<1.0E-12)
3161 "evaluateEffectiveFreqs(): suspicious channel setup (fabs(db)<1.0E-12) for the obs " + oId);
3162 if (fabs(dc)<1.0E-12)
3164 "evaluateEffectiveFreqs(): suspicious channel setup (fabs(dc)<1.0E-12) for the obs " + oId);
3167 "evaluateEffectiveFreqs(): suspicious channel setup (sumWei<1.0E-16) for the obs " + oId);
const Sg3dVector v3Zero(0.0, 0.0, 0.0)
const SgMJD tZero(1957, 10, 4)
#define RAD2MAS
radians to ms:
#define DAY2SEC
radians to mas:
#define RAD2DEG
< radians to degrees:
QMap< QString, SgVlbiBaselineInfo * >::iterator BaselinesByName_it
QMap< QString, SgVlbiBaselineInfo * > BaselinesByName
bool normResidSortingOrderLessThan(SgVlbiObservable *, SgVlbiObservable *)
void evaluateEffectiveFreqs_old_version(const SgVector &numOfAccPeriodsByChan_USB, const SgVector &numOfAccPeriodsByChan_LSB, const SgVector &refFreqByChan, const SgVector &fringeAmplitudeByChan, const SgVector &numOfSamplesByChan_USB, const SgVector &numOfSamplesByChan_LSB, double sampleRate, double refFreq, int numOfChannels, double &effFreq4GR, double &effFreq4PH, double &effFreq4RT, const QString &oId, bool useEqualWeights)
void evaluateEffectiveFreqs(const SgVector &numOfAccPeriodsByChan_USB, const SgVector &numOfAccPeriodsByChan_LSB, const SgVector &refFreqByChan, const SgVector &fringeAmplitudeByChan, const SgVector &numOfSamplesByChan_USB, const SgVector &numOfSamplesByChan_LSB, double sampleRate, double refFreq, int numOfChannels, double &effFreq4GR, double &effFreq4PH, double &effFreq4RT, const QString &correlatorType, const QString &oId, bool useEqualWeights)
void evaluatePCal4GrpDelay(SgVector &pCalByChan, const SgVector &rFreqByChan, int numOfChannels, double &pCal4GrpDelay, double &pCalSigma4GrpDelay, int obsIdx, const SgMJD &epoch, const QString &sourceName, const QString &baselineName)
QMap< QString, SgVlbiSourceInfo * >::iterator SourcesByName_it
QMap< QString, SgVlbiStationInfo * >::iterator StationsByName_it
const QString & getComments() const
const SgMJD & getTsince() const
const QString & getFileName() const
SgAPrioriRec * lookupApRecord(const QString &, const SgMJD &=tZero)
bool readFile(const QString &fileName, DataType=DT_UNDEF)
bool isAttr(uint a) const
bool addBreak(const SgMJD &t, double a0=0.0, double a1=0.0, double a2=0.0, bool isDynamic=false)
double spline(double arg, int nColumn, double &r)
void addParametersList(QList< SgParameter * > *, bool=false)
void prepare2Run(int numOfExpectedObs, const SgMJD &, const SgMJD &, const SgMJD &)
void processConstraint(double o_c, double sigma)
void processObs(const SgMJD &t, const SgVector &o_c, const SgVector &sigma)
SgTidalUt1::UT1TideContentType ut1Type() const
InputEopType inputEopType() const
const QString & getFileName() const
bool readFile(const QString &, const SgMJD &, int numOfPoints)
bool readFile(const QString &)
const QString & getFileName() const
void setupExternalWeights(BaselinesByName &)
const QString & getAcAbbrevName() const
const QString & getUserEmailAddress() const
const QString & getAcFullName() const
virtual void write(LogLevel, quint32, const QString &, bool=false)
@ F_Simple
Digits: 2010/04/02 17:02:43.6.
QString toString(Format format=F_Verbose) const
void setElement(unsigned int i, unsigned int j, double d)
double getElement(unsigned int i, unsigned int j) const
bool readFile(const QString &)
const QString & getFileName() const
void calcCorrections(const SgMJD &, double &dUt1, double &dPx, double &dPy)
double getDversion() const
const QString & getKey() const
int numProcessed(DataType dType) const
double wrms(DataType) const
virtual int getMediaIdx() const
@ Attr_NOT_VALID
omit the observation;
@ Attr_PROCESSED
the observation has been processed;
@ Attr_DYNAMIC
parameters supposed to be estimated during the common solution;
double getSolution() const
void setSigmaAPriori(double v)
SgParameterCfg::PMode getMode(int i) const
void absorbInfo(SgTaskManager *)
SgIdentities * identities()
const QString & getExtAPrioriSitesVelocitiesFileName() const
bool getDoIonoCorrection4SBD() const
const QString & getExtWeightsFileName() const
bool getUseExtAPrioriSitesVelocities() const
void setDoWeightCorrection(bool)
bool getUseExtAPrioriSourceSsm() const
bool getUseExtAPrioriHiFyErp() const
bool getUseExtAPrioriSitesPositions() const
bool getUseExtAPrioriErp() const
bool getIsSolveCompatible() const
VlbiDelayType getUseDelayType() const
bool getDoWeightCorrection() const
bool getUseExtAPrioriMeanGradients() const
bool getDoClockBreakDetectionMode1() const
int getGoodQualityCodeAtStartup() const
const QString & getExtAPrioriSitesPositionsFileName() const
const QString & getExtAPrioriHiFyErpFileName() const
static QString evaluatePath2(const QString &dir2, const QString &path2)
bool getUseExternalWeights() const
void setActiveBandIdx(int)
bool getUseExtAPrioriSourcesPositions() const
bool getHave2ApplyUt1OceanTideHFContrib() const
bool getHave2ApplyPxyOceanTideHFContrib() const
bool getDoOutliersEliminationMode1() const
bool getUseExtAPrioriAxisOffsets() const
bool getUseDynamicClockBreaks() const
int getOpIterationsLimit() const
const QString & getExtAPrioriMeanGradientsFileName() const
const QString & getExtAPrioriSourcesPositionsFileName() const
double getOpThreshold() const
void setUseDelayType(VlbiDelayType)
bool getUseGoodQualityCodeAtStartup() const
const QString & getExtAPrioriAxisOffsetsFileName() const
int getActiveBandIdx() const
bool getOpHave2SuppressWeightCorrection() const
const QString & getExtAPrioriErpFileName() const
const QString & getExtAPrioriSourceSsmFileName() const
void setLongOperationStart(void(*operation)(int, int, const QString &))
SgVlbiSessionInfo *& currentSessionInfo()
void setLongOperationMessage(void(*operation)(const QString &))
void setLongOperationStop(void(*operation)())
void setObservations(QList< SgObservation * > *)
virtual void run(bool=true)
void setHave2InteractWithGui(bool have2)
void setLongOperationShowStats(void(*operation)(const QString &label, int numTot, int numPrc, double wrms, double chi2))
virtual bool prepare4Run()
SgVlbiSession *& currentSession()
void setLongOperationProgress(void(*operation)(int))
void setConfig(const SgTaskConfig &)
void addSession(SgVlbiSessionInfo *, SgVlbiSession *)
void setParameters(const SgParametersDescriptor &)
double calc(const SgMJD &)
void setElement(unsigned int i, double d)
double getElement(unsigned int i) const
double getSlantDelayH() const
double getSlantRateH() const
double getElevationAngle() const
double getPartRateW() const
double getSlantRateW() const
double getPartDelayW() const
double getSlantDelayW() const
QMap< QString, SgVlbiBaselineInfo * > & baselinesByName()
QMap< QString, SgVlbiStationInfo * > & stationsByName()
QList< SgVlbiObservable * > & observables()
SgVlbiHistory & history()
SgVlbiStationInfo * stn_2(QMap< QString, SgVlbiStationInfo * >) const
@ Attr_NOT_VALID
omit the baseline;
void evaluateCBIndicator()
SgVlbiStationInfo * stn_1(QMap< QString, SgVlbiStationInfo * >) const
double getMeanGrDelResiduals() const
void evaluateMeanGrDelResiduals()
QList< SgVlbiObservable * > & observables()
void calculateClockF1(SgTaskConfig *)
double getTypicalAmbigSpacing(SgTaskConfig::VlbiDelayType type) const
SgClockBreakIndicator * cbIndicator()
double getMeanGrDelResidualsSigma() const
void setAuxSign(double s)
double getAuxSign() const
void shiftAmbiguities(int deltaN)
void setGrdAmbiguities2min()
double sigma2Apply() const
double getResidual() const
double getResidualNorm() const
const SgMJD & epoch() const
int getQualityFactor() const
SgVlbiStationInfo *& stn_2()
SgVlbiStationInfo *& stn_1()
SgVlbiObservation * owner()
SgVlbiSourceInfo * getSrc() const
SgVlbiSourceInfo *& src()
const QString & getBandKey() const
SgVlbiBaselineInfo * getBaseline() const
SgVlbiBaselineInfo *& baseline()
SgVlbiMeasurement * activeDelay()
SgVlbiMeasurement & grDelay()
SgVlbiMeasurement & sbDelay()
double getDrat_dCipY() const
@ Attr_SBD_NOT_VALID
omit the observation if single band delay is analysed;
void setExtRateErp(double v)
SgVlbiStationInfo * stn_1()
SgVlbiAuxObservation * auxObs_2()
void setAprioriCxLfContrib(double v)
void setExtDelayHiFyUt1(double v)
void setAprioriUt1HfContrib(double v)
void setupActiveMeasurement(const SgTaskConfig *)
SgVlbiBaselineInfo * baseline()
double getDdel_dPy() const
void setAprioriCyLfContrib(double v)
double getDrat_dPx() const
void setupActiveObservable(const QString &)
void setAprioriPyLfContrib(double v)
void setExtRateHiFyUt1(double v)
double getDrat_dCipX() const
void setExtDelayErp(double v)
SgVlbiStationInfo * stn_2()
double getDdel_dCipY() const
void setAprioriPyHfContrib(double v)
double getDrat_dUT1() const
void setAprioriUt1LfContrib(double v)
void setExtRateHiFyPxy(double v)
const QString & getScanName() const
void setAprioriPxLfContrib(double v)
void setExtDelayHiFyPxy(double v)
void setAprioriPxHfContrib(double v)
double getDdel_dPx() const
double getDrat_dPy() const
QMap< QString, SgVlbiObservable * > & observableByKey()
double getDdel_dUT1() const
virtual bool isEligible(const SgTaskConfig *)
SgVlbiAuxObservation * auxObs_1()
double getDdel_dCipX() const
const QString & getName() const
@ Attr_FF_OUTLIERS_PROCESSED
outliers have been processed;
@ Attr_FF_AMBIGS_RESOLVED
ambiguities have been resolved;
@ Attr_HAS_IONO_CORR
the theoretical values are available;
@ Attr_HAS_WEIGHTS
the theoretical values are available;
SgMJD tFinis_
last epoch of the observations;
SgMJD tMean_
mean epoch of the observations;
const SgMJD & getTMean() const
SgMJD tStart_
first epoch of the observations;
void doPostReadActions_old()
SgAPriories apStationGradients_
void(* longOperationStart_)(int minStep, int maxStep, const QString &message)
int numberOfBands() const
StationsByName stationsByName_
bool writeUserData2File(const QString &fileName)
bool need2runAutomaticDataProcessing()
QList< SgVlbiBand * > & bands()
void resolveGrAmbigTriangles(int bandIdx)
QList< SgVlbiBand * > bands_
SgTidalUt1::UT1TideContentType tabsUt1Type_
void calculateIonoCorrections(const SgTaskConfig *)
SgVector * args4PxyInterpolation_
SgAPriories apStationVelocities_
int restoreOutliers(int bandIdx)
void(* longOperationProgress_)(int step)
void prepare4ErpInterpolation()
SgTaskConfig lastProcessedConfig_
QMap< QString, SgVlbiStationInfo * > & stationsByName()
SgAPriories apAxisOffsets_
QList< SgVlbiObservation * > observations_
SgAPriories apSourceStrModel_
SgAPriories apStationPositions_
SgSolutionReporter * reporter_
bool detectClockBreaks_mode1(SgVlbiBand *, QString &, SgMJD &)
void(* longOperationStop_)()
bool hasOutlierRestoratioRun_
void process(bool haveProcessAllBands, bool interactWithGui)
bool hasReferenceCoordinatesStation()
SgAPriories apSourcePositions_
SgCubicSpline * externalErpInterpolator_
bool isInUse(SgVlbiBaselineInfo *)
void scanBaselines4GrDelayAmbiguities(int bandIdx)
SgExternalEopFile externalErpFile_
SgExternalWeights externalWeights_
void(* longOperationMessage_)(const QString &message)
bool hasPxyInterpolation_
void eliminateLargeOutliers(int bandIdx, int maxNumOfPasses, double wrmsRatio)
void correctClockBreak(SgVlbiBand *, SgVlbiStationInfo *, const SgMJD &, double, double, bool, bool=true)
SgCubicSpline * innerUt1Interpolator_
void getAprioriErp(const SgMJD &t, double &vUt1, double &rUt1, double &vPx, double &rPx, double &vPy, double &rPy, double &vCx, double &rCx, double &vCy, double &rCy)
void calculateClockBreaksParameters(QList< SgClockBreakAgent * > &, SgVlbiBand *)
BaselinesByName baselinesByName_
void calculateClockBreakParameter(const SgMJD &, SgVlbiStationInfo *, SgVlbiBand *, double &, double &)
bool hasUt1Interpolation_
SgParametersDescriptor * parametersDescriptor_
QString path2APrioriFiles_
SgVlbiBand * primaryBand_
int eliminateOutliers(int bandIdx)
void eliminateOutliersMode1()
void eliminateOutliersSimpleMode(int bandIdx, int maxNumOfPasses, double threshold, double=0.0)
void detectAndProcessClockBreaks()
int suppressNotSoGoodObs()
bool hasOutlierEliminationRun_
static QString className()
void checkExcludedStations()
SgVector * args4Ut1Interpolation_
SgMatrix * tabs4Ut1Interpolation_
void(* longOperationShowStats_)(const QString &label, int numTot, int numPrc, double wrms, double chi2)
void lookupExternalWeights()
bool have2InteractWithGui_
int numOfPts4ErpInterpolation_
SourcesByName sourcesByName_
bool isAble2InterpolateErp_
void restoreIonCorrections()
void checkBandForClockBreaks(int, bool)
SgCubicSpline * innerPxyInterpolator_
QMap< QString, SgVlbiBaselineInfo * > & baselinesByName()
SgMatrix * tabs4PxyInterpolation_
bool hasReferenceClocksStation()
SgModelEop_JMG_96_hf apHiFyEop_
void addSrcStructPoint(double k, double b, double x, double y, bool estK=false, bool estB=false, bool estR=false)
void setAprioriComments(const QString &str)
double getAl2ExtA() const
QList< StructModelMp > & sModel()
void clearSrcStructPoints()
void setAl2ExtA(double l)
static double arcLength(double ra_1, double dn_1, double ra_2, double dn_2)
@ Attr_HAS_A_PRIORI_POS
indicates that the source has a priori position;
double getGradNorth() const
double getAxisOffset() const
void setV_ea(const Sg3dVector &v)
double getGradEast() const
@ Attr_NOT_VALID
omit the station;
@ Attr_CONSTRAIN_COO
constrain station position in estimation;
@ Attr_REFERENCE_CLOCKS
the clocks are the reference ones;
@ Attr_HAS_A_PRIORI_AXO
indicates that the station has a priori axis offset;
@ Attr_ESTIMATE_COO
estimate station position;
@ Attr_HAS_A_PRIORI_POS
indicates that the station has a priori r and v;
void setGradNorth(double v)
void setAxisOffset_ea(double v)
const Sg3dVector & getR()
double getAxisOffset_ea() const
const Sg3dVector & getR_ea()
SgBreakModel & clockBreaks()
int getClocksModelOrder() const
void setR_ea(const Sg3dVector &r)
void setGradEast(double v)