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.");
659 "::prepare4ErpInterpolation(): the UT1type has been adjusted",
true);
662 "::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++)
1323 candidates.insert(baselineInfo->
getKey(), baselineInfo);
1353 if (!candidates.size())
1356 double maxConsumed=0.0;
1358 QString blName, stnName_1, stnName_2;
1360 for (; iBli!=candidates.end(); ++iBli)
1361 if (maxConsumed < iBli.value()->cbIndicator()->totWrms_ - iBli.value()->cbIndicator()->minWrms_)
1363 maxConsumed = iBli.value()->
cbIndicator()->
totWrms_ - iBli.value()->cbIndicator()->minWrms_;
1364 blName = iBli.key();
1365 tBreak = iBli.value()->cbIndicator()->epoch_;
1373 "::detectClockBreaks(): baseline name " + blName +
1374 " is not in band's baselinesByName_ container");
1392 QMap<QString, int> numByName;
1393 iBli = candidates.begin();
1394 for (; iBli!=candidates.end(); ++iBli)
1395 if (iBli.key().contains(stnName_1) || iBli.key().contains(stnName_2))
1408 QMap<QString, int>::iterator iAux=numByName.begin();
1409 int minN=iAux.value(), maxN=iAux.value();
1410 stnName = iAux.key();
1411 for (; iAux!=numByName.end(); ++iAux)
1419 stnName = iAux.key();
1431 iBli = candidates.begin();
1432 for (; iBli!=candidates.end(); ++iBli)
1433 if (iBli.key().contains(stnName) &&
1434 iBli.value()->cbIndicator()->tOnLeft_ <= tBreak &&
1435 tBreak <= iBli.value()->cbIndicator()->tOnRight_)
1437 if (tBreak < iBli.value()->cbIndicator()->epoch_)
1439 tBreak = iBli.value()->cbIndicator()->epoch_;
1449 "::detectClockBreaks(): stnName " + stnName +
" is not in stationsByName() container");
1453 "::detectClockBreaks(): impossible to guess the station name: maxN==minN==" +
1454 QString(
"").setNum(maxN));
1463 const int clockBreaksLimit=10;
1464 int numOfClockBreaks=0;
1467 if (bandIdx < 0 ||
bands_.size()-1 < bandIdx)
1468 return numOfClockBreaks;
1473 "::checkBandForClockBreaks(): got wrong band (=NULL) for the band index " +
1474 QString(
"").setNum(bandIdx));
1475 return numOfClockBreaks;
1479 "::checkBandForClockBreaks(): processing observations from " + band->
getKey() +
"-band",
true);
1480 QString stnName(
"");
1482 int idx=0, bandIdxSaved;
1488 "::checkBandForClockBreaks(): detected clock break #" + QString(
"").setNum(idx) +
" at " +
1489 stnName +
" on " + tBreak.
toString(),
true);
1494 double shift, sigma;
1497 shift = round(1.0E9*shift);
1500 shift = round(1.0E12*shift)*1.0E-3;
1502 if (fabs(shift) > 3.0*sigma)
1507 "::checkBandForClockBreaks(): detected clock break at " + stnBreak->
getKey() +
1508 " station on " + tBreak.
toString() +
"; shift on " +
1509 QString(
"").sprintf(
"%.4f ns", shift),
true);
1518 return numOfClockBreaks;
1527 "::detectAndProcessClockBreaks(): clock break detection procedure initiated",
true);
1539 const SgMJD& tBreak,
double shift,
double sigma,
bool have2AdjustResiduals,
bool have2Complain)
1543 if (have2Complain &&
1545 QMessageBox::warning(NULL,
"A clock break is at a reference clock station",
1546 "A clock break has occured at clocks of a reference clock station.\n"
1547 "It is suggested to assign a reference clock station attribute to another station "
1548 "and reprocess data.\n"
1550 QMessageBox::Yes | QMessageBox::No, QMessageBox::No)==QMessageBox::No)
1558 stn2Correct = stnInfo;
1565 for (
int i=0; i<stn2Correct->
clockBreaks().size(); i++)
1566 if (fabs(*(stn2Correct->
clockBreaks().at(i)) - tBreak) < 5.5E-6)
1571 clockBreak->
setS0(sigma);
1573 "::processClockBreakMarks(): the clock break at " + stn2Correct->
getKey() +
1574 " station on " + tBreak.
toString() +
"; has been updated to " +
1575 QString(
"").sprintf(
"%.4f ns", clockBreak->
getA0()));
1580 clockBreak->
setS0(sigma);
1583 "::processClockBreakMarks(): the new break has been appended to the model");
1586 "::processClockBreakMarks(): adding new clock break at " + stn2Correct->
getKey() +
1587 " station on " + tBreak.
toString() +
" failed");
1596 if (have2AdjustResiduals)
1600 for (
int iObs=0; iObs<band->
observables().size(); iObs++)
1644 if (bandIdx<0 || bandIdx>
bands_.size()-1)
1650 "::eliminateOutliersSimpleMode(): got wrong band (=NULL) for the band index " +
1651 QString(
"").setNum(bandIdx));
1654 int numOfEliminated, numOfPasses;
1656 bool hasBeenModified;
1657 bool need2check4absValue=upperLimit>0.0;
1662 numOfEliminated = 0;
1664 hasBeenModified =
true;
1670 while (hasBeenModified && (numOfPasses<maxNumOfPasses))
1675 hasBeenModified =
false;
1676 for (
int idx=0; idx<band->
observables().size(); idx++)
1683 (need2check4absValue && fabs(m->
getResidual()) > upperLimit) )
1687 hasBeenModified =
true;
1696 "::eliminateOutliersSimpleMode(): eliminated " + QString(
"").setNum(numOfEliminated) +
1698 " observables from the " + band->
getKey() +
"-band in " + QString(
"").setNum(numOfPasses) +
1699 " passes, the threshold is " + QString(
"").setNum(threshold));
1700 if (elluminated.size())
1703 "::eliminateOutliersSimpleMode(): the eliminated observations are:");
1704 for (
int i=0; i<elluminated.size(); i++)
1712 QString(
"").sprintf(
"%.3f +/- %.3f (ns) | %.3f with QC %d",
1717 elluminated.clear();
1727 if (bandIdx<0 || bandIdx>
bands_.size()-1)
1733 "::eliminateLargeOutliers(): got wrong band (=NULL) for the band index " +
1734 QString(
"").setNum(bandIdx));
1739 bool hasBeenModified;
1740 double sigma, prevSigma, residMax;
1744 hasBeenModified =
true;
1754 "::eliminateLargeOutliers(): start of the procedure");
1755 while (hasBeenModified &&
1756 (numOfPasses < maxNumOfPasses) &&
1762 hasBeenModified =
false;
1764 for (
int idx=0; idx<band->
observables().size(); idx++)
1780 "::eliminateLargeOutliers(): found a candidate: " + testedObs->
strId() +
" with norm.resid= " +
1781 QString(
"").sprintf(
"%10.4f", residMax));
1791 if (wrmsRatio < prevSigma/sigma)
1793 hasBeenModified =
true;
1794 elliminated << testedObs;
1797 "::eliminateLargeOutliers(): the obs is removed");
1804 "::eliminateLargeOutliers(): the obs is ok: the ratio = " +
1805 QString(
"").asprintf(
"%.2f with the threshold of %.2f", prevSigma/sigma, wrmsRatio));
1810 "::eliminateLargeOutliers(): the observable is NULL");
1815 "::eliminateLargeOutliers(): eliminated " + QString(
"").setNum(elliminated.size()) +
1817 " observables from the " + band->
getKey() +
"-band in " + QString(
"").setNum(numOfPasses) +
1819 if (elliminated.size())
1822 "::eliminateLargeOutliers(): the eliminated observations are:");
1823 for (
int i=0; i<elliminated.size(); i++)
1828 "::eliminateLargeOutliers(): # " +
1832 QString(
"").sprintf(
"%.3f +/- %.3f (ns) | %.3f with QC %d",
1837 elliminated.clear();
1848 if (bandIdx<0 || bandIdx>
bands_.size()-1)
1854 "::eliminateOutliers(): got wrong band (=NULL) for the band index " +
1855 QString(
"").setNum(bandIdx));
1859 int numOfEliminated, numOfPasses, maxNumOfPasses;
1861 bool hasBeenModified;
1863 bool wasMeddledIntoWc=
false;
1869 wasMeddledIntoWc =
true;
1874 numOfEliminated = 0;
1876 hasBeenModified =
true;
1883 (*longOperationStart_)(numOfPasses, maxNumOfPasses,
"");
1887 while (hasBeenModified && (numOfPasses<maxNumOfPasses))
1892 for (
int idx=0; idx<band->
observables().size(); idx++)
1898 outlierCandidates << o;
1901 if (outlierCandidates.size())
1905 double max=fabs(outlierCandidates.first()->activeDelay()->getResidualNorm());
1906 if (outlierCandidates.size()>2 && max>2.0*threshold)
1909 std::cout <<
" MODE: cluster\n";
1911 while (fabs(outlierCandidates.last()->activeDelay()->getResidualNorm())<max-0.5*threshold &&
1912 outlierCandidates.size()>1)
1913 outlierCandidates.removeLast();
1918 std::cout <<
" MODE: the largest one\n";
1921 outlierCandidates.clear();
1922 outlierCandidates << o;
1926 std::cout <<
"Pass # " << numOfPasses <<
" (" << maxNumOfPasses <<
") "
1927 <<
"observations to be excluded:\n";
1929 for (
int idx=0; idx<outlierCandidates.size(); idx++)
1946 hasBeenModified =
true;
1951 (*longOperationMessage_)(
"Processing outliers: pass " +
1952 QString(
"").setNum(numOfPasses) +
" from " + QString(
"").setNum(maxNumOfPasses));
1954 (*longOperationProgress_)(numOfPasses);
1960 hasBeenModified =
false;
1962 std::cout <<
"the size is 0\n";
1965 outlierCandidates.clear();
1969 if (numOfPasses==maxNumOfPasses)
1970 std::cout <<
"reached max passing number (" << numOfPasses <<
")\n";
1975 "::eliminateOutliers(): eliminated " + QString(
"").setNum(numOfEliminated) +
1976 " observables from " + band->
getKey() +
"-band in " + QString(
"").setNum(numOfPasses) +
1977 " passes with the threshold " + QString(
"").setNum(threshold));
1978 if (elluminated.size())
1981 "::eliminateOutliers(): the eliminated observations are:");
1982 for (
int i=0; i<elluminated.size(); i++)
1990 QString(
"").sprintf(
"%.3f +/- %.3f (ns) | %.3f with QC %d",
1995 elluminated.clear();
2000 if (wasMeddledIntoWc)
2004 (*longOperationStop_)();
2007 return numOfEliminated;
2015 if (bandIdx<0 || bandIdx>
bands_.size()-1)
2021 "::restoreOutliers(): got wrong band (=NULL) for the band index " +
2022 QString(
"").setNum(bandIdx));
2026 int numOfRestored, numOfPasses, maxNumOfPasses;
2028 bool hasBeenModified;
2030 bool wasMeddledIntoWc=
false;
2034 wasMeddledIntoWc =
true;
2041 hasBeenModified =
true;
2047 while (hasBeenModified && (numOfPasses<maxNumOfPasses))
2049 if (numOfPasses > 0)
2052 for (
int idx=0; idx<band->
observables().size(); idx++)
2061 outlierCandidates << o;
2064 if (outlierCandidates.size())
2069 max = fabs(outlierCandidates.first()->activeDelay()->getResidualNorm());
2070 min = fabs(outlierCandidates.last ()->activeDelay()->getResidualNorm());
2071 if (outlierCandidates.size()>2 && min<1.0)
2074 std::cout <<
" MODE: cluster-bottom\n";
2076 while (fabs(outlierCandidates.first()->activeDelay()->getResidualNorm())>1.0 &&
2077 outlierCandidates.size()>1)
2078 outlierCandidates.removeFirst();
2080 else if (outlierCandidates.size()>2 && max>1.0)
2086 std::cout <<
" MODE: cluster-top\n";
2092 std::cout <<
" MODE: the smallest one\n";
2095 outlierCandidates.clear();
2096 outlierCandidates << o;
2099 std::cout <<
"Pass # " << numOfPasses <<
" (" << maxNumOfPasses <<
") "
2100 <<
"observation to be restored:\n";
2102 for (
int idx=0; idx<outlierCandidates.size(); idx++)
2117 hasBeenModified =
true;
2121 hasBeenModified =
false;
2123 std::cout <<
"the size is 0\n";
2126 outlierCandidates.clear();
2130 if (numOfPasses==maxNumOfPasses)
2131 std::cout <<
"reached max passing number (" << numOfPasses <<
")\n";
2135 "::restoreOutliers(): restored " + QString(
"").setNum(numOfRestored) +
2136 " observables from " + band->
getKey() +
"-band in " + QString(
"").setNum(numOfPasses) +
2137 " passes with the threshold " + QString(
"").setNum(threshold));
2140 if (wasMeddledIntoWc)
2145 return numOfRestored;
2159 if (bandIdx<0 || bandIdx>
bands_.size()-1)
2165 "::scanBaselines4GrDelayAmbiguities(): got wrong band (=NULL) for the band index " +
2166 QString(
"").setNum(bandIdx));
2179 for (; itBaselineInfo!=band->
baselinesByName().end(); ++itBaselineInfo)
2220 if (m < stn->numProcessed(
DT_DELAY))
2231 refStation = station;
2233 "::resolveGrAmbigTriangles(): cannot find the reference clock station, picked " +
2234 refStation->
getKey() +
" as the reference one");
2239 "::resolveGrAmbigTriangles(): unable to determine the reference clock station");
2245 "::resolveGrAmbigTriangles(): found " + refStation->
getKey() +
" as the reference clock station");
2257 stations.append(it.value());
2261 baselines.append(it.value());
2263 int numOfStations=stations.size();
2264 int numOfBaselines=baselines.size();
2270 for (
int iBaseline=0; iBaseline<numOfBaselines; iBaseline++)
2273 pN =
new SgParameter(
"N_" + QString(
"").sprintf(
"%03d_(", iBaseline) +
2274 baselineInfo->
getKey() +
")");
2276 baselineInfo->
pAux() = pN;
2277 localParameters->append(pN);
2280 estimator->
prepare2Run(numOfStations*(numOfStations-1)*(numOfStations-2)/2/3 + 10,
2286 for (
int i=0; i<numOfBaselines; i++)
2289 if (bl->
getKey().contains(refStation->
getKey() +
":") ||
2303 for (
int i=0; i<numOfStations; i++)
2305 stI = stations.at(i);
2306 for (
int j=i+1; j<numOfStations; j++)
2308 stJ = stations.at(j);
2326 for (
int k=j+1; k<numOfStations; k++)
2328 stK = stations.at(k);
2384 vO_C.setElement (0, b);
2393 for (
int iBaseline=0; iBaseline<numOfBaselines; iBaseline++)
2406 for (
int i=0; i<localParameters->size(); i++)
2407 delete localParameters->at(i);
2408 delete localParameters;
2409 localParameters = NULL;
2425 "::need2runAutomaticDataProcessing(): this session is not processed yet");
2430 int ver, verOfExactAcFullName, verOfAcFullName, verOfAcAbbrevName;
2431 int verOfDomainName;
2433 if (history.size()<3)
2436 "::need2runAutomaticDataProcessing(): the history too short");
2443 "::need2runAutomaticDataProcessing(): the reporter is not exists yet");
2449 QStringList ambigNames, fullNameElements, abbrevNameElements;
2450 ambigNames <<
"Authority" <<
"Center" <<
"Centre" <<
"Centro" <<
"Institute" <<
"National"
2451 <<
"Observatory" <<
"Observatoire" <<
"Technology" <<
"University";
2454 for (
int i=0; i<ambigNames.size()-1; i++)
2455 str += ambigNames.at(i) +
"|";
2456 str += ambigNames.at(ambigNames.size()-1) +
")";
2458 QRegExp rxF(str), rxA, rxM;
2459 rxF.setCaseSensitivity(Qt::CaseInsensitive);
2460 rxA.setCaseSensitivity(Qt::CaseInsensitive);
2461 rxM.setCaseSensitivity(Qt::CaseInsensitive);
2464 fullNameElements = ids->
getAcFullName().split(QRegExp(
"\\W+"), QString::SkipEmptyParts);
2466 for (
int i=0; i<fullNameElements.size(); i++)
2467 if (!fullNameElements.at(i).contains(rxF))
2468 str += fullNameElements.at(i) +
"|";
2469 if (str[str.size()-1] == QChar(
'|'))
2470 str[str.size()-1] = QChar(
')');
2471 rxF.setPattern(str);
2474 abbrevNameElements = ids->
getAcAbbrevName().split(QRegExp(
"\\W+"), QString::SkipEmptyParts);
2476 for (
int i=0; i<abbrevNameElements.size(); i++)
2477 str += abbrevNameElements.at(i) +
"|";
2478 if (str[str.size()-1] == QChar(
'|'))
2479 str[str.size()-1] = QChar(
')');
2480 rxA.setPattern(str);
2484 QString domainName(
"");
2486 rxM.setPattern(
"\\s*([A-Za-z0-9_]+)@([A-Za-z0-9_]+\\.[A-Za-z0-9_]+)");
2489 domainName = rxM.cap(2);
2491 ver = history.last()->getVersion() - 1;
2492 verOfExactAcFullName = verOfAcFullName = verOfAcAbbrevName = verOfDomainName = -1;
2493 for (
int i=0; i<history.size(); i++)
2495 const QString& st=history.at(i)->getText();
2496 int v=history.at(i)->getVersion();
2498 verOfExactAcFullName = v;
2499 if (st.contains(rxF))
2500 verOfAcFullName = v;
2501 if (st.contains(rxA))
2502 verOfAcAbbrevName = v;
2503 if (domainName.size()>0 && st.contains(domainName, Qt::CaseInsensitive))
2504 verOfDomainName = v;
2507 if (verOfAcFullName == -1)
2510 "::need2runAutomaticDataProcessing(): cannot find AC full name (" +
2514 if (verOfAcAbbrevName == -1)
2517 "::need2runAutomaticDataProcessing(): cannot find AC abbreviated name, " + ids->
getAcAbbrevName() +
2518 ", in the history");
2524 if (verOfExactAcFullName == ver)
2527 "::need2runAutomaticDataProcessing(): we know this session, found exact full AC name");
2530 if (domainName.size()>0 && verOfDomainName==ver)
2533 "::need2runAutomaticDataProcessing(): we know this session, found contact info from our domain");
2538 if (verOfAcFullName < ver || verOfAcAbbrevName < ver)
2541 "::need2runAutomaticDataProcessing(): found fingerprints (" +
2542 QString(
"").sprintf(
"%d,%d", verOfAcFullName, verOfAcAbbrevName) +
2543 ") but not for the last version (" + QString(
"").sprintf(
"%d", ver) +
")");
2549 "::need2runAutomaticDataProcessing(): the session looks familiar");
2594 if (!f.open(QIODevice::WriteOnly))
2597 "::writeUserData2File(): error opening output file \"" + f.fileName() +
"\"");
2602 QMap<QString, QString> hasReported;
2607 <<
"#YYY MM DD HH MM SS Station_ _ScanID_ Elevation SlntHDel SlntWDel ___partial___ "
2608 <<
"SlntHRte SlntWRte ___partial___\n"
2620 hasReported.clear();
2623 if (auxObs_1 && auxObs_2)
2625 if (!hasReported.contains(obs->
stn_1()->
getKey()))
2627 str.sprintf(
"%s %8s %10s %9.6f %10.2f %8.2f %15.6e %10.2f %8.2f %15.6e",
2642 if (!hasReported.contains(obs->
stn_2()->
getKey()))
2644 str.sprintf(
"%s %8s %10s %9.6f %10.2f %8.2f %15.6e %10.2f %8.2f %15.6e",
2648 auxObs_2->getElevationAngle()*
RAD2DEG,
2649 1.0e12*auxObs_2->getSlantDelayH(),
2650 1.0e12*auxObs_2->getSlantDelayW(),
2651 auxObs_2->getPartDelayW(),
2652 1.0e15*auxObs_2->getSlantRateH(),
2653 1.0e15*auxObs_2->getSlantRateW(),
2654 auxObs_2->getPartRateW()
2695 double& pCal4GrpDelay,
double& pCalSigma4GrpDelay,
2696 int obsIdx,
const SgMJD& epoch,
2697 const QString& sourceName,
const QString& baselineName)
2699 int numOfActualChannels = rFreqByChan.
n();
2700 while (rFreqByChan.
getElement(numOfActualChannels-1)==0.0)
2701 numOfActualChannels--;
2703 if (numOfChannels != numOfActualChannels)
2705 QString(
"").sprintf(
"evaluatePCal4GrpDelay(): number of actual channels (%d) is not equal"
2706 "to the declared number (%d), for the Obs#%d, %s @%s, on ",
2707 numOfActualChannels, numOfChannels, obsIdx, qPrintable(sourceName), qPrintable(baselineName))
2710 if (!numOfActualChannels)
2713 QString(
"").sprintf(
"evaluatePCal4GrpDelay(): number of actual channels is zero, "
2714 "nothing to do, for the Obs#%d, %s @%s, on ",
2715 obsIdx, qPrintable(sourceName), qPrintable(baselineName)) + epoch.
toString());
2718 if (numOfActualChannels==1)
2721 QString(
"").sprintf(
"evaluatePCal4GrpDelay(): only one actual channel, "
2722 "nothing to do, for the Obs#%d, %s @%s, on ",
2723 obsIdx, qPrintable(sourceName), qPrintable(baselineName)) + epoch.
toString());
2727 for (
int i=0; i<numOfActualChannels; i++)
2730 for (
int i=0; i<numOfActualChannels; i++)
2733 for (
int i=0; i<numOfActualChannels; i++)
2741 for (
int i=0; i<numOfActualChannels; i++)
2744 for (
int j=0; j<2; j++)
2745 for (
int i=0; i<numOfActualChannels-1; i++)
2755 double sum=0.0, sumX=0.0, sumY=0.0;
2756 double sumXY=0.0, sumX2=0.0, sumY2=0.0;
2757 double a=0.0, b=0.0, sigmaB=0.0;
2758 for (
int i=0; i<numOfActualChannels; i++)
2767 double delta = sum*sumX2 - sumX*sumX;
2768 a = (sumX2*sumY - sumX*sumXY)/delta;
2769 b = (sumXY*sum - sumX*sumY )/delta;
2771 if (numOfActualChannels>2)
2773 varnc = (sumY2 + a*a*sum + b*b*sumX2 - 2.0*(a*sumY + b*sumXY - a*b*sumX))/(numOfActualChannels - 2);
2775 sigmaB = sqrt(varnc*sum /delta);
2783 pCal4GrpDelay = b*1.0e6;
2784 pCalSigma4GrpDelay = sigmaB*1.0e6;
2802 const SgVector& numOfAccPeriodsByChan_USB,
const SgVector& numOfAccPeriodsByChan_LSB,
2804 const SgVector& numOfSamplesByChan_USB,
const SgVector& numOfSamplesByChan_LSB,
2805 double sampleRate,
double refFreq,
int numOfChannels,
2807 double& effFreq4GR,
double& effFreq4PH,
double& effFreq4RT,
2809 const QString& oId,
bool useEqualWeights)
2812 effFreq4GR = effFreq4PH = effFreq4RT = refFreq;
2815 int numOfActualChannels=refFreqByChan.
n();
2816 while (numOfActualChannels && refFreqByChan.
getElement(numOfActualChannels-1)==0.0)
2817 numOfActualChannels--;
2819 if (numOfChannels != numOfActualChannels)
2821 QString(
"").sprintf(
"evaluateEffectiveFreqs_old(): number of actual channels (%d) is not equal"
2822 "to the declared number (%d) for obs ", numOfActualChannels, numOfChannels) + oId);
2823 if (numOfActualChannels == 0)
2826 "evaluateEffectiveFreqs_old(): number of actual channels is zero, nothing to do for obs " + oId);
2829 if (numOfActualChannels == 1)
2832 "evaluateEffectiveFreqs_old(): only one actual channel, nothing to do for obs " + oId);
2836 int numOfGoodChannels=0;
2837 int numOfGoodAccPeriods=0;
2838 bool hasBadAmplitude=
false;
2839 bool hasSequenceBug=
true;
2840 bool areSampleNumsUsable=
false;
2841 bool areAllFreqsSame=
false;
2842 double minFrq, maxFrq, d;
2843 minFrq = maxFrq = refFreqByChan.
getElement(0);
2845 for (
int i=0; i<numOfActualChannels; i++)
2849 hasBadAmplitude =
true;
2852 fringeAmplitudeByChan.
getElement(i) > 1.0E-8)
2853 numOfGoodChannels++;
2856 numOfGoodAccPeriods++;
2858 if (i>0 && numOfAccPeriodsByChan_LSB.
getElement(i)-1 != numOfAccPeriodsByChan_LSB.
getElement(i-1))
2859 hasSequenceBug =
false;
2862 areSampleNumsUsable =
true;
2870 if (maxFrq-minFrq < 0.001)
2871 areAllFreqsSame =
true;
2873 if (areAllFreqsSame)
2876 "evaluateEffectiveFreqs_old(): all frequencies are the same, nothing to do for obs " + oId);
2880 if (numOfActualChannels!=numOfGoodChannels || numOfActualChannels!=numOfGoodAccPeriods)
2882 QString(
"").sprintf(
"evaluateEffectiveFreqs_old(): the numbers of actual channels (%d), "
2883 "good channels (%d) and good accumulated periods (%d) are not the same "
2884 "for obs ", numOfActualChannels, numOfGoodChannels, numOfGoodAccPeriods) + oId);
2886 SgVector weightByChan(numOfActualChannels);
2888 SgVector weightByChan_USB(numOfActualChannels);
2889 SgVector weightByChan_LSB(numOfActualChannels);
2891 if (numOfGoodChannels<2 || numOfGoodAccPeriods<2 || hasSequenceBug || hasBadAmplitude)
2892 for (
int i=0; i<numOfActualChannels; i++)
2898 else if (!areSampleNumsUsable)
2899 for (
int i=0; i<numOfActualChannels; i++)
2902 if (!useEqualWeights)
2910 for (
int i=0; i<numOfActualChannels; i++)
2913 if (!useEqualWeights)
2915 *fringeAmplitudeByChan.
getElement(i)/sampleRate;
2929 double halfBw=sampleRate/4.0/1.0e6;
2932 for (
int i=0; i<numOfActualChannels; i++)
2937 frq_i = refFreqByChan.
getElement(i) - halfBw;
2939 frq_i = refFreqByChan.
getElement(i) + halfBw;
2941 df = frq_i - refFreq;
2945 sumFq2 += weightByChan.
getElement(i)*frq_i*frq_i;
2947 sumDfi += weightByChan.
getElement(i)*df/frq_i;
2949 double da=sumWei*sumFr2 - sumFr1*sumFr1;
2950 double db=sumFri*sumFr1 - sumDfi*sumWei;
2951 double dc=sumFri*sumFr2 - sumDfi*sumFr1;
2953 effFreq4GR = (fabs(db)>1.0E-10)?sqrt(da/db):refFreq;
2954 effFreq4PH = (fabs(dc)>1.0E-10)?sqrt(refFreq*da/dc):refFreq;
2955 effFreq4RT = sqrt(sumFq2/sumWei);
2971 const SgVector& numOfAccPeriodsByChan_USB,
const SgVector& numOfAccPeriodsByChan_LSB,
2973 const SgVector& numOfSamplesByChan_USB,
const SgVector& numOfSamplesByChan_LSB,
2974 double sampleRate,
double refFreq,
int numOfChannels,
2976 double& effFreq4GR,
double& effFreq4PH,
double& effFreq4RT,
2978 const QString& correlatorType,
2980 const QString& oId,
bool useEqualWeights)
2990 effFreq4GR = effFreq4PH = effFreq4RT = refFreq;
2993 int numOfActualChannels=refFreqByChan.
n();
2994 while (numOfActualChannels && fabs(refFreqByChan.
getElement(numOfActualChannels-1))<1.0e-6)
2995 numOfActualChannels--;
2998 if (numOfActualChannels == 0)
3001 "evaluateEffectiveFreqs(): number of actual channels is zero, nothing to do for the obs " + oId);
3004 if (numOfActualChannels == 1)
3007 "evaluateEffectiveFreqs(): only one actual channel, nothing to do for the obs " + oId);
3011 if (!(correlatorType.contains(
"GSI", Qt::CaseInsensitive) ||
3012 correlatorType.contains(
"K5", Qt::CaseInsensitive)) &&
3013 numOfChannels != numOfActualChannels)
3015 QString(
"").sprintf(
"evaluateEffectiveFreqs(): number of actual channels (%d) is not equal"
3016 "to the declared number (%d) for the obs ", numOfActualChannels, numOfChannels) + oId);
3019 int numOfGoodChannels=0;
3020 int numOfGoodAccPeriods=0;
3021 bool hasBadAmplitude=
false;
3022 bool hasSequenceBug=
true;
3023 bool areSampleNumsUsable=
false;
3024 bool areAllFreqsSame=
false;
3025 double minFrq, maxFrq;
3026 minFrq = maxFrq = refFreqByChan.
getElement(0);
3028 for (
int i=0; i<numOfActualChannels; i++)
3032 hasBadAmplitude =
true;
3035 fringeAmplitudeByChan.
getElement(i) > 1.0E-8)
3036 numOfGoodChannels++;
3039 numOfGoodAccPeriods++;
3041 if (i>0 && numOfAccPeriodsByChan_LSB.
getElement(i)-1 != numOfAccPeriodsByChan_LSB.
getElement(i-1))
3042 hasSequenceBug =
false;
3045 areSampleNumsUsable =
true;
3055 if (maxFrq-minFrq < 0.001)
3056 areAllFreqsSame =
true;
3058 if (areAllFreqsSame)
3061 "evaluateEffectiveFreqs(): all frequencies are the same, nothing to do for obs " + oId);
3065 if (!(correlatorType.contains(
"GSI", Qt::CaseInsensitive) ||
3066 correlatorType.contains(
"K5", Qt::CaseInsensitive)) &&
3067 (numOfActualChannels!=numOfGoodChannels || numOfActualChannels!=numOfGoodAccPeriods))
3069 QString(
"").sprintf(
"evaluateEffectiveFreqs(): the numbers of actual channels (%d), "
3070 "good channels (%d) and good accumulated periods (%d) are not the same "
3071 "for obs ", numOfActualChannels, numOfGoodChannels, numOfGoodAccPeriods) + oId);
3072 if (hasBadAmplitude)
3074 "evaluateEffectiveFreqs(): bad amplitudes are detected for the obs " + oId);
3077 "evaluateEffectiveFreqs(): the sequence bug is detected for the obs " + oId);
3080 SgVector noAP_USB(numOfActualChannels);
3081 SgVector noAP_LSB(numOfActualChannels);
3082 for (
int i=0; i<numOfActualChannels; i++)
3084 if (useEqualWeights)
3086 if (numOfSamplesByChan_USB.
getElement(i) > 0.0)
3090 if (numOfSamplesByChan_LSB.
getElement(i) > 0.0)
3095 else if (areSampleNumsUsable)
3115 double halfBw=sampleRate/4.0/1.0e6;
3116 double df, frq_i, wei2, weiUSB, weiLSB;
3121 for (
int i=0; i<numOfActualChannels; i++)
3124 df = frq_i - refFreq;
3125 if (!useEqualWeights)
3127 if (!areSampleNumsUsable)
3138 sumFr2 += wei2*df*df;
3139 sumFq2 += wei2*frq_i*frq_i;
3140 sumFri += wei2/frq_i;
3141 sumDfi += wei2*df/frq_i;
3147 for (
int i=0; i<numOfActualChannels; i++)
3151 if (!useEqualWeights)
3153 if (!areSampleNumsUsable)
3160 weiUSB = numOfSamplesByChan_USB.
getElement(i);
3161 weiLSB = numOfSamplesByChan_LSB.
getElement(i);
3163 wei2 = (weiUSB + weiLSB)*fringeAmplitudeByChan.
getElement(i);
3164 if (weiUSB>0.0 && weiLSB>0.0)
3167 else if (weiUSB > 0.0)
3170 else if (weiLSB > 0.0)
3177 df = frq_i - refFreq;
3181 sumFr2 += wei2*df*df;
3182 sumFq2 += wei2*frq_i*frq_i;
3183 sumFri += wei2/frq_i;
3184 sumDfi += wei2*df/frq_i;
3188 double da=sumWei*sumFr2 - sumFr1*sumFr1;
3189 double db=sumFri*sumFr1 - sumWei*sumDfi;
3190 double dc=sumFri*sumFr2 - sumFr1*sumDfi;
3192 effFreq4GR = (fabs(db)<1.0E-12)?refFreq:sqrt(da/db);
3193 effFreq4PH = (fabs(dc)<1.0E-12)?refFreq:sqrt(refFreq*da/dc);
3194 effFreq4RT = (sumWei<1.0E-16)?refFreq:sqrt(sumFq2/sumWei);
3197 if (fabs(db)<1.0E-12)
3199 "evaluateEffectiveFreqs(): suspicious channel setup (fabs(db)<1.0E-12) for the obs " + oId);
3200 if (fabs(dc)<1.0E-12)
3202 "evaluateEffectiveFreqs(): suspicious channel setup (fabs(dc)<1.0E-12) for the obs " + oId);
3205 "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)
short int getStation1Idx() const
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
short int getStation2Idx() 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 checkBandForClockBreaks(int, bool)
int numberOfBands() const
StationsByName stationsByName_
bool writeUserData2File(const QString &fileName)
SgVlbiStationInfo * lookupStationByIdx(int)
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()
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)