27 #include <QtCore/QRegExp>
64 std::cout <<
"\nRunning in a DRY RUN mode, no files will be created:\n\n";
71 if (str.contains(
"MK3", Qt::CaseInsensitive))
73 else if (str.contains(
"MK4", Qt::CaseInsensitive))
75 else if (str.contains(
"VLBA", Qt::CaseInsensitive))
77 else if (str.contains(
"CRL", Qt::CaseInsensitive))
79 else if (str.contains(
"GSI", Qt::CaseInsensitive))
81 else if (str.contains(
"S2", Qt::CaseInsensitive))
83 else if (str.contains(
"difx", Qt::CaseInsensitive))
89 "::putDataIntoVgosDb(): canot guess correlator type: \"" + str +
"\"");
102 QMap<QString, SgMJD> epochByScanId;
107 QMap<QString, SgMatrix*> sbDelaysByBand, grDelaysByBand, phRatesByBand, phasesByBand;
108 QMap<QString, SgMatrix*> grDelaysAltByBand, phRatesAltByBand;
109 QMap<QString, SgMatrix*> phaseCal_1ByBand, phaseCal_2ByBand;
110 QMap<QString, SgVector*> ambigsByBand, refFreqsByBand, correlationByBand, snrByBand;
111 QMap<QString, QVector<char> >
114 QMap<QString, int> maxNumOfChanByBand;
115 QMap<QString, QVector<int> >
116 numOfChannelsByBand, dataFlagsByBand;
117 QMap<QString, QVector<QString> >
118 fourfitOutputFNameByBand;
119 QMap<QString, SgVector*> sampleRateByBand;
120 QMap<QString, SgMatrix*> numOfAccPeriodsByChan_USBByBand, numOfAccPeriodsByChan_LSBByBand,
122 phCalAmps_1ByChanByBand, phCalAmps_2ByChanByBand,
123 phCalPhss_1ByChanByBand, phCalPhss_2ByChanByBand,
124 phCalFrqs_1ByChanByBand, phCalFrqs_2ByChanByBand,
125 phCalOffs_1ByChanByBand, phCalOffs_2ByChanByBand,
126 numOfSamplesByChan_USBByBand,
127 numOfSamplesByChan_LSBByBand,
128 residualFringeAmplByChanByBand,
129 residualFringePhseByChanByBand;
135 QMap<QString, QList<int> > station2Scan, scan2Station;
137 QMap<QString, int> stnIdxByName;
138 QMap<QString, int> srcIdxByName;
142 QMap<QString, QVector<QString> >
143 fourfitErrorCodesByBand, frqGrpCodesByBand,
144 fourfitControlFileByBand, fourfitCommandByBand;
145 QMap<QString, QVector<int> >corelVersionsByBand, startOffsetsByBand, bitsPerSamplesByBand,
147 QMap<QString, QVector<double> >
149 QMap<QString, QVector< QVector<int> > >
150 fourfitVersionsByBand, dbeditVersionByBand;
152 QMap<QString, SgVector*> deltaEpochsByBand;
153 QMap<QString, SgMatrix*> urvrsByBand, instrDelaysByBand, starElevByBand, zenithDelaysByBand,
155 QMap<QString, SgMatrix*> mDlysByBand, mAuxByBand;
156 QMap<QString, QVector<QString> >
157 baselineCodesByBand, tapeQualityCodesByBand;
158 QMap<QString, QVector<int> >stopOffsetsByBand, hopsRevisionNumbersByBand;
159 QMap<QString, SgVector*> sbdResidsByBand, rateResidsByBand, effDurationsByBand,
160 startSecondsByBand, stopSecondsByBand, percentOfDiscardsByBand,
161 uniformityFactorsByBand, geocenterPhaseResidsByBand,
162 geocenterPhaseTotalsByBand, geocenterSbDelaysByBand,
163 geocenterGrDelaysByBand, geocenterDelayRatesByBand,
164 probOfFalsesByBand, corrAprioriDelaysByBand, corrAprioriRatesByBand,
165 corrAprioriAccsByBand, incohAmpsByBand, incohAmps2ByBand,
166 delayResidsByBand, phaseCalRates_1ByBand, phaseCalRates_2ByBand;
168 QMap<QString, QVector<QString> >
169 corrRootFileNamesByBand, tapeIds_1ByBand, tapeIds_2ByBand,
170 channelIdsByBand, polarizationsByBand;
171 QMap<QString, QVector< QVector<int> > >
172 epochsOfCorrelationsByBand, epochsOfCentralsByBand,
173 epochsOfFourfitingsByBand, epochsOfNominalScanTimeByBand,
174 bbcIdxs_1ByBand, bbcIdxs_2ByBand, corelIdxNumbersUsbByBand,
175 corelIdxNumbersLsbByBand, errorRates_1ByBand, errorRates_2ByBand;
176 QMap<QString, SgMatrix*> corrClocksByBand, loFreqs_1ByBand, loFreqs_2ByBand;
181 for (
int iB=0; iB<
bands_.size(); iB++)
184 const QString& bandKey=
bands_.at(iB)->getKey();
185 numOfChans =
bands_.at(iB)->getMaxNumOfChannels();
186 sbDelaysByBand[bandKey] =
new SgMatrix(numOfObs, 2);
187 grDelaysByBand[bandKey] =
new SgMatrix(numOfObs, 2);
188 phRatesByBand [bandKey] =
new SgMatrix(numOfObs, 2);
189 grDelaysAltByBand[bandKey] =
new SgMatrix(numOfObs, 2);
190 phRatesAltByBand [bandKey] =
new SgMatrix(numOfObs, 2);
192 phasesByBand [bandKey] =
new SgMatrix(numOfObs, 2);
193 phaseCalRates_1ByBand[bandKey]
195 phaseCalRates_2ByBand[bandKey]
198 refFreqsByBand[bandKey] =
new SgVector(numOfObs);
199 phaseCal_1ByBand[bandKey]
201 phaseCal_2ByBand[bandKey]
203 ambigsByBand [bandKey] =
new SgVector(numOfObs);
204 correlationByBand[bandKey] =
new SgVector(numOfObs);
205 snrByBand [bandKey] =
new SgVector(numOfObs);
207 qualityCodesByBand [bandKey].resize(numOfObs);
208 numOfChannelsByBand [bandKey].resize(numOfObs);
209 dataFlagsByBand [bandKey].resize(numOfObs);
210 dataFlagsByBand [bandKey].fill(-1);
211 fourfitOutputFNameByBand[bandKey].resize(numOfObs);
212 sampleRateByBand [bandKey] =
new SgVector(numOfObs);
213 numOfAccPeriodsByChan_USBByBand [bandKey] =
new SgMatrix(numOfObs, numOfChans);
214 numOfAccPeriodsByChan_LSBByBand [bandKey] =
new SgMatrix(numOfObs, numOfChans);
216 phCalAmps_1ByChanByBand[bandKey] =
new SgMatrix(numOfObs, numOfChans);
217 phCalAmps_2ByChanByBand[bandKey] =
new SgMatrix(numOfObs, numOfChans);
218 phCalPhss_1ByChanByBand[bandKey] =
new SgMatrix(numOfObs, numOfChans);
219 phCalPhss_2ByChanByBand[bandKey] =
new SgMatrix(numOfObs, numOfChans);
220 phCalFrqs_1ByChanByBand[bandKey] =
new SgMatrix(numOfObs, numOfChans);
221 phCalFrqs_2ByChanByBand[bandKey] =
new SgMatrix(numOfObs, numOfChans);
222 phCalOffs_1ByChanByBand[bandKey] =
new SgMatrix(numOfObs, numOfChans);
223 phCalOffs_2ByChanByBand[bandKey] =
new SgMatrix(numOfObs, numOfChans);
225 refFreqByChanByBand [bandKey] =
new SgMatrix(numOfObs, numOfChans);
226 numOfSamplesByChan_USBByBand [bandKey] =
new SgMatrix(numOfObs, numOfChans);
227 numOfSamplesByChan_LSBByBand [bandKey] =
new SgMatrix(numOfObs, numOfChans);
228 residualFringeAmplByChanByBand [bandKey] =
new SgMatrix(numOfObs, numOfChans);
229 residualFringePhseByChanByBand [bandKey] =
new SgMatrix(numOfObs, numOfChans);
231 maxNumOfChanByBand[bandKey] = numOfChans;
233 fourfitErrorCodesByBand [bandKey].resize(numOfObs);
234 frqGrpCodesByBand [bandKey].resize(numOfObs);
235 fourfitControlFileByBand [bandKey].resize(numOfObs);
236 fourfitCommandByBand [bandKey].resize(numOfObs);
237 corelVersionsByBand [bandKey].resize(numOfObs);
238 startOffsetsByBand [bandKey].resize(numOfObs);
239 bitsPerSamplesByBand [bandKey].resize(numOfObs);
240 numLagsByBand [bandKey].resize(numOfObs);
241 apLengthByBand [bandKey].resize(numOfObs);
242 fourfitVersionsByBand [bandKey].resize(numOfObs);
243 dbeditVersionByBand [bandKey].resize(numOfObs);
244 baselineCodesByBand [bandKey].resize(numOfObs);
245 tapeQualityCodesByBand [bandKey].resize(numOfObs);
246 stopOffsetsByBand [bandKey].resize(numOfObs);
247 hopsRevisionNumbersByBand [bandKey].resize(numOfObs);
249 deltaEpochsByBand [bandKey] =
new SgVector(numOfObs);
250 urvrsByBand [bandKey] =
new SgMatrix(numOfObs, 2);
251 instrDelaysByBand [bandKey] =
new SgMatrix(numOfObs, 2);
252 starElevByBand [bandKey] =
new SgMatrix(numOfObs, 2);
253 zenithDelaysByBand [bandKey] =
new SgMatrix(numOfObs, 2);
254 searchParamsByBand [bandKey] =
new SgMatrix(numOfObs, 6);
255 mDlysByBand [bandKey] =
new SgMatrix(numOfObs, 3);
256 mAuxByBand [bandKey] =
new SgMatrix(numOfObs, 4);
257 sbdResidsByBand [bandKey] =
new SgVector(numOfObs);
258 rateResidsByBand [bandKey] =
new SgVector(numOfObs);
259 effDurationsByBand [bandKey] =
new SgVector(numOfObs);
260 startSecondsByBand [bandKey] =
new SgVector(numOfObs);
261 stopSecondsByBand [bandKey] =
new SgVector(numOfObs);
262 percentOfDiscardsByBand [bandKey] =
new SgVector(numOfObs);
263 uniformityFactorsByBand [bandKey] =
new SgVector(numOfObs);
264 geocenterPhaseResidsByBand[bandKey] =
new SgVector(numOfObs);
265 geocenterPhaseTotalsByBand[bandKey] =
new SgVector(numOfObs);
266 geocenterSbDelaysByBand [bandKey] =
new SgVector(numOfObs);
267 geocenterGrDelaysByBand [bandKey] =
new SgVector(numOfObs);
268 geocenterDelayRatesByBand [bandKey] =
new SgVector(numOfObs);
269 probOfFalsesByBand [bandKey] =
new SgVector(numOfObs);
270 corrAprioriDelaysByBand [bandKey] =
new SgVector(numOfObs);
271 corrAprioriRatesByBand [bandKey] =
new SgVector(numOfObs);
272 corrAprioriAccsByBand [bandKey] =
new SgVector(numOfObs);
273 incohAmpsByBand [bandKey] =
new SgVector(numOfObs);
274 incohAmps2ByBand [bandKey] =
new SgVector(numOfObs);
275 delayResidsByBand [bandKey] =
new SgVector(numOfObs);
278 corrRootFileNamesByBand[bandKey].resize(numOfObs);
280 tapeIds_1ByBand [bandKey].resize(numOfObs);
281 tapeIds_2ByBand [bandKey].resize(numOfObs);
282 channelIdsByBand [bandKey].resize(numOfObs);
283 polarizationsByBand [bandKey].resize(numOfObs);
284 epochsOfCorrelationsByBand[bandKey].resize(numOfObs);
285 epochsOfCentralsByBand [bandKey].resize(numOfObs);
286 epochsOfFourfitingsByBand [bandKey].resize(numOfObs);
287 epochsOfNominalScanTimeByBand[bandKey].resize(numOfObs);
288 bbcIdxs_1ByBand [bandKey].resize(numOfObs);
289 bbcIdxs_2ByBand [bandKey].resize(numOfObs);
290 corelIdxNumbersUsbByBand [bandKey].resize(numOfObs);
291 corelIdxNumbersLsbByBand [bandKey].resize(numOfObs);
292 errorRates_1ByBand [bandKey].resize(numOfObs);
293 errorRates_2ByBand [bandKey].resize(numOfObs);
295 corrClocksByBand [bandKey] =
new SgMatrix(numOfObs, 4);
296 loFreqs_1ByBand [bandKey] =
new SgMatrix(numOfObs, numOfChans);
297 loFreqs_2ByBand [bandKey] =
new SgMatrix(numOfObs, numOfChans);
300 << sbDelaysByBand[bandKey] << grDelaysByBand[bandKey] << phRatesByBand [bandKey]
301 << grDelaysAltByBand[bandKey] << phRatesAltByBand [bandKey]
302 << phasesByBand[bandKey]
303 << phaseCal_1ByBand[bandKey] << phaseCal_2ByBand[bandKey]
304 << numOfAccPeriodsByChan_USBByBand[bandKey]
305 << numOfAccPeriodsByChan_LSBByBand[bandKey]
306 << refFreqByChanByBand[bandKey]
307 << phCalAmps_1ByChanByBand[bandKey]
308 << phCalAmps_2ByChanByBand[bandKey]
309 << phCalPhss_1ByChanByBand[bandKey]
310 << phCalPhss_2ByChanByBand[bandKey]
311 << phCalFrqs_1ByChanByBand[bandKey]
312 << phCalFrqs_2ByChanByBand[bandKey]
313 << phCalOffs_1ByChanByBand[bandKey]
314 << phCalOffs_2ByChanByBand[bandKey]
315 << numOfSamplesByChan_USBByBand[bandKey] << numOfSamplesByChan_LSBByBand[bandKey]
316 << residualFringeAmplByChanByBand[bandKey] << residualFringePhseByChanByBand[bandKey]
317 << urvrsByBand[bandKey] << instrDelaysByBand[bandKey]
318 << starElevByBand[bandKey] << zenithDelaysByBand[bandKey] << searchParamsByBand[bandKey]
319 << mDlysByBand[bandKey] << mAuxByBand[bandKey]
320 << corrClocksByBand[bandKey] << loFreqs_1ByBand[bandKey]
321 << loFreqs_2ByBand[bandKey]
325 << refFreqsByBand[bandKey] << ambigsByBand[bandKey] << correlationByBand[bandKey]
326 << snrByBand[bandKey] << sampleRateByBand[bandKey]
327 << deltaEpochsByBand[bandKey] << sbdResidsByBand[bandKey] << rateResidsByBand[bandKey]
328 << effDurationsByBand[bandKey] << startSecondsByBand[bandKey] << stopSecondsByBand[bandKey]
329 << percentOfDiscardsByBand[bandKey] << uniformityFactorsByBand[bandKey]
330 << geocenterPhaseResidsByBand[bandKey] << geocenterPhaseTotalsByBand[bandKey]
331 << geocenterSbDelaysByBand[bandKey] << geocenterGrDelaysByBand[bandKey]
332 << geocenterDelayRatesByBand[bandKey] << probOfFalsesByBand[bandKey]
333 << corrAprioriDelaysByBand[bandKey] << corrAprioriRatesByBand[bandKey]
334 << corrAprioriAccsByBand[bandKey] << incohAmpsByBand[bandKey] << incohAmps2ByBand[bandKey]
335 << delayResidsByBand[bandKey] << phaseCalRates_1ByBand[bandKey] << phaseCalRates_2ByBand[bandKey]
340 dTecStdDev =
new SgVector(numOfObs);
341 vectors2del << dTec << dTecStdDev;
346 QMap<QString, bool> stnsPresent;
347 QMap<QString, int> stnsIdxs4scns;
348 QMap<QString, int> idxByScan;
352 stnIdxByName[it.value()->getKey()] = n++;
353 stnsIdxs4scns[it.value()->getKey()] = 0;
357 srcIdxByName[it.value()->getKey()] = n++;
360 for (
int obsIdx=0; obsIdx<numOfObs; obsIdx++)
362 int nYear, nMonth, nDay, nHour, nMin;
376 if (!epochByScanId.contains(obs->
getScanId()))
378 epochByScanId.insert(obs->
getScanId(), *obs);
381 idxByScan[obs->
getScanId()] = idxByScan.size();
384 if (str.at(10) ==
' ')
386 scanFullNames << str;
387 scan2src << srcIdxByName[obs->
src()->
getKey()];
389 if (stnsPresent.size())
392 if (stnsPresent.contains(it.key()))
393 scan2Station[it.key()] << ++stnsIdxs4scns[it.key()];
395 scan2Station[it.key()] << 0;
400 obs2scan << epochByScanId.size();
407 for (
int bandIdx=0; bandIdx<
bands.size(); bandIdx++)
409 const QString& bandKey=
bands.at(bandIdx);
411 numOfChans = maxNumOfChanByBand[bandKey];
412 epochsOfCorrelationsByBand[bandKey][obsIdx].resize(6);
413 epochsOfCentralsByBand[bandKey][obsIdx].resize(6);
414 epochsOfFourfitingsByBand[bandKey][obsIdx].resize(6);
415 epochsOfNominalScanTimeByBand[bandKey][obsIdx].resize(6);
416 bbcIdxs_1ByBand[bandKey][obsIdx].resize(numOfChans);
417 bbcIdxs_2ByBand[bandKey][obsIdx].resize(numOfChans);
418 corelIdxNumbersUsbByBand[bandKey][obsIdx].resize(numOfChans);
419 corelIdxNumbersLsbByBand[bandKey][obsIdx].resize(numOfChans);
420 errorRates_1ByBand[bandKey][obsIdx].resize(numOfChans);
421 errorRates_2ByBand[bandKey][obsIdx].resize(numOfChans);
422 fourfitVersionsByBand [bandKey][obsIdx].resize(2);
423 dbeditVersionByBand [bandKey][obsIdx].resize(3);
428 sbDelaysByBand[bandKey] ->setElement(obsIdx,0, o->
sbDelay().
getValue());
429 sbDelaysByBand[bandKey] ->setElement(obsIdx,1, o->
sbDelay().
getSigma());
431 grDelaysByBand[bandKey] ->setElement(obsIdx,0, o->
grDelay().
getValue());
432 grDelaysByBand[bandKey] ->setElement(obsIdx,1, o->
grDelay().
getSigma());
433 phRatesByBand [bandKey] ->setElement(obsIdx,0, o->
phDRate().
getValue());
434 phRatesByBand [bandKey] ->setElement(obsIdx,1, o->
phDRate().
getSigma());
439 grDelaysAltByBand[bandKey] ->setElement(obsIdx,1, o->
grDelay().
getSigma());
441 phRatesAltByBand [bandKey] ->setElement(obsIdx,1, o->
phDRate().
getSigma());
444 phasesByBand [bandKey] ->setElement(obsIdx,0, o->
getTotalPhase());
445 phasesByBand [bandKey] ->setElement(obsIdx,1, o->
getSnr()==0.0?1.0:1.0/o->
getSnr());
468 qualityCodesByBand [bandKey][obsIdx] = buff[0];
469 dataFlagsByBand [bandKey][obsIdx] = 0;
470 correlationByBand [bandKey]->setElement(obsIdx, o->
getCorrCoeff());
471 snrByBand [bandKey]->setElement(obsIdx, o->
getSnr());
473 sampleRateByBand [bandKey]->setElement(obsIdx, o->
getSampleRate());
480 epochsOfCorrelationsByBand[bandKey][obsIdx][0] = nYear;
481 epochsOfCorrelationsByBand[bandKey][obsIdx][1] = nMonth;
482 epochsOfCorrelationsByBand[bandKey][obsIdx][2] = nDay;
483 epochsOfCorrelationsByBand[bandKey][obsIdx][3] = nHour;
484 epochsOfCorrelationsByBand[bandKey][obsIdx][4] = nMin;
485 epochsOfCorrelationsByBand[bandKey][obsIdx][5] = (int)round(dSec);
488 epochsOfCentralsByBand[bandKey][obsIdx][0] = nYear;
489 epochsOfCentralsByBand[bandKey][obsIdx][1] = nMonth;
490 epochsOfCentralsByBand[bandKey][obsIdx][2] = nDay;
491 epochsOfCentralsByBand[bandKey][obsIdx][3] = nHour;
492 epochsOfCentralsByBand[bandKey][obsIdx][4] = nMin;
493 epochsOfCentralsByBand[bandKey][obsIdx][5] = (int)round(dSec);
496 epochsOfFourfitingsByBand[bandKey][obsIdx][0] = nYear;
497 epochsOfFourfitingsByBand[bandKey][obsIdx][1] = nMonth;
498 epochsOfFourfitingsByBand[bandKey][obsIdx][2] = nDay;
499 epochsOfFourfitingsByBand[bandKey][obsIdx][3] = nHour;
500 epochsOfFourfitingsByBand[bandKey][obsIdx][4] = nMin;
501 epochsOfFourfitingsByBand[bandKey][obsIdx][5] = (int)round(dSec);
504 epochsOfNominalScanTimeByBand[bandKey][obsIdx][0] = nYear;
505 epochsOfNominalScanTimeByBand[bandKey][obsIdx][1] = nMonth;
506 epochsOfNominalScanTimeByBand[bandKey][obsIdx][2] = nDay;
507 epochsOfNominalScanTimeByBand[bandKey][obsIdx][3] = nHour;
508 epochsOfNominalScanTimeByBand[bandKey][obsIdx][4] = nMin;
509 epochsOfNominalScanTimeByBand[bandKey][obsIdx][5] = (int)round(dSec);
517 channelIdsByBand[bandKey][obsIdx] =
"";
518 polarizationsByBand[bandKey][obsIdx] =
"";
521 refFreqByChanByBand[bandKey]->setElement(obsIdx,k,
523 numOfAccPeriodsByChan_USBByBand[bandKey]->setElement(obsIdx,k,
525 numOfAccPeriodsByChan_LSBByBand[bandKey]->setElement(obsIdx,k,
528 phCalAmps_1ByChanByBand[bandKey]->setElement(obsIdx,k,
530 phCalAmps_2ByChanByBand[bandKey]->setElement(obsIdx,k,
532 phCalPhss_1ByChanByBand[bandKey]->setElement(obsIdx,k,
534 phCalPhss_2ByChanByBand[bandKey]->setElement(obsIdx,k,
536 phCalFrqs_1ByChanByBand[bandKey]->setElement(obsIdx,k,
538 phCalFrqs_2ByChanByBand[bandKey]->setElement(obsIdx,k,
540 phCalOffs_1ByChanByBand[bandKey]->setElement(obsIdx,k,
542 phCalOffs_2ByChanByBand[bandKey]->setElement(obsIdx,k,
544 errorRates_1ByBand[bandKey][obsIdx][k] =
546 errorRates_2ByBand[bandKey][obsIdx][k] =
549 numOfSamplesByChan_USBByBand[bandKey]->setElement(obsIdx,k,
551 numOfSamplesByChan_LSBByBand[bandKey]->setElement(obsIdx,k,
553 residualFringeAmplByChanByBand[bandKey]->setElement(obsIdx,k,
555 residualFringePhseByChanByBand[bandKey]->setElement(obsIdx,k,
560 corelIdxNumbersUsbByBand[bandKey][obsIdx][k] = o->
corelIndexNumUSB()->at(k);
561 corelIdxNumbersLsbByBand[bandKey][obsIdx][k] = o->
corelIndexNumLSB()->at(k);
564 channelIdsByBand [bandKey][obsIdx] += str.sprintf(
"%-2c", o->
chanIdByChan()->at(k));
565 polarizationsByBand [bandKey][obsIdx] += str.sprintf(
"%-2c%-2c",
569 fourfitErrorCodesByBand [bandKey][obsIdx].sprintf(
"%-2s", qPrintable(o->
getErrorCode()));
570 frqGrpCodesByBand [bandKey][obsIdx].sprintf(
"%-2s", qPrintable(bandKey));
571 fourfitControlFileByBand [bandKey][obsIdx].sprintf(
"%s",
573 fourfitCommandByBand [bandKey][obsIdx].sprintf(
"%s",
575 baselineCodesByBand [bandKey][obsIdx].sprintf(
"%c%c",
577 tapeQualityCodesByBand [bandKey][obsIdx].sprintf(
"%-6s", qPrintable(o->
getTapeQualityCode()));
578 corelVersionsByBand [bandKey][obsIdx] = -1;
581 numLagsByBand [bandKey][obsIdx] = o->
getNlags();
582 apLengthByBand [bandKey][obsIdx] = obs->
getApLength();
587 dbeditVersionByBand [bandKey][obsIdx][0] = 2007;
588 dbeditVersionByBand [bandKey][obsIdx][1] = 10;
589 dbeditVersionByBand [bandKey][obsIdx][2] = 27;
591 deltaEpochsByBand [bandKey]->setElement(obsIdx, o->
getCentrOffset());
593 urvrsByBand [bandKey]->setElement(obsIdx,0, o->
getUrVr(0));
594 urvrsByBand [bandKey]->setElement(obsIdx,1, o->
getUrVr(1));
595 instrDelaysByBand [bandKey]->setElement(obsIdx,0, o->
getInstrDelay(0));
596 instrDelaysByBand [bandKey]->setElement(obsIdx,1, o->
getInstrDelay(1));
602 for (
int j=0; j<6; j++)
610 startSecondsByBand [bandKey]->setElement(obsIdx, 60.0*nMin + dSec);
612 stopSecondsByBand [bandKey]->setElement(obsIdx, 60.0*nMin + dSec);
613 percentOfDiscardsByBand [bandKey]->setElement(obsIdx, o->
getDiscardRatio());
614 uniformityFactorsByBand [bandKey]->setElement(obsIdx, o->
getAcceptedRatio());
621 corrAprioriDelaysByBand [bandKey]->setElement(obsIdx, o->
getAprioriDra(0));
622 corrAprioriRatesByBand [bandKey]->setElement(obsIdx, o->
getAprioriDra(1));
623 corrAprioriAccsByBand [bandKey]->setElement(obsIdx, o->
getAprioriDra(2));
627 phaseCalRates_1ByBand [bandKey]->setElement(obsIdx, o->
getPhaseCalRates(0));
628 phaseCalRates_2ByBand [bandKey]->setElement(obsIdx, o->
getPhaseCalRates(1));
629 corrClocksByBand [bandKey]->setElement(obsIdx,0, o->
getCorrClocks(0, 0));
630 corrClocksByBand [bandKey]->setElement(obsIdx,1, o->
getCorrClocks(0, 1));
631 corrClocksByBand [bandKey]->setElement(obsIdx,2, o->
getCorrClocks(1, 0));
632 corrClocksByBand [bandKey]->setElement(obsIdx,3, o->
getCorrClocks(1, 1));
653 if (stnsPresent.size())
656 if (stnsPresent.contains(it.key()))
657 scan2Station[it.key()] << ++stnsIdxs4scns[it.key()];
659 scan2Station[it.key()] << 0;
662 stnsIdxs4scns.clear();
664 epochs4Scans = epochByScanId.values();
679 stations_1 << stn->
getKey();
683 station2Scan[stn->
getKey()] << idxByScan[jt.key()];
687 for (QMap<QString,
QList<int> >::iterator it=station2Scan.begin(); it!=station2Scan.end(); ++it)
688 if (maxSize<it.value().size())
689 maxSize=it.value().size();
690 for (QMap<QString,
QList<int> >::iterator it=station2Scan.begin(); it!=station2Scan.end(); ++it)
691 if (it.value().size()<maxSize)
692 for (
int i=it.value().size(); i<maxSize; i++)
696 sources << it.value()->getKey();
704 isOk = isOk && vgosDb->
storeScanName(scanNames, scanFullNames);
711 isOk = isOk && vgosDb->
storeStationCrossRefs(numScansPerStation, stations_1, station2Scan, scan2Station);
714 for (
int iB=0; iB<
bands_.size(); iB++)
717 const QString& bandKey=
bands_.at(iB)->getKey();
727 isOk = isOk && vgosDb->
storeObsGroupDelays(bandKey, grDelaysAltByBand[bandKey],
"Original");
728 isOk = isOk && vgosDb->
storeObsRates(bandKey, phRatesAltByBand[bandKey],
"Original");
732 isOk = isOk && vgosDb->
storeObsRates(bandKey, phRatesByBand[bandKey],
"");
734 isOk = isOk && vgosDb->
storeObsPhase(bandKey, phasesByBand[bandKey]);
738 isOk = isOk && vgosDb->
storeObsCalUnphase(bandKey, phaseCal_1ByBand[bandKey], phaseCal_2ByBand[bandKey]);
743 isOk = isOk && vgosDb->
storeObsSNR(bandKey, snrByBand[bandKey]);
747 channelIdsByBand[bandKey],
748 polarizationsByBand[bandKey],
749 numOfChannelsByBand[bandKey],
750 bitsPerSamplesByBand[bandKey],
751 errorRates_1ByBand[bandKey],
752 errorRates_2ByBand[bandKey],
753 bbcIdxs_1ByBand[bandKey],
754 bbcIdxs_2ByBand[bandKey],
755 corelIdxNumbersUsbByBand[bandKey],
756 corelIdxNumbersLsbByBand[bandKey],
757 sampleRateByBand[bandKey],
758 residualFringeAmplByChanByBand[bandKey],
759 residualFringePhseByChanByBand[bandKey],
760 refFreqByChanByBand[bandKey],
761 numOfSamplesByChan_USBByBand[bandKey],
762 numOfSamplesByChan_LSBByBand[bandKey],
763 numOfAccPeriodsByChan_USBByBand[bandKey],
764 numOfAccPeriodsByChan_LSBByBand[bandKey],
765 loFreqs_1ByBand[bandKey],
766 loFreqs_2ByBand[bandKey]);
769 phCalFrqs_1ByChanByBand[bandKey],
770 phCalAmps_1ByChanByBand[bandKey],
771 phCalPhss_1ByChanByBand[bandKey],
772 phCalOffs_1ByChanByBand[bandKey],
773 phaseCalRates_1ByBand[bandKey],
774 phCalFrqs_2ByChanByBand[bandKey],
775 phCalAmps_2ByChanByBand[bandKey],
776 phCalPhss_2ByChanByBand[bandKey],
777 phCalOffs_2ByChanByBand[bandKey],
778 phaseCalRates_2ByBand[bandKey]);
781 fourfitOutputFNameByBand[bandKey],
782 fourfitErrorCodesByBand[bandKey],
783 frqGrpCodesByBand[bandKey],
784 corelVersionsByBand[bandKey],
785 startOffsetsByBand[bandKey],
786 fourfitVersionsByBand[bandKey],
787 dbeditVersionByBand[bandKey],
788 deltaEpochsByBand[bandKey],
789 urvrsByBand[bandKey],
790 instrDelaysByBand[bandKey],
791 starElevByBand[bandKey],
792 zenithDelaysByBand[bandKey],
793 searchParamsByBand[bandKey],
794 baselineCodesByBand[bandKey],
795 tapeQualityCodesByBand[bandKey],
796 stopOffsetsByBand[bandKey],
797 hopsRevisionNumbersByBand[bandKey],
798 sampleRateByBand[bandKey],
799 sbdResidsByBand[bandKey],
800 rateResidsByBand[bandKey],
801 effDurationsByBand[bandKey],
802 startSecondsByBand[bandKey],
803 stopSecondsByBand[bandKey],
804 percentOfDiscardsByBand[bandKey],
805 uniformityFactorsByBand[bandKey],
806 geocenterPhaseResidsByBand[bandKey],
807 geocenterPhaseTotalsByBand[bandKey],
808 geocenterSbDelaysByBand[bandKey],
809 geocenterGrDelaysByBand[bandKey],
810 geocenterDelayRatesByBand[bandKey],
811 probOfFalsesByBand[bandKey],
812 corrAprioriDelaysByBand[bandKey],
813 corrAprioriRatesByBand[bandKey],
814 corrAprioriAccsByBand[bandKey],
815 incohAmpsByBand[bandKey],
816 incohAmps2ByBand[bandKey],
817 delayResidsByBand[bandKey],
818 corrRootFileNamesByBand[bandKey],
819 tapeIds_1ByBand[bandKey],
820 tapeIds_2ByBand[bandKey],
821 epochsOfCorrelationsByBand[bandKey],
822 epochsOfCentralsByBand[bandKey],
823 epochsOfFourfitingsByBand[bandKey],
824 epochsOfNominalScanTimeByBand[bandKey],
825 corrClocksByBand[bandKey],
826 mDlysByBand[bandKey],
827 mAuxByBand[bandKey]);
842 fourfitControlFileByBand[bandKey], fourfitCommandByBand[bandKey],
843 numLagsByBand[bandKey], apLengthByBand[bandKey]);
855 "correlator operator",
"History",
name_,
"1");
869 qualityCodesByBand.clear();
870 dataFlagsByBand.clear();
872 srcIdxByName.clear();
873 stnIdxByName.clear();
881 for (
int i=0; i<vectors2del.size(); i++)
882 if (vectors2del.at(i))
884 delete vectors2del[i];
885 vectors2del[i] = NULL;
887 for (
int i=0; i<matrices2del.size(); i++)
888 if (matrices2del.at(i))
890 delete matrices2del[i];
891 matrices2del[i] = NULL;
894 sbDelaysByBand.clear();
895 grDelaysByBand.clear();
896 phRatesByBand.clear();
897 phasesByBand.clear();
898 ambigsByBand.clear();
899 refFreqsByBand.clear();
902 phaseCal_1ByBand.clear();
903 phaseCal_2ByBand.clear();
904 correlationByBand.clear();
910 scanFullNames.clear();
914 epochs4Scans.clear();
916 epochByScanId.clear();
917 numScansPerStation.clear();
919 for (QMap<QString,
QList<int> >::iterator it=station2Scan.begin(); it!=station2Scan.end(); ++it)
921 for (QMap<QString,
QList<int> >::iterator it=scan2Station.begin(); it!=scan2Station.end(); ++it)
923 station2Scan.clear();
924 scan2Station.clear();
931 const QString stnName(stn->
getKey());
942 stnEpochs << *auxObs;
952 delete refClockOffset;
961 isSpecialCase =
false;
966 QMap<QString, SgMJD> ebsi;
967 QMap<QString, int> srcIdxByName;
972 sources << it.value()->getKey();
973 srcIdxByName[it.value()->getKey()] = n++;
975 for (
int obsIdx=0; obsIdx<numOfObs; obsIdx++)
981 scan2src << srcIdxByName[obs->
src()->
getKey()];
985 srcIdxByName.clear();
1017 QString kind4Ephemeris(
"DE421JPL");
1018 QString kind4Nutation (
"IAU2006");
1019 QString kind4HiFreqLibration(
"IERS2010");
1020 QString kind4HiFreqErp (
"IERS2003");
1021 QString kind4EarthTide (
"IERS2003");
1022 QString kind4PoleTide (
"IERS2003");
1024 QString kind4PoleTidePart(
"IERS2006");
1026 QMap<QString, SgMJD> epochByScanId;
1027 int scanIdx, numOfScans;
1030 for (
int idx=0; idx<numOfObs; idx++)
1033 if (!epochByScanId.contains(obs->
getScanId()))
1034 epochByScanId.insert(obs->
getScanId(), *obs);
1036 numOfScans = epochByScanId.size();
1037 epochByScanId.clear();
1039 "::putDataIntoVgosDb(): counted " + QString(
"").setNum(numOfScans) +
1040 " scans for the session " +
name_);
1045 SgVector *vCalcDelay, *vCalcRate, *vFractC;
1047 SgMatrix *cEarthTide, *cOceanTide, *cOceanTideOld;
1048 SgMatrix *cOceanPoleTide, *cPoleTide, *cPoleTideOld, *cTiltRmvr;
1049 SgMatrix *mHiFyUt1, *mHiFyPxy, *mLibrUt1, *mLibrPxy, *mPx, *mPy;
1050 SgMatrix *cBend, *cBendSun, *cBendSunHigher;
1052 SgMatrix *t2c_val, *t2c_rat, *t2c_acc;
1055 SgMatrix *dV_dPx, *dV_dPy, *dV_dUT1;
1059 SgMatrix *dV_dGamma, *dV_dParallax;
1063 SgMatrix *rSun, *rMoon, *rEarth, *vSun, *vMoon, *vEarth, *aEarth;
1064 SgMatrix *pPsiEpsWahr, *pPsiEpsWahr_rates, *pPsiEps, *pPsiEps_rates;
1065 SgMatrix *pXys, *pXys_rates, *pmXy;
1070 vCalcDelay =
new SgVector(numOfObs);
1071 vCalcRate =
new SgVector(numOfObs);
1074 cEarthTide =
new SgMatrix(numOfObs, 2);
1076 cOceanTide =
new SgMatrix(numOfObs, 2);
1077 cOceanTideOld =
new SgMatrix(numOfObs, 2);
1078 cOceanPoleTide=
new SgMatrix(numOfObs, 2);
1079 cPoleTide =
new SgMatrix(numOfObs, 2);
1080 cPoleTideOld =
new SgMatrix(numOfObs, 2);
1081 cTiltRmvr =
new SgMatrix(numOfObs, 2);
1082 mHiFyUt1 =
new SgMatrix(numOfObs, 2);
1083 mHiFyPxy =
new SgMatrix(numOfObs, 2);
1084 mLibrUt1 =
new SgMatrix(numOfObs, 2);
1085 mLibrPxy =
new SgMatrix(numOfObs, 2);
1089 cBendSun =
new SgMatrix(numOfObs, 2);
1090 cBendSunHigher=
new SgMatrix(numOfObs, 2);
1092 partBend =
new SgMatrix(numOfObs, 2);
1093 dV_dPx =
new SgMatrix(numOfObs, 2);
1094 dV_dPy =
new SgMatrix(numOfObs, 2);
1095 dV_dUT1 =
new SgMatrix(numOfObs, 4);
1096 dV_dCipX =
new SgMatrix(numOfObs, 2);
1097 dV_dCipY =
new SgMatrix(numOfObs, 2);
1098 dV_dRA =
new SgMatrix(numOfObs, 2);
1099 dV_dDN =
new SgMatrix(numOfObs, 2);
1100 dDel_dR_1 =
new SgMatrix(numOfObs, 3);
1101 dRat_dR_1 =
new SgMatrix(numOfObs, 3);
1102 dV_dGamma =
new SgMatrix(numOfObs, 2);
1103 dV_dParallax =
new SgMatrix(numOfObs, 2);
1104 dV_dPtdX =
new SgMatrix(numOfObs, 2);
1105 dV_dPtdY =
new SgMatrix(numOfObs, 2);
1106 mPlxRev =
new SgMatrix(numOfObs, 2);
1107 rSun =
new SgMatrix(numOfScans, 3);
1108 rMoon =
new SgMatrix(numOfScans, 3);
1109 rEarth =
new SgMatrix(numOfScans, 3);
1110 vSun =
new SgMatrix(numOfScans, 3);
1111 vMoon =
new SgMatrix(numOfScans, 3);
1112 vEarth =
new SgMatrix(numOfScans, 3);
1113 aEarth =
new SgMatrix(numOfScans, 3);
1115 pPsiEpsWahr =
new SgMatrix(numOfScans, 2);
1118 pPsiEps =
new SgMatrix(numOfScans, 2);
1119 pPsiEps_rates =
new SgMatrix(numOfScans, 2);
1120 pXys =
new SgMatrix(numOfScans, 3);
1121 pXys_rates =
new SgMatrix(numOfScans, 3);
1123 t2c_val =
new SgMatrix(numOfScans, 9);
1124 t2c_rat =
new SgMatrix(numOfScans, 9);
1125 t2c_acc =
new SgMatrix(numOfScans, 9);
1126 pmXy =
new SgMatrix(numOfScans, 2);
1127 ut1_tai =
new SgVector(numOfScans);
1130 for (
int obsIdx=0; obsIdx<numOfObs; obsIdx++)
1216 if (!epochByScanId.contains(obs->
getScanId()))
1218 epochByScanId.insert(obs->
getScanId(), *obs);
1266 for (
int k=0; k<3; k++)
1267 for (
int l=0; l<3; l++)
1313 isOk = isOk && vgosDb->
storeScanEphemeris(rSun, rMoon, rEarth, vSun, vMoon, vEarth, aEarth, kind4Ephemeris);
1327 delete pPsiEpsWahr_rates;
1329 delete pPsiEps_rates;
1342 delete dV_dParallax;
1363 delete cBendSunHigher;
1367 delete cOceanTideOld;
1368 delete cOceanPoleTide;
1370 delete cPoleTideOld;
1379 QString kind4TroposphereModel(
"NMF");
1383 const QString stnName(stn->
getKey());
1388 SgMatrix *calHorzOLoad, *calVertOLoad;
1391 SgMatrix *partTropZenithDry, *partTropZenithWet, *partTropGrad;
1400 calAxisOffset =
new SgMatrix(num, 2);
1403 calHorzOLoad =
new SgMatrix(num, 2);
1404 calVertOLoad =
new SgMatrix(num, 2);
1405 partAxisOffset =
new SgMatrix(num, 2);
1406 partTropZenithDry =
new SgMatrix(num, 2);
1407 partTropZenithWet =
new SgMatrix(num, 2);
1408 partTropGrad =
new SgMatrix(num, 4);
1462 kind4TroposphereModel);
1464 kind4TroposphereModel);
1469 delete partTropZenithDry;
1470 delete partTropZenithWet;
1471 delete partTropGrad;
1474 delete calHorzOLoad;
1475 delete calVertOLoad;
1479 delete calAxisOffset;
1480 delete partAxisOffset;
1496 SgVector *utArrayInfo, *pmArrayInfo, *utValues;
1505 utArrayInfo->
setElement(0, d>2390000.0?d:d+2400000.5);
1507 pmArrayInfo->
setElement(0, d>2390000.0?d:d+2400000.5);
1542 QList<QString> sourcesNames, sourcesRefs, stationsNames, tectonicPlateNames;
1545 SgMatrix *cooRaDe, *cooXYZ, *axisTilts;
1556 sourcesNames.append(src->
getKey());
1567 stationsNames .append(stn->
getKey());
1591 sourcesNames.clear();
1592 sourcesRefs.clear();
1593 stationsNames.clear();
1594 tectonicPlateNames.clear();
1608 QMap<QString, SgMatrix*> uvfPerAsecByBand, feedCorrByBand;
1609 for (
int iBand=0; iBand<
bands_.size(); iBand++)
1611 const QString& bandKey=
bands_.at(iBand)->getKey();
1612 uvfPerAsecByBand.insert(bandKey,
new SgMatrix(numOfObs, 2));
1613 feedCorrByBand.insert (bandKey,
new SgMatrix(numOfObs, 2));
1616 for (
int iObs=0; iObs<numOfObs; iObs++)
1619 for (QMap<QString, SgVlbiObservable*>::iterator it=obs->
observableByKey().begin();
1630 for (
int iBand=0; iBand<
bands_.size(); iBand++)
1632 const QString& bandKey=
bands_.at(iBand)->getKey();
1637 for (QMap<QString, SgMatrix*>::iterator it=uvfPerAsecByBand.begin();
1638 it!=uvfPerAsecByBand.end(); ++it)
1640 for (QMap<QString, SgMatrix*>::iterator it=feedCorrByBand.begin();
1641 it!=feedCorrByBand.end(); ++it)
1656 QMap<QString, QString> cableSignByKey;
1660 const QString stnName(stn->
getKey());
1661 SgVector *metAtmPres, *metAtmRh, *metAtmTemp;
1662 SgMatrix *cableCal, *cblCorrections;
1666 QVector<double> tsysFreqs(numTsChans);
1667 QVector<QString> tsysIds(numTsChans), tsysSbs(numTsChans), tsysPzs(numTsChans);
1674 cblCorrections =
new SgMatrix(num, 3);
1675 tSyses =
new SgMatrix(num, numTsChans);
1676 for (
int j=0; j<numTsChans; j++)
1700 for (
int j=0; j<numTsChans; j++)
1717 "::putDataIntoVgosDb(): the station " + stnName +
1718 " has an unknown kind of cable calibration data");
1722 "Various input files (e.g, FS log, CDMS, PCMT)");
1727 cableSignByKey[stnName] =
" ";
1739 "::putDataIntoVgosDb(): the station " + stnName +
1740 " has an unknown kind of meteo data");
1741 isOk = isOk && vgosDb->
storeStationMet(stnName, metAtmPres, metAtmRh, metAtmTemp,
1747 isOk = isOk && vgosDb->
storeStationTsys(stnName, tSyses, tsysFreqs, tsysIds, tsysSbs, tsysPzs);
1754 delete cblCorrections;
1758 if (cableSignByKey.size())
1760 cableSignByKey.clear();
1770 QMap<QString, SgMatrix*> ionCalsByBand, ionSigsByBand;
1771 QMap<QString, SgMatrix*> effFreqsByBand, effFreqsEqWgtByBand;
1772 QMap<QString, QVector<int> >ionDataFlagByBand;
1773 QVector<int> ionBits;
1776 for (
int iBand=0; iBand<
bands_.size(); iBand++)
1778 const QString& bandKey =
bands_.at(iBand)->getKey();
1779 ionCalsByBand .insert(bandKey,
new SgMatrix(numOfObs, 2));
1780 ionSigsByBand .insert(bandKey,
new SgMatrix(numOfObs, 2));
1781 effFreqsByBand .insert(bandKey,
new SgMatrix(numOfObs, 3));
1782 effFreqsEqWgtByBand .insert(bandKey,
new SgMatrix(numOfObs, 3));
1783 ionDataFlagByBand .insert(bandKey, QVector<int>(numOfObs));
1784 for (
int i=0; i<numOfObs; i++)
1785 ionDataFlagByBand[bandKey][i] = -1;
1787 ionBits.resize(numOfObs);
1789 for (
int iObs=0; iObs<numOfObs; iObs++)
1793 for (QMap<QString, SgVlbiObservable*>::iterator it=obs->
observableByKey().begin();
1829 for (
int iBand=0; iBand<
bands_.size(); iBand++)
1831 const QString& bandKey =
bands_.at(iBand)->getKey();
1834 ionSigsByBand[bandKey], ionDataFlagByBand[bandKey]);
1836 isOk = isOk && vgosDb->
storeObsEffFreqs(bandKey, effFreqsEqWgtByBand[bandKey],
true);
1841 for (QMap<QString, SgMatrix*>::iterator it=ionCalsByBand.begin(); it!=ionCalsByBand.end(); ++it)
1843 for (QMap<QString, SgMatrix*>::iterator it=ionSigsByBand.begin(); it!=ionSigsByBand.end(); ++it)
1845 for (QMap<QString, SgMatrix*>::iterator it=effFreqsByBand.begin(); it!=effFreqsByBand.end(); ++it)
1847 for (QMap<QString, SgMatrix*>::iterator it=effFreqsEqWgtByBand.begin();
1848 it!=effFreqsEqWgtByBand.end(); ++it)
1850 effFreqsByBand.clear();
1851 effFreqsEqWgtByBand.clear();
1852 ionCalsByBand.clear();
1853 ionSigsByBand.clear();
1854 ionDataFlagByBand.clear();
1863 QVector<int> delUFlag, phsUFlag, ratUFlag, uAcSup;
1864 delUFlag.resize(numOfObs);
1865 phsUFlag.resize(numOfObs);
1866 ratUFlag.resize(numOfObs);
1867 uAcSup.resize(numOfObs);
1871 has2ndBand =
bands_.size() > 1;
1875 sbKey =
bands_.at(bandIdx++)->getKey();
1876 while (sbKey==pbKey && bandIdx<
bands_.size())
1877 sbKey =
bands_.at(bandIdx++)->getKey();
1879 for (
int iObs=0; iObs<numOfObs; iObs++)
1887 std::cout <<
"Error: pbObs is NULL\n";
1906 if (has2ndBand && !sbObs)
1916 uAcSup[mediaIdx] = -32768;
1918 uAcSup[mediaIdx] = -32767;
1920 uAcSup[mediaIdx] = -32763;
1926 isOk = isOk && vgosDb->
storeObsEditData(delUFlag, phsUFlag, ratUFlag, uAcSup);
1939 QMap<QString, QVector<int> >numOfAmbigsByBand, numOfSubAmbigsByBand, numOfPhsAmbigsByBand;
1941 QMap<QString, SgVector*> grDelaysFullByBand, phDelaysFullByBand, phDelaysSigFullByBand;
1946 for (
int iBand=0; iBand<
bands_.size(); iBand++)
1948 const QString& bandKey=
bands_.at(iBand)->getKey();
1949 numOfAmbigsByBand .insert(bandKey, QVector<int>(numOfObs));
1950 numOfSubAmbigsByBand.insert(bandKey, QVector<int>(numOfObs));
1951 numOfPhsAmbigsByBand.insert(bandKey, QVector<int>(numOfObs));
1952 grDelaysFullByBand[bandKey] =
new SgVector(numOfObs);
1953 phDelaysFullByBand[bandKey] =
new SgVector(numOfObs);
1954 phDelaysSigFullByBand[bandKey] =
new SgVector(numOfObs);
1955 for (
int i=0; i<numOfObs; i++)
1957 numOfAmbigsByBand [bandKey][i] = 0;
1958 numOfSubAmbigsByBand[bandKey][i] = 0;
1959 numOfPhsAmbigsByBand[bandKey][i] = 0;
1963 for (
int iObs=0; iObs<numOfObs; iObs++)
1967 for (QMap<QString, SgVlbiObservable*>::iterator it=obs->
observableByKey().begin();
1977 grDelaysFullByBand[o->
getBandKey()]->setElement(mediaIdx,
1979 phDelaysFullByBand[o->
getBandKey()]->setElement(mediaIdx,
1981 phDelaysSigFullByBand[o->
getBandKey()]->setElement(mediaIdx,
1986 for (
int iBand=0; iBand<
bands_.size(); iBand++)
1988 const QString& bandKey =
bands_.at(iBand)->getKey();
1991 numOfSubAmbigsByBand[bandKey]);
1999 phDelaysSigFullByBand[bandKey]);
2003 numOfAmbigsByBand .clear();
2004 numOfSubAmbigsByBand.clear();
2005 numOfPhsAmbigsByBand.clear();
2006 for (QMap<QString, SgVector*>::iterator it=grDelaysFullByBand.begin();
2007 it!=grDelaysFullByBand.end(); ++it)
2009 grDelaysFullByBand.clear();
2021 SgVector *vIntervals, *vConstraints;
2027 vConstraints =
new SgVector(numOfSites);
2039 /(1.0e-12*24.0*
vLight*100.0));
2043 isOk = isOk && vgosDb->
storeAtmSetup(vIntervals, vConstraints, sites);
2051 refSites << si->
getKey();
2058 isOk = isOk && vgosDb->
storeClockSetup(vIntervals, vConstraints, sites, refSites);
2067 delete vConstraints;
2075 QVector<QString> baselineNames;
2077 int numOfBaselines, idx;
2079 groupBlWeights =
new SgMatrix(2, numOfBaselines);
2080 baselineNames.resize(numOfBaselines);
2085 baselineNames[idx] = bi->
getKey();
2091 baselineNames.clear();
2092 delete groupBlWeights;
2101 int numOfStns, idx, jdx;
2103 QVector<int> sourcesSelection;
2104 QVector< QVector<int> > baselinesSelection;
2111 sources.append(si->
getKey());
2121 baselinesSelection[idx].resize(numOfStns);
2124 QString st1Name(it_i.value()->getKey()), st2Name(it_j.value()->getKey());
2194 baselinesSelection[idx][jdx] = bitArray;
2197 stations.append(it_i.value()->getKey());
2203 sourcesSelection.clear();
2204 for (
int i=0; i<baselinesSelection.size(); i++)
2205 baselinesSelection[i].clear();
2206 baselinesSelection.clear();
2215 baselines << bi->
getKey();
2229 QVector<QString> stationsNames, eccTypes, eccNums;
2233 stationsNames.resize(numOfStns);
2234 eccTypes.resize(numOfStns);
2235 eccNums.resize(numOfStns);
2236 eccVals =
new SgMatrix(numOfStns, 3);
2247 stationsNames[idx] = si->
getKey();
2256 "::putDataIntoVgosDb(): no ecc for station " + si->
getKey());
2264 "::putDataIntoVgosDb(): no eccentricities found");
2266 stationsNames.clear();
2279 QVector<int> statCalFlags;
2280 QVector<QString> statCalNames, flybyNames, calSiteNames, obsCalNames;
2281 QVector< QVector<int> > flybyFlags;
2283 statCalNames.resize(6);
2284 for (
int i=0; i<6; i++)
2287 flybyNames.resize(8);
2288 for (
int i=0; i<8; i++)
2298 calSiteNames[idx] = si->
getKey();
2301 flybyFlags[idx].resize(7);
2302 flybyFlags[idx][0] = 1<<(8-1);
2303 for (
int j=1; j<7; j++)
2304 flybyFlags[idx][j] = 0;
2309 obsCalNames.resize(calList.size());
2310 for (
int i=0; i<calList.size(); i++)
2311 obsCalNames[i] = calList.at(i);
2313 isOk = isOk && vgosDb->
storeCalibrations(obsCalFlags, statCalFlags, flybyFlags, statCalNames, flybyNames,
2314 calSiteNames, obsCalNames);
2317 statCalFlags.clear();
2318 statCalNames.clear();
2320 calSiteNames.clear();
2321 obsCalNames.clear();
2322 for (
int i=0; i<flybyFlags.size(); i++)
2323 flybyFlags[i].clear();
2335 QVector<QString> cbNames;
2336 QVector<SgMJD> cbEpochs;
2337 QVector<int> cbFlags;
2339 QMap<QString, SgParameterBreak*>
2340 breakParameterByBreak;
2341 QMap<QString, QString> breakNameByBreak;
2346 bool need2updateAprioriClocks=
false;
2360 breakParameterByBreak.insert(sBreak, pb);
2361 breakNameByBreak.insert(sBreak, si->
getKey());
2365 need2updateAprioriClocks =
true;
2368 acmSites << si->
getKey();
2373 cBreaks = breakParameterByBreak.values();
2374 cBreakNames = breakNameByBreak.values();
2375 if ((numCbs=cBreaks.size()))
2379 cbNames.resize(numCbs);
2380 cbEpochs.resize(numCbs);
2381 cbFlags.resize(numCbs);
2382 for (
int i=0; i<numCbs; i++)
2384 cbNames[i] = cBreakNames.at(i);
2385 cbEpochs[i] = cBreaks.at(i)->getEpoch4Export();
2388 cBreakNames.at(i) +
" at " +
2394 bool hasClockBreaks;
2395 QVector<QString> cbNames_old;
2396 QVector<SgMJD> cbEpochs_old;
2397 QVector<int> cbFlags_old;
2399 if ((hasClockBreaks=vgosDb->
loadClockBreaks(cbNames_old, cbEpochs_old, cbFlags_old)))
2401 if (cbNames_old != cbNames)
2405 "::putDataIntoVgosDb(): the existed clock breaks names are different");
2410 for (
int i=0; i<cbEpochs.size(); i++)
2411 if (!need2store && (d=fabs(cbEpochs.at(i) - cbEpochs_old.at(i)))>1.0e-2/
DAY2SEC)
2415 "::putDataIntoVgosDb(): the existed clock breaks epochs are different: " +
2416 cbEpochs.at(i).toString() +
" vs " + cbEpochs_old.at(i).toString() +
2417 " (diff: " +
interval2Str(d) +
") for the station " + cbNames.at(i));
2420 if (!need2store && cbFlags_old != cbFlags)
2424 "::putDataIntoVgosDb(): the existed clock breaks flags are different");
2426 cbNames_old.clear();
2427 cbEpochs_old.clear();
2428 cbFlags_old.clear();
2437 "::putDataIntoVgosDb(): the existed clock breaks of the session were refereshed");
2441 "::putDataIntoVgosDb(): the session has clock breaks, the stored data were not modified");
2451 "::putDataIntoVgosDb(): the vgosDb data tree was cleared from existed clock break(s)");
2455 "::putDataIntoVgosDb(): no clock break information were added to the vgosDb data tree");
2458 cBreakNames.clear();
2459 breakParameterByBreak.clear();
2460 breakNameByBreak.clear();
2463 for (QMap<QString, SgVlbiBand*>::iterator itb=
bandByKey_.begin(); itb!=
bandByKey_.end(); ++itb)
2465 QString bandKey=itb.key();
2472 "::putDataIntoVgosDb(): the station " + si->
getKey() +
" has " +
2473 QString(
"").setNum(si->
clockBreaks().size()) +
" clock break(s) at the " + bandKey +
2474 "-band. Saving the band dependent clock breaks is not implemented yet.");
2479 if (need2updateAprioriClocks)
2481 int numAcm=acmSites.size();
2485 for (
int i=0; i<numAcm; i++)
2487 offsets_n_rates->
setElement(i, 0, acm_offsets.at(i));
2488 offsets_n_rates->
setElement(i, 1, acm_rates.at(i));
2491 delete offsets_n_rates;
2497 "::putDataIntoVgosDb(): a set of a priori clocks has been removed from vgosDb tree");
2640 QRegExp reFltDriveName
2641 (
"([\\w\\d]+)-([\\d\\.]+)\\s+\\(([\\w\\d\\s]+)\\):\\s+(.+)");
2642 QRegExp reFltNormMessg(
"([\\w\\d]+)::([\\w\\d]+)\\(\\):\\s+(.+)");
2643 QRegExp reFltWarnMessg(
"^Warning: ([\\w\\d]+)::([\\w\\d]+)\\(\\):\\s+(.+)");
2644 QRegExp reFltErrMessg(
"^ERROR: ([\\w\\d]+)::([\\w\\d]+)\\(\\):\\s+(.+)");
2645 QString sAttr(
""), sSubj(
""), sEvent(
"");
2647 for (
int i=0; i<histSpool.size(); i++)
2649 const QString *pS=histSpool.at(i);
2650 if (reFltDriveName.indexIn(*pS) != -1)
2653 sSubj = reFltDriveName.cap(1);
2654 sEvent= reFltDriveName.cap(4);
2656 if (reFltNormMessg.indexIn(*pS) != -1)
2659 sSubj = reFltNormMessg.cap(2);
2660 sEvent= reFltNormMessg.cap(3);
2662 if (reFltWarnMessg.indexIn(*pS) != -1)
2665 sSubj = reFltWarnMessg.cap(2);
2666 sEvent= reFltWarnMessg.cap(3);
2668 if (reFltErrMessg.indexIn(*pS) != -1)
2671 sSubj = reFltErrMessg.cap(2);
2672 sEvent= reFltErrMessg.cap(3);
2674 if (sAttr.size() && sSubj.size() && sEvent.size())
2680 sAttr = sSubj = sEvent =
"";
2690 std::cout <<
"\nEnd of DRY RUN mode.\n";
2695 "::putDataIntoVgosDb(): session " +
name_ +
" has been updated"
2696 ", elapsed time: " + QString(
"").sprintf(
"%.2f", (finisEpoch - startEpoch)*86400000.0) +
" ms");
2701 "::putDataIntoVgosDb(): storing session " +
name_ +
" as a vgosDb database has failed");
QString interval2Str(double days)
const SgMJD tZero(1957, 10, 4)
#define DAY2SEC
radians to mas:
#define RAD2DEG
radians to degrees:
SgVersion libraryVersion("SgLib", 0, 8, 2, "Compton Peak (rc2)", SgMJD(2023, 4, 3, 10, 59))
QMap< QString, SgVlbiBaselineInfo * >::iterator BaselinesByName_it
QMap< QString, SgVlbiSourceInfo * >::iterator SourcesByName_it
QMap< QString, SgVlbiStationInfo * >::iterator StationsByName_it
double at(DIRECTION i, DIRECTION j) const
double at(DIRECTION i) const
bool isAttr(uint a) const
const QString & getCdpNumber() const
EccType getEccType() const
const Sg3dVector & getDR() const
const QString & getUserEmailAddress() const
const QString & getAcFullName() const
const QString & getUserName() const
const SgIdentities * getCurrentIdentities() const
const SgVersion * getCurrentDriverVersion() const
virtual void write(LogLevel, quint32, const QString &, bool=false)
const QList< QString * > & getSpool() const
SgLogger * lookupSupplementLog(const QString &name)
@ F_YYYYMMDDHHMMSSSS
Long verbose: Fri, the 2nd of Apr, 2010; 17hr 02min 43.6400sec.
@ F_INTERNAL
Digits, date and time: 20100402.71.
QString toString(Format format=F_Verbose) const
void toYMDHMS_tr(int &nYear, int &nMonth, int &nDay, int &nHour, int &nMin, double &dSec) const
static SgMJD currentMJD()
unsigned int nRow() const
void setElement(unsigned int i, unsigned int j, double d)
double getElement(unsigned int i, unsigned int j) const
double getPressure() const
double getTemperature() const
double getRelativeHumidity() const
double getSigma2add(DataType) const
const QString & getKey() const
int numTotal(DataType dType) const
virtual int getMediaIdx() const
@ Attr_NOT_VALID
omit the observation;
@ Attr_PROCESSED
the observation has been processed;
const SgMJD & getEpoch4Export() const
double getPwlStep() const
double getPwlAPriori() const
const SgParameterCfg & getZenith() const
const SgParameterCfg & getClock0() const
const QString & getEccentricitiesFileName() const
void setElement(unsigned int i, double d)
double getElement(unsigned int i) const
const QString & getSoftwareName() const
bool storeStationCalCable(const QString &stnName, const SgMatrix *cal, const QString &origin, const QString &kind)
bool storeObsCalOcean(const SgMatrix *)
SgVdbVariable & vClockBreak()
bool storeEpochs4Obs(const QList< SgMJD > &)
bool storeClockSetup(const SgVector *interval, const SgVector *rateConstraint, const QList< QString > &sites, const QList< QString > &refSites)
bool storeObsGroupDelaysFull(const QString &band, const SgVector *groupDelays)
bool storeObsObjectNames(const QList< QString > &stations_1, const QList< QString > &stations_2, const QList< QString > &sources)
bool storeScanName(const QList< QString > &scanNames, const QList< QString > &scanFullNames)
bool storeObsCalPoleTideOldRestore(const SgMatrix *cals)
bool storeObsCrossRefs(const QList< int > &obs2scan, const QList< int > &obs2stn_1, const QList< int > &obs2stn_2)
bool storeObsEffFreqs(const QString &band, const SgMatrix *freqs, bool areEqWgts=false)
bool storeSessionHead(const QString &corrType, const QString &corrName, const QString &piName, const QString &experimentName, int experimentSerialNumber, const QString &experimentDescription, const QString &recordingMode, const QList< QString > &stations, const QList< QString > &sources, const SgMJD &tStart, const SgMJD &tFinis, int cppsIdx)
bool storeObsQualityCodes(const QString &band, const QVector< char > &qualityCodes)
bool storeObsSingleBandDelays(const QString &band, const SgMatrix *singleBandDelays)
bool storeSourceCrossRefs(const QList< QString > &sources, const QList< int > &scan2src)
bool storeObsPartRaDec(const SgMatrix *dV_dRA, const SgMatrix *dV_dDN)
bool storeObsPartParallax(const SgMatrix *part)
bool storeObsGroupDelays(const QString &band, const SgMatrix *groupDelays, const QString &kind)
void setCorrelatorType(CorrelatorType ct)
void setCurrentVersion(int ver)
bool storeStationCalOceanLoad(const QString &stnName, const SgMatrix *calHorzOLoad, const SgMatrix *calVertOLoad)
bool storeObsRefFreqs(const QString &band, const SgVector *rf)
bool storeObsCalBendSun(const SgMatrix *cals)
bool storeScanTimeMjd(const QList< SgMJD > &epochs)
bool storeStationCalSlantPathTropWet(const QString &stnName, const SgMatrix *cal, const QString &kind)
bool storeObsCalPoleTide(const SgMatrix *, const QString &kind)
bool storeStationRefClockOffset(const QString &stnName, const SgVector *v)
bool storeObsCalBendSunHigher(const SgMatrix *cals)
bool storeObsPhaseCalInfo(const QString &band, SgVlbiSessionInfo::OriginType originType, const SgMatrix *phCalFrqs_1ByChan, const SgMatrix *phCalAmps_1ByChan, const SgMatrix *phCalPhss_1ByChan, const SgMatrix *phCalOffs_1ByChan, const SgVector *phCalRates_1, const SgMatrix *phCalFrqs_2ByChan, const SgMatrix *phCalAmps_2ByChan, const SgMatrix *phCalPhss_2ByChan, const SgMatrix *phCalOffs_2ByChan, const SgVector *phCalRates_2)
bool storeStationTsys(const QString &stnName, const SgMatrix *tsyses, const QVector< double > &frqs, const QVector< QString > &ids, const QVector< QString > &sbs, const QVector< QString > &polzs)
bool storeStationPartAxisOffset(const QString &stnName, const SgMatrix *partAxisOffset)
bool storeObsCalUnphase(const QString &band, const SgMatrix *phaseCal_1, const SgMatrix *phaseCal_2)
bool storeScanEphemeris(const SgMatrix *rSun, const SgMatrix *rMoon, const SgMatrix *rEarth, const SgMatrix *vSun, const SgMatrix *vMoon, const SgMatrix *vEarth, const SgMatrix *aEarth, const QString &kind)
bool storeClockApriories(const QList< QString > &siteNames, const SgMatrix *offsets_n_rates)
bool saveForeignHistory(const SgVlbiHistory &history, const QString &softwareName, const SgMJD &epochOfCreation, const QString &creator, const QString &defaultDir, const QString &historyFileName, const QString &version, bool isMk3Compatible=true)
bool storeStationCalCblCorrections(const QString &stnName, const SgMatrix *cal, const QString &origin)
bool storeMiscFourFit(const QString &band, SgVlbiSessionInfo::OriginType originType, const QVector< QString > &fourfitControlFile, const QVector< QString > &fourfitCommand, const QVector< int > &numLags, const QVector< double > &apLength)
bool storeEpochs4Scans(const QList< SgMJD > &)
bool storeStationCalAxisOffset(const QString &stnName, const SgMatrix *cal)
bool storeErpApriori(const SgVector *ut1_tai, const SgMatrix *pm)
bool storeCalibrations(int obsCalFlags, const QVector< int > &statCalFlags, const QVector< QVector< int > > &flybyFlags, const QVector< QString > &statCalNames, const QVector< QString > &flybyNames, const QVector< QString > &calSiteNames, const QVector< QString > &obsCalNames)
bool storeStationEpochs(const QString &stnName, const QList< SgMJD > &epochs)
bool storeIonoSetup(const QList< int > &flags, const QList< QString > &sites)
bool storeObsCalEarthTide(const SgMatrix *, const QString &kind)
bool storeSourcesApriories(const QList< QString > &sourcesNames, const QList< QString > &sourcesRefs, const SgMatrix *cooRaDe)
SgNetCdf::OperationMode getOperationMode() const
bool storeSolveWeights(const QVector< QString > &baselineNames, SgMatrix *groupBlWeights)
bool loadClockBreaks(QVector< QString > &cbNames, QVector< SgMJD > &cbEpochs, QVector< int > &cbFlags)
bool storeAtmSetup(const SgVector *interval, const SgVector *rateConstraint, const QList< QString > &sites)
bool storeObsCorrelation(const QString &band, const SgVector *correlations)
bool storeObsCalIonGroup(const QString &band, const SgMatrix *ionCals, const SgMatrix *ionSigmas, const QVector< int > &ionDataFlag)
bool storeObsCalParallax(const SgMatrix *cals)
bool storeStationsApriories(const QList< QString > &stationsNames, const SgMatrix *cooXYZ, const QList< QString > &tectonicPlateNames)
void setNumOfChannels(int num)
bool getHave2redoLeapSecond() const
bool storeObsCalWobble(const SgMatrix *, const SgMatrix *)
bool storeStationPartZenithDelayDry(const QString &stnName, const SgMatrix *part, const QString &kind)
bool storeScanNutationEqxWahr(const SgMatrix *pPsiEps, const SgMatrix *pPsiEps_rates)
bool storeScanTrf2crf(const SgMatrix *val, const SgMatrix *rat, const SgMatrix *acc)
bool storeScanCrootFname(const QList< QString > &corrRootFnames)
bool storeScanNutationNro(const SgMatrix *pXys, const SgMatrix *pXys_rates, const QString &kind)
bool storeObsNumGroupAmbigs(const QString &band, const QVector< int > &numAmbigs, const QVector< int > &numSubAmbigs)
bool storeObsSNR(const QString &band, const SgVector *snrs)
bool storeObsUVFperAsec(const QString &band, const SgMatrix *uvfPerAsec)
bool storeScanNutationEqx(const SgMatrix *pPsiEps, const SgMatrix *pPsiEps_rates, const QString &kind)
bool storeObsCalBend(const SgMatrix *cals)
bool storeObsPartBend(const SgMatrix *partBend)
bool storeLeapSecond(int leapSeconds)
bool storeStationParAngle(const QString &stnName, const SgVector *parAngle)
bool storeErpSetup(double pmOffsetConstraint, double utOffsetConstraint)
bool storeStationOceanLdDisp(const QString &stnName, const SgMatrix *dis, const SgMatrix *vel)
bool storeCalcInfo(const SgModelsInfo &calcInfo)
bool composeWrapperFile()
bool storeStationPartHorizonGrad(const QString &stnName, const SgMatrix *part, const QString &kind)
bool storeObsAmbigSpacing(const QString &band, const SgVector *ambigs)
bool storeObsRates(const QString &band, const SgMatrix *rates, const QString &kind)
bool storeObsCalHiFyErp(const SgMatrix *, const SgMatrix *, const QString &kind)
bool storeBaselineClockSetup(const QList< QString > &baselines)
bool storeAntennaApriories(const QList< QString > &stationsNames, const QList< int > &axisTypes, const SgVector *axisOffsets, const SgMatrix *axisTilts)
bool storeStationAzEl(const QString &stnName, SgMatrix *const azTheo, SgMatrix *const elTheo)
bool storeClockBreaks(const QVector< QString > &cbNames, const QVector< SgMJD > &cbEpochs, const QVector< int > &cbFlags, const QString &band="")
bool storeObsPartXYZ(const SgMatrix *dDel_dR_1, const SgMatrix *dRat_dR_1)
bool storeIonoBits(const QVector< int > &ionoBits)
bool storeObsCalHiFyLibration(const SgMatrix *, const SgMatrix *, const QString &kind)
bool storeMiscCable(const QMap< QString, QString > &cableSignByKey)
bool storeObsDelayTheoretical(const SgVector *v)
bool storeObsDtec(const SgVector *dTec, const SgVector *dTecStdDev)
bool storeObsCalOceanOld(const SgMatrix *)
bool storeStationCalSlantPathTropDry(const QString &stnName, const SgMatrix *cal, const QString &kind)
bool storeObsEditData(const QVector< int > &delUFlag, const QVector< int > &phsUFlag, const QVector< int > &ratUFlag, const QVector< int > &uAcSup)
bool storeObsPhaseDelaysFull(const QString &band, const SgVector *groupDelays, const SgVector *phaseDelaySigs)
bool storeObsRateTheoretical(const SgVector *v)
bool storeStationPartZenithDelayWet(const QString &stnName, const SgMatrix *part, const QString &kind)
bool storeObsCalOceanPoleTideLoad(const SgMatrix *)
bool storeStationMet(const QString &stnName, SgVector *const metAtmPres, SgVector *const metAtmRH, SgVector *const metAtmTemp, const QString &origin, const QString &kind)
bool storeObsPartNut2KXY(const SgMatrix *dV_dCipX, const SgMatrix *dV_dCipY, const QString &kind)
bool storeObsCorrelatorInfo(const QString &band, SgVlbiSessionInfo::OriginType originType, const QVector< QString > &fourfitOutputFName, const QVector< QString > &fourfitErrorCodes, const QVector< QString > &frqGrpCodes, const QVector< int > &corelVersions, const QVector< int > &startOffsets, const QVector< QVector< int > > &fourfitVersions, const QVector< QVector< int > > &dbeditVersion, const SgVector *deltaEpochs, const SgMatrix *urvrs, const SgMatrix *instrDelays, const SgMatrix *starElev, const SgMatrix *zenithDelays, const SgMatrix *searchParams, const QVector< QString > &baselineCodes, const QVector< QString > &tapeQualityCodes, const QVector< int > &stopOffsets, const QVector< int > &hopsRevisionNumbers, const SgVector *sampleRate, const SgVector *sbdResids, const SgVector *rateResids, const SgVector *effDurations, const SgVector *startSeconds, const SgVector *stopSeconds, const SgVector *percentOfDiscards, const SgVector *uniformityFactors, const SgVector *geocenterPhaseResids, const SgVector *geocenterPhaseTotals, const SgVector *geocenterSbDelays, const SgVector *geocenterGrDelays, const SgVector *geocenterDelayRates, const SgVector *probOfFalses, const SgVector *corrAprioriDelays, const SgVector *corrAprioriRates, const SgVector *corrAprioriAccs, const SgVector *incohAmps, const SgVector *incohAmps2, const SgVector *delayResids, const QVector< QString > &vlb1FileNames, const QVector< QString > &tapeIds_1, const QVector< QString > &tapeIds_2, const QVector< QVector< int > > &epochsOfCorrelations, const QVector< QVector< int > > &epochsOfCentrals, const QVector< QVector< int > > &epochsOfFourfitings, const QVector< QVector< int > > &epochsOfNominalScanTime, const SgMatrix *corrClocks, const SgMatrix *mDlys, const SgMatrix *mAux)
bool storeCalcEop(const SgVector *pmArrayInfo, const SgVector *utArrayInfo, const SgMatrix *pmValues, const SgVector *utValues, const SgModelsInfo &calcInfo)
bool storeObsPartEOP(const SgMatrix *dV_dPx, const SgMatrix *dV_dPy, const SgMatrix *dV_dUT1)
bool storeObsFractC(const SgVector *v)
bool storeObsDataFlag(const QString &band, const QVector< int > &dataFlags)
bool storeObsPhase(const QString &band, const SgMatrix *phases)
bool storeObsNumPhaseAmbigs(const QString &band, const QVector< int > &numAmbigs)
bool storeEccentricities(const QVector< QString > &stationsNames, const QVector< QString > &eccTypes, const QVector< QString > &eccNums, SgMatrix *eccVals, const QString &eccFileName)
bool storeSelectionStatus(const QVector< int > &sourcesSelection, const QVector< QVector< int > > &stationsSelection)
bool storeObsPartPoleTides(const SgMatrix *dV_dPtdX, const SgMatrix *dV_dPtdY, const QString &kind)
bool saveLocalHistory(const SgVlbiHistory &history)
bool storeObsPartGamma(const SgMatrix *part)
bool storeObsCalFeedCorr(const SgMatrix *)
SgVdbVariable & vClockApriori()
bool storeStationCrossRefs(const QList< int > &numScansPerStation, const QList< QString > &stations, const QMap< QString, QList< int > > &station2scan, const QMap< QString, QList< int > > &scan2station)
bool storeObsCalTiltRmvr(const SgMatrix *cals)
bool storeObsChannelInfo(const QString &band, SgVlbiSessionInfo::OriginType originType, const QVector< QString > &channelIds, const QVector< QString > &polarizations, const QVector< int > &numOfChannels, const QVector< int > &bitsPerSamples, const QVector< QVector< int > > &errorRates_1, const QVector< QVector< int > > &errorRates_2, const QVector< QVector< int > > &bbcIdxs_1, const QVector< QVector< int > > &bbcIdxs_2, const QVector< QVector< int > > &corelIdxNumbersUsb, const QVector< QVector< int > > &corelIdxNumbersLsb, const SgVector *sampleRate, const SgMatrix *residFringeAmplByChan, const SgMatrix *residFringePhseByChan, const SgMatrix *refFreqByChan, const SgMatrix *numOfSamplesByChan_USB, const SgMatrix *numOfSamplesByChan_LSB, const SgMatrix *numOfAccPeriodsByChan_USB, const SgMatrix *numOfAccPeriodsByChan_LSB, const SgMatrix *loFreqs_1, const SgMatrix *loFreqs_2)
double getDrat_dAxsOfs() const
double getCalcAxisOffset4Rate() const
double getDdel_dTzdGrdN() const
double getCableCalibration() const
double getCalcOLoadHorz4Delay() const
double getCalcOLoadVert4Rate() const
const QString & getTapeId() const
double getCalcAxisOffset4Delay() const
double getCalcOLoadVert4Delay() const
double getElevationAngle() const
double getDrat_dTzdWet() const
double getCalcNwetCont4Delay() const
const Sg3dVector & getOcnLdR() const
SgMeteoData & meteoData()
double getElevationAngleRate() const
double getDrat_dTzdGrdN() const
double getRefClockOffset() const
double getCalcNdryCont4Rate() const
double getCalcNdryCont4Delay() const
double getParallacticAngle() const
double getDdel_dTzdWet() const
double getCalcNwetCont4Rate() const
const SgVector & cableCorrections() const
double getAzimuthAngle() const
double getDrat_dTzdDry() const
double getDdel_dTzdDry() const
double getAzimuthAngleRate() const
double getDdel_dAxsOfs() const
double getDrat_dTzdGrdE() const
double getCalcOLoadHorz4Rate() const
double getDdel_dTzdGrdE() const
const Sg3dVector & getOcnLdV() const
QMap< QString, SgVlbiStationInfo * > & stationsByName()
SgVlbiHistory & history()
@ Attr_ESTIMATE_CLOCKS
estimate baseline clocks;
@ Attr_NOT_VALID
omit the baseline;
void addHistoryRecord(const QString &, const SgMJD &t)
double getEffFreq() const
double getGeocenterValue() const
short int getUnweightFlag() const
double getAmbiguitySpacing() const
int getNumOfAmbiguities() const
double getIonoValue() const
double getEffFreqEqWgt() const
double getResidualFringeFitting() const
int getNumOfSubAmbigs() const
double getAlternateValue() const
void setUnweightFlag(short int)
double getIonoSigma() const
QVector< int > * corelIndexNumLSB()
const QString & getFourfitOutputFName() const
double getUvFrPerAsec(int i) const
double getPhaseCalGrDelays(int i) const
int getQualityFactor() const
const SgMJD & getEpochOfCorrelation() const
double getSampleRate() const
QVector< char > * polarization_1ByChan()
double getInstrDelay(int i) const
SgVector * loFreqByChan_1()
QVector< char > * chanIdByChan()
QVector< int > * corelIndexNumUSB()
double getFourfitSearchParameters(int i) const
int getNumOfChannels() const
const QString & getTapeQualityCode() const
SgMatrix * phaseCalData_2ByChan()
const QString & getErrorCode() const
const SgMJD & getEpochOfScan() const
double getIncohChanAddAmp() const
SgVector * numOfAccPeriodsByChan_LSB()
double getAcceptedRatio() const
const SgMJD & getEpochOfFourfitting() const
double getCalcFeedCorrDelay() const
double getProbabOfFalseDetection() const
QVector< char > * polarization_2ByChan()
SgVector * numOfAccPeriodsByChan_USB()
QVector< int > * bbcIdxByChan_1()
SgVlbiMeasurement & phDRate()
double getCorrelZdelay_1() const
double getGeocenterTotalPhase() const
double getEffIntegrationTime() const
const SgMJD & getTstop() const
double getCorrClocks(int i, int j) const
SgVector * fringeAmplitudeByChan()
int getStartOffset() const
double getUrVr(int i) const
double getCentrOffset() const
SgVector * numOfSamplesByChan_LSB()
double getAprioriDra(int i) const
double getCorrelStarElev_2() const
double getDiscardRatio() const
double getTotalPhase() const
int getHopsRevisionNumber() const
int getFourfitVersion(int idx) const
const QString & getFourfitControlFile() const
double getIncohSegmAddAmp() const
int getStopOffset() const
SgMatrix * phaseCalData_1ByChan()
const QString & getBandKey() const
SgVector * numOfSamplesByChan_USB()
const QString & getFourfitCommandOverride() const
double getPhaseCalRates(int i) const
double getCalcFeedCorrRate() const
double getReferenceFrequency() const
SgVlbiMeasurement & phDelay()
double getCorrelStarElev_1() const
int getBitsPerSample() const
const SgMJD & getEpochCentral() const
double getCorrCoeff() const
SgVector * loFreqByChan_2()
SgVlbiMeasurement & grDelay()
SgVlbiMeasurement & sbDelay()
SgVector * fringePhaseByChan()
double getGeocenterResidPhase() const
SgVector * refFreqByChan()
QVector< int > * bbcIdxByChan_2()
const SgMJD & getTstart() const
double getCorrelZdelay_2() const
double getDrat_dCipY() const
double getCalcCipXv() const
double getCalcNutWahr_dEpsV() const
double getCalcTiltRemvrRate() const
double getCalcPoleTideOldDelay() const
const Sg3dVector & getVearth() const
double getCalcCipSr() const
double getCalcTiltRemvrDelay() const
SgVlbiStationInfo * stn_1()
const Sg3dMatrix & getTrf2crfAcc() const
double getCalcOceanPoleTideLdDelay() const
double getCalcConsBendingSunRate() const
SgVlbiAuxObservation * auxObs_2()
double getCalcNutWahr_dPsiV() const
double getCalcPmX() const
double getCalcPxDelay() const
double getCalcOceanTideDelay() const
double getDdel_dDN() const
double getDdel_dParallaxRev() const
double getCalcOceanPoleTideLdRate() const
double getDTecStdDev() const
double getCalcNut2006_dPsiV() const
const Sg3dVector & getRmoon() const
const Sg3dMatrix & getTrf2crfVal() const
double getCalcCipYv() const
double getDrat_dGamma() const
double getCalcPyDelay() const
double getDdel_dBend() const
const Sg3dVector & getVsun() const
double getDdel_dPy() const
double getCalcConsBendingSunHigherRate() const
double getApLength() const
double getDrat_dPx() const
double getCalcNutWahr_dPsiR() const
double getDdel_dPolTideX() const
double getCalcConsBendingSunDelay() const
double getCalcCipXr() const
double getCalcPoleTideOldRate() const
double getCalcConsBendingSunHigherDelay() const
double getCalcNut2006_dEpsV() const
double getCalcConsBendingDelay() const
double getCalcEarthTideDelay() const
const Sg3dVector & getDdel_dR_1() const
double getCalcConsensusRate() const
double getCalcHiFyPxyRate() const
double getD2rat_dUT12() const
double getDrat_dCipX() const
double getCalcCipYr() const
double getDrat_dPolTideY() const
double getCalcPxRate() const
double getCalcPyRate() const
const Sg3dVector & getRearth() const
double getCalcPoleTideRate() const
double getDrat_dBend() const
double getCalcCipSv() const
double getCalcHiFyUt1LibrationRate() const
SgVlbiStationInfo * stn_2()
const Sg3dVector & getVmoon() const
const QString & getCorrRootFileName() const
double getDdel_dCipY() const
double getCalcNut2006_dPsiR() const
double getCalcHiFyPxyLibrationRate() const
SgVlbiObservable * observable(const QString &)
double getD2del_dUT12() const
double getDrat_dUT1() const
double getCalcConsBendingRate() const
const Sg3dMatrix & getTrf2crfRat() const
double getCalcEarthTideRate() const
const QString & getScanName() const
double getDdel_dPx() const
double getDrat_dPy() const
const Sg3dVector & getDrat_dR_1() const
QMap< QString, SgVlbiObservable * > & observableByKey()
double getCalcHiFyPxyLibrationDelay() const
const QString & getScanId() const
double getDrat_dPolTideX() const
double getCalcPmY() const
double getDdel_dUT1() const
double getDrat_dRA() const
double getDrat_dParallax() const
SgVlbiAuxObservation * auxObs_1()
double getDdel_dParallax() const
double getDdel_dGamma() const
double getCalcNut2006_dEpsR() const
double getCalcOceanTideRate() const
double getCalcNutWahr_dEpsR() const
double getCalcPoleTideDelay() const
double getCalcHiFyUt1Delay() const
const Sg3dVector & getRsun() const
double getCalcOceanTideOldDelay() const
double getCalcConsensusDelay() const
double getDdel_dPolTideY() const
double getDrat_dDN() const
const Sg3dVector & getAearth() const
double getCalcHiFyPxyDelay() const
double getCalcHiFyUt1Rate() const
double getCalcHiFyUt1LibrationDelay() const
double getDrat_dParallaxRev() const
double getCalcUt1_Tai() const
double getDdel_dCipX() const
double getDdel_dRA() const
double getCalcOceanTideOldRate() const
const QString & getCorrelatorType() const
@ OT_MK4
observations are from Mk4-compatible correlator output;
@ OT_AGV
observations are in AGV format;
@ OT_KOMB
observations are from KOMB output (generated by NICT, Japan);
CorrelatorPostProcSoftware cppsSoft_
@ Attr_FF_AUX_OBS_MODIFIED
station log related data were modified; //vgosDbProcLogs
@ Attr_FF_EDIT_INFO_MODIFIED
edit info has been modified by user;
@ Attr_FF_WEIGHTS_CORRECTED
weights have been corrected;
@ Attr_REF_CLOCKS_ADJUSTED
@ Attr_FF_ION_C_CALCULATED
ionospheric corrections have been calculated;
@ Attr_FF_CALC_DATA_MODIFIED
the theoretical values were modified; //vgosDbCalc
@ Attr_FF_PHASE_DEL_USED
station clocks or zenith delays were set.
@ Attr_FF_OUTLIERS_PROCESSED
outliers have been processed;
@ Attr_HAS_DTEC
the session contains diffTec values;
@ Attr_FF_AMBIGS_RESOLVED
ambiguities have been resolved;
@ Attr_FF_CREATED
the session has been imported from correlator;//vgosDbMake
SgMJD tFinis_
last epoch of the observations;
OriginType getOriginType() const
QString correlatorType_
Type of the correlator;.
QString sessionCode_
official session code (from Masterfile);
int experimentSerialNumber_
QString piAgencyName_
Name of P.I. organization.
QString description_
Experiment description;.
QString correlatorName_
Correlator Name (from MasterFile)
OriginType originType_
type of origin of the imported file(s);
QString name_
name of the session (e.g., 10JUL22XE);
SgMJD tStart_
first epoch of the observations;
StationsByName stationsByName_
QList< SgVlbiBand * > & bands()
QList< SgVlbiBand * > bands_
void formObsCalibrationSetup(int &bitFlags, QList< QString > &calList)
SgVector * args4PxyInterpolation_
void makeHistoryIntro(SgVlbiHistory &)
QMap< QString, SgVlbiBand * > bandByKey_
QList< SgVlbiObservation * > observations_
SgVlbiHistory contemporaryHistory_
BaselinesByName baselinesByName_
void makeHistory(SgVlbiHistory &)
SgParametersDescriptor * parametersDescriptor_
SgVlbiBand * primaryBand_
bool putDataIntoVgosDb(SgVgosDb *vgosDb)
static QString className()
SgVector * args4Ut1Interpolation_
SgMatrix * tabs4Ut1Interpolation_
SourcesByName sourcesByName_
SgMatrix * tabs4PxyInterpolation_
short calculateStatusBits()
const QString & getAprioriReference() const
QMap< QString, SgVlbiAuxObservation * > * auxObservationByScanId()
void calcCBEpochs4Export(const QMap< QString, SgVlbiAuxObservation * > &)
QVector< QString > & tsysIfSideBands()
CableCalsOrigin getCableCalsOrigin() const
QVector< double > & tsysIfFreqs()
double getAxisOffset() const
QVector< QString > & tsysIfIds()
const QString & getTectonicPlateName() const
@ Attr_NOT_VALID
omit the station;
@ Attr_APRIORI_CLOCK_MODIFIED
@ Attr_REFERENCE_CLOCKS
the clocks are the reference ones;
@ Attr_HAS_CABLE_CAL
a station has cable calibration readings;
@ Attr_IGNORE_CABLE_CAL
do not apply cable calibration;
@ Attr_METEO_MODIFIED
a station has meteo parameters;
@ Attr_USE_LOCAL_ZENITH
use its own setup for the zenith delay parameter;
@ Attr_USE_LOCAL_CLOCKS
use its own setup for the clock parameter;
@ Attr_CABLE_CAL_MODIFIED
a station has cable calibration readings;
@ Attr_HAS_METEO
a station has meteo parameters;
MeteoDataOrigin getMeteoDataOrigin() const
static int mntType2int(MountingType)
const SgParameterCfg & getPcClocks() const
const Sg3dVector & getR()
double getCableCalMultiplierDBCal() const
const SgParameterCfg & getPcZenith() const
const QString & getCableCalsOriginTxt() const
double getTilt(int i) const
MountingType getMntType() const
SgBreakModel & clockBreaks()
double getAPrioriClockTerm_1() const
bool getNeed2useAPrioriClocks() const
double getAPrioriClockTerm_0() const
const QString & getMeteoDataOriginTxt() const
QVector< QString > & tsysIfPolarizations()