General Purpose Geodetic Library
SgVgosDbLoadSession.cpp
Go to the documentation of this file.
1 /*
2  *
3  * This file is a part of Space Geodetic Library. The library is used by
4  * nuSolve, a part of CALC/SOLVE system, and designed to make analysis of
5  * geodetic VLBI observations.
6  * Copyright (C) 2010-2020 Sergei Bolotin.
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 
24 
25 #include <math.h>
26 
27 
28 #include <QtCore/QFile>
29 #include <QtCore/QTextStream>
30 
31 #include <SgIdentities.h>
32 #include <SgLogger.h>
33 #include <SgModelsInfo.h>
34 #include <SgNetCdf.h>
35 #include <SgVgosDb.h>
36 #include <SgVersion.h>
37 #include <SgVlbiHistory.h>
38 #include <SgVlbiStationInfo.h>
39 
40 
41 
42 
43 
44 
45 
46 
47 
48 
49 /*=====================================================================================================*/
50 /* */
51 /* SgVgosDb implementation (continue -- loadSession part of vgosDb data tree) */
52 /* */
53 /*=====================================================================================================*/
54 //
55 bool SgVgosDb::loadSourcesApriories(QVector<QString> &sourcesNames, SgMatrix* &cooRaDe,
56  QVector<QString> &sourcesApRefs)
57 {
59  {
61  "::loadSourcesApriories(): the vgosDb variable SourceApriori is empty");
62  return false;
63  };
65  ncdf.getData();
66  if (!checkFormat(fcfSourceApriori, ncdf))
67  {
69  "::loadSourcesApriories(): format check failed");
70  return false;
71  };
72  //
73  //
74  const char *pS=ncdf.lookupVar(fcSourceNameApriori.name())->data2char();
75  const char *pR=ncdf.lookupVar(fcSourceReference.name())?
76  ncdf.lookupVar(fcSourceReference.name())->data2char():NULL;
77  const double *pD=ncdf.lookupVar(fcSource2000RaDec .name())->data2double();
78  int lN=ncdf.lookupVar(fcSourceNameApriori.name())->dimensions().at(1)->getN();
79  int lR=pR?ncdf.lookupVar(fcSourceReference.name())->dimensions().at(1)->getN():
80  0;
81  char *buff=NULL;
82  numOfSrc_ = ncdf.lookupVar(fcSource2000RaDec .name())->dimensions().at(0)->getN();
83  sourcesNames.resize(numOfSrc_);
84  sourcesApRefs.clear();
85  if (pR)
86  {
87  sourcesApRefs.resize(numOfSrc_);
88  buff = new char[lR + 1];
89  };
90  cooRaDe = new SgMatrix(numOfSrc_, 2);
91  for (int i=0; i<numOfSrc_; i++)
92  {
93  sourcesNames[i] = QString::fromLatin1(pS + lN*i, lN);
94  if (pR)
95  {
96  strncpy(buff, pR + lR*i, lR);
97  sourcesApRefs[i] = QString::fromLatin1(buff);
98  };
99  cooRaDe->setElement(i, 0, pD[2*i ]);
100  cooRaDe->setElement(i, 1, pD[2*i + 1]);
101  };
102  if (buff)
103  delete[] buff;
104  if (numOfSrc_)
106  "::loadSourcesApriories(): loaded a priori coordinates of " + QString("").setNum(numOfSrc_) +
107  " sources from " + ncdf.getFileName());
108  return true;
109 };
110 
111 
112 
113 //
114 bool SgVgosDb::loadClockApriories(QVector<QString> &stationNames, SgMatrix* &offsets_n_rates)
115 {
116  if (vClockApriori_.isEmpty())
117  {
119  "::loadClockApriories(): the vgosDb variable ClockApriori is empty");
120  return false;
121  };
123  ncdf.getData();
124  if (!checkFormat(fcfClockApriori, ncdf))
125  {
127  "::loadClockApriories(): format check failed");
128  return false;
129  };
130  //
131  //
132  const char *pS=ncdf.lookupVar(fcClockAprioriSite.name())->data2char();
133  const double *pO=ncdf.lookupVar(fcClockAprioriOffset.name())->data2double();
134  const double *pR=ncdf.lookupVar(fcClockAprioriRate.name())->data2double();
135  int nS=ncdf.lookupVar(fcClockAprioriSite.name())->dimensions().at(0)->getN();
136  int lS=ncdf.lookupVar(fcClockAprioriSite.name())->dimensions().at(1)->getN();
137  int nO=ncdf.lookupVar(fcClockAprioriOffset.name())->dimensions().at(0)->getN();
138  int nR=ncdf.lookupVar(fcClockAprioriRate.name())->dimensions().at(0)->getN();
139  if (nS != nO)
140  {
142  "::loadClockApriories(): a number of a priori site names (" + QString("").setNum(nS) +
143  ") and a number of a priori offsets (" + QString("").setNum(nO) + ") mismatch");
144  return false;
145  };
146  if (nS != nR)
147  {
149  "::loadClockApriories(): a number of a priori site names (" + QString("").setNum(nS) +
150  ") and a number of a priori rates (" + QString("").setNum(nR) + ") mismatch");
151  return false;
152  };
153  stationNames.resize(nS);
154  offsets_n_rates = new SgMatrix(nS, 2);
155  for (int i=0; i<nS; i++)
156  {
157  stationNames[i] = QString::fromLatin1(pS + lS*i, lS);
158  offsets_n_rates->setElement(i, 0, pO[i]);
159  offsets_n_rates->setElement(i, 1, pR[i]);
160  };
162  "::loadClockApriories(): loaded a priori parameters of " + QString("").setNum(nS) +
163  " clocks from " + ncdf.getFileName());
164  return true;
165 };
166 
167 
168 
169 //
170 bool SgVgosDb::loadStationsApriories(QVector<QString> &stationsNames, SgMatrix* &cooXYZ,
171  QVector<QString> &tectonicPlateNames)
172 {
174  {
176  "::loadStationsApriories(): the vgosDb variable StationApriori is empty");
177  return false;
178  };
180  ncdf.getData();
181  if (!checkFormat(fcfStationApriori, ncdf))
182  {
184  "::loadStationsApriories(): format check failed");
185  return false;
186  };
187  const double *pD=ncdf.lookupVar(fcStationXYZ .name())->data2double();
188  const char *pS=ncdf.lookupVar(fcStationNameApriori.name())->data2char();
189  int lS=ncdf.lookupVar(fcStationNameApriori.name())->dimensions().at(1)->getN();
190  const char *pT=ncdf.lookupVar(fcStationPlateName .name())->data2char();
191  int lT=ncdf.lookupVar(fcStationPlateName .name())->dimensions().at(1)->getN();
192  numOfStn_ = ncdf.lookupVar(fcStationXYZ .name())->dimensions().at(0)->getN();
193  stationsNames.resize(numOfStn_);
194  tectonicPlateNames.resize(numOfStn_);
195  cooXYZ = new SgMatrix(numOfStn_, 3);
196  for (int i=0; i<numOfStn_; i++)
197  {
198  stationsNames[i] = QString::fromLatin1(pS + lS*i, lS);
199  tectonicPlateNames[i] = QString::fromLatin1(pT + lT*i, lT);
200  cooXYZ->setElement(i, 0, pD[3*i ]);
201  cooXYZ->setElement(i, 1, pD[3*i + 1]);
202  cooXYZ->setElement(i, 2, pD[3*i + 2]);
203  };
204  if (numOfStn_)
206  "::loadStationsApriories(): loaded a priori positions of " + QString("").setNum(numOfStn_) +
207  " stations from " + ncdf.getFileName());
208  return true;
209 };
210 
211 
212 
213 //
214 bool SgVgosDb::loadAntennaApriories(QVector<QString> &stationsNames, QVector<int> &axisTypes,
215  SgVector* &axisOffsets, SgMatrix* &axisTilts)
216 {
218  {
220  "::loadAntennaApriories(): the vgosDb variable AntennaApriori is empty");
221  return false;
222  };
224  ncdf.getData();
225  if (!checkFormat(fcfAntennaApriori, ncdf))
226  {
228  "::loadAntennaApriories(): format check failed");
229  return false;
230  };
231  const short *pI=ncdf.lookupVar(fcAxisType .name())->data2short();
232  const char *pS=ncdf.lookupVar(fcAntennaName.name())->data2char();
233  const double *pO=ncdf.lookupVar(fcAxisOffset .name())->data2double();
234  const double *pT=ncdf.lookupVar(fcAxisTilt .name())?
235  ncdf.lookupVar(fcAxisTilt .name())->data2double():NULL;
236  int n =ncdf.lookupVar(fcAntennaName.name())->dimensions().at(0)->getN();
237  int l =ncdf.lookupVar(fcAntennaName.name())->dimensions().at(1)->getN();
238  stationsNames.resize(n);
239  axisTypes.resize(n);
240  axisOffsets = new SgVector(n);
241  if (pT)
242  axisTilts = new SgMatrix(n, 2);
243  for (int i=0; i<n; i++)
244  {
245  stationsNames[i] = QString::fromLatin1(pS + l*i, l);
246  axisTypes[i] = pI[i];
247  axisOffsets->setElement(i, pO[i]);
248  if (pT)
249  {
250  axisTilts->setElement(i, 0, pT[2*i ]);
251  axisTilts->setElement(i, 1, pT[2*i + 1]);
252  };
253  };
255  "::loadAntennaApriories(): data loaded successfully from " + ncdf.getFileName() );
256  return true;
257 };
258 
259 
260 
261 //
262 bool SgVgosDb::loadEccentricities(QVector<QString> &stationsNames, QVector<QString> &eccTypes,
263  QVector<QString> &eccNums, SgMatrix* &eccVals)
264 {
265  if (vEccentricity_.isEmpty())
266  {
268  "::loadEccentricities(): the vgosDb variable Eccentricity is empty");
269  return false;
270  };
272  ncdf.getData();
273  if (!checkFormat(fcfEccentricity, ncdf))
274  {
276  "::loadEccentricities(): format check failed");
277  return false;
278  };
279  const char *pType=ncdf.lookupVar(fcEccentricityType .name())->data2char();
280  const char *pName=ncdf.lookupVar(fcEccentricityName .name())->data2char();
281  const char *pMnmt=ncdf.lookupVar(fcEccentricityMonument.name())->data2char();
282  const double *pV=ncdf.lookupVar(fcEccentricityVector.name())->data2double();
283  int n =ncdf.lookupVar(fcEccentricityType.name())->dimensions().at(0)->getN();
284  int lT=ncdf.lookupVar(fcEccentricityType.name())->dimensions().at(1)->getN();
285  int lN=ncdf.lookupVar(fcEccentricityName.name())->dimensions().at(1)->getN();
286  int lM=ncdf.lookupVar(fcEccentricityMonument.name())->dimensions().at(1)->getN();
287  stationsNames.resize(n);
288  eccTypes.resize(n);
289  eccNums.resize(n);
290  eccVals = new SgMatrix(n, 3);
291  for (int i=0; i<n; i++)
292  {
293  stationsNames[i] = QString::fromLatin1(pName + lN*i, lN);
294  eccTypes[i] = QString::fromLatin1(pType + lT*i, lT);
295  eccNums[i] = QString::fromLatin1(pMnmt + lM*i, lM);
296  eccVals->setElement(i, 0, pV[3*i ]);
297  eccVals->setElement(i, 1, pV[3*i + 1]);
298  eccVals->setElement(i, 2, pV[3*i + 2]);
299  };
301  "::loadEccentricities(): data loaded successfully from " + ncdf.getFileName() );
302  return true;
303 };
304 
305 
306 
307 //
308 bool SgVgosDb::loadAtmSetup(SgVector* &interval, SgVector* &rateConstraint,
309  QVector<QString> &stationsNames)
310 {
312  if (var.isEmpty())
313  {
315  "::loadAtmSetup(): the vgosDb variable AtmSetup is empty");
316  return false;
317  };
318  SgNetCdf ncdf(path2RootDir_ + "/" + var.getFileName());
319  ncdf.getData();
320  if (!checkFormat(fcfAtmSetup, ncdf))
321  {
323  "::loadAtmSetup(): format check failed");
324  return false;
325  };
326  const double *pT= ncdf.lookupVar(fcAtmInterval .name())?
327  ncdf.lookupVar(fcAtmInterval .name())->data2double():NULL;
328  const double *pC= ncdf.lookupVar(fcAtmRateConstraint.name())?
330  const char *pS= ncdf.lookupVar(fcAtmRateSite .name())?
331  ncdf.lookupVar(fcAtmRateSite .name())->data2char():NULL;
332  int nI=pT?
333  ncdf.lookupVar(fcAtmInterval .name())->dimensions().at(0)->getN():0;
334  int nC=pC?
335  ncdf.lookupVar(fcAtmRateConstraint.name())->dimensions().at(0)->getN():0;
336  int l =pS?
337  ncdf.lookupVar(fcAtmRateSite .name())->dimensions().at(1)->getN():0;
338  if (nI)
339  {
340  interval = new SgVector(nI);
341  for (int i=0; i<nI; i++)
342  interval->setElement(i, pT[i]);
344  "::loadAtmSetup(): the atm intervals have been found");
345  };
346  if (nC)
347  {
348  rateConstraint = new SgVector(nC);
349  stationsNames.resize(nC);
350  for (int i=0; i<nC; i++)
351  {
352  rateConstraint->setElement(i, pC[i]);
353  if (pS)
354  stationsNames[i] = QString::fromLatin1(pS + l*i, l);
355  };
357  "::loadAtmSetup(): the atm rate constraints have been found");
358  };
359  if (nI || nC)
361  "::loadAtmSetup(): data loaded successfully from " + ncdf.getFileName() );
362  return true;
363 };
364 
365 
366 
367 //
368 bool SgVgosDb::loadClockSetup(QList<QString> &refClocks, SgVector* &interval, SgVector* &rateConstraint,
369  QVector<QString> &stationsNames)
370 {
372  if (var.isEmpty())
373  {
375  "::loadClockSetup(): the vgosDb variable ClockSetup is empty");
376  return false;
377  };
378  SgNetCdf ncdf(path2RootDir_ + "/" + var.getFileName());
379  ncdf.getData();
380  if (!checkFormat(fcfClockSetup, ncdf))
381  {
383  "::loadClockSetup(): format check failed");
384  return false;
385  };
386  // special case:
387  refClocks.clear();
388 // SgNcdfVariable *vRefs=ncdf.lookupVar("RefClockStationList");
389  SgNcdfVariable *vRefs=ncdf.lookupVar("ReferenceClock");
390  if (vRefs)
391  {
392  if (vRefs->getTypeOfData() == NC_CHAR)
393  {
394  if (vRefs->dimensions().size() == 1)
395  refClocks.append(QString::fromLatin1(vRefs->data2char(), vRefs->dimensions().at(0)->getN()));
396  else
397  {
398  int n=vRefs->dimensions().at(0)->getN();
399  int l=vRefs->dimensions().at(1)->getN();
400  for (int i=0; i<n; i++)
401  refClocks.append(QString::fromLatin1(vRefs->data2char() + l*i, l));
402  };
403  }
404  else
406  "::loadClockSetup(): wrong data type of \"RefClockStationList\", ignoring");
407  }
408  else
410  "::loadClockSetup(): no reference clock found");
411  //
412  // end of special case
413  //
414  const double *pT=ncdf.lookupVar(fcClockInterval .name())?
415  ncdf.lookupVar(fcClockInterval .name())->data2double():NULL;
416  const double *pC=ncdf.lookupVar(fcClockRateConstraint.name())?
418  const char *pS=ncdf.lookupVar(fcClockRateName .name())?
419  ncdf.lookupVar(fcClockRateName .name())->data2char():NULL;
420  int nI=pT?
421  ncdf.lookupVar(fcClockInterval.name())->dimensions().at(0)->getN():0;
422  int nC=pC?
423  ncdf.lookupVar(fcClockRateConstraint.name())->dimensions().at(0)->getN():0;
424  int l =pS?
425  ncdf.lookupVar(fcClockRateName.name())->dimensions().at(1)->getN():0;
426  if (nI)
427  {
428  interval = new SgVector(nI);
429  for (int i=0; i<nI; i++)
430  interval->setElement(i, pT[i]);
432  "::loadClockSetup(): the clock intervals have been found");
433  };
434  if (nC)
435  {
436  rateConstraint = new SgVector(nC);
437  stationsNames.resize(nC);
438  for (int i=0; i<nC; i++)
439  {
440  rateConstraint->setElement(i, pC[i]);
441  if (pS)
442  stationsNames[i] = QString::fromLatin1(pS + l*i, l);
443  };
445  "::loadClockSetup(): the clock rate constraints have been found");
446  };
447  if (nI || nC)
449  "::loadClockSetup(): data loaded successfully from " + ncdf.getFileName() );
450  return true;
451 };
452 
453 
454 
455 //
456 bool SgVgosDb::loadCalcEop(SgVector* &pmArrayInfo, SgVector* &utArrayInfo, SgMatrix* &pmValues,
457  SgVector* &utValues, QString &sUtMode, QString &sUtModule, QString &sUtOrigin, QString &sPmMode,
458  QString &sPmModule, QString &sPmOrigin)
459 {
461  if (var.isEmpty())
462  {
464  "::loadCalcEop(): the vgosDb variable CalcEop is empty");
465  return false;
466  };
467  SgNetCdf ncdf(path2RootDir_ + "/" + var.getFileName());
468  ncdf.getData();
469  if (!checkFormat(fcfCalcEop, ncdf))
470  {
472  "::loadCalcEop(): format check failed");
473  return false;
474  };
475  int n, l;
476  const double *p;
477  const char *c;
478  p = ncdf.lookupVar(fcWobArrayInfo.name())->data2double();
479  pmArrayInfo = new SgVector(3);
480  pmArrayInfo->setElement(0, p[0]);
481  pmArrayInfo->setElement(1, p[1]);
482  pmArrayInfo->setElement(2, p[2]);
483  //
484  p = ncdf.lookupVar(fcUT1ArrayInfo.name())->data2double();
485  utArrayInfo = new SgVector(4);
486  utArrayInfo->setElement(0, p[0]);
487  utArrayInfo->setElement(1, p[1]);
488  utArrayInfo->setElement(2, p[2]);
489  utArrayInfo->setElement(3, p[3]);
490  //
491  p = ncdf.lookupVar(fcUT1Values.name())->data2double();
492  n = ncdf.lookupVar(fcUT1Values.name())->dimensions().at(0)->getN();
493  utValues = new SgVector(n);
494  for (int i=0; i<n; i++)
495  utValues->setElement(i, p[i]);
496  //
497  p = ncdf.lookupVar(fcWobValues.name())->data2double();
498  n = ncdf.lookupVar(fcWobValues.name())->dimensions().at(0)->getN();
499  pmValues = new SgMatrix(n, 2);
500  for (int i=0; i<n; i++)
501  {
502  pmValues->setElement(i, 0, p[2*i ]);
503  pmValues->setElement(i, 1, p[2*i + 1]);
504  };
505  //
506  c = ncdf.lookupVar(fcUT1IntrpMode.name())->data2char();
507  l = ncdf.lookupVar(fcUT1IntrpMode.name())->dimensions().at(0)->getN();
508  sUtMode = QString::fromLatin1(c, l);
509  //
510  c = ncdf.lookupVar(fcCalcUt1Module.name())->data2char();
511  l = ncdf.lookupVar(fcCalcUt1Module.name())->dimensions().at(0)->getN();
512  sUtModule = QString::fromLatin1(c, l);
513  //
514  c = ncdf.lookupVar(fcUT1Origin.name())->data2char();
515  l = ncdf.lookupVar(fcUT1Origin.name())->dimensions().at(0)->getN();
516  sUtOrigin = QString::fromLatin1(c, l);
517  //
518  c = ncdf.lookupVar(fcWobIntrpMode.name())->data2char();
519  l = ncdf.lookupVar(fcWobIntrpMode.name())->dimensions().at(0)->getN();
520  sPmMode = QString::fromLatin1(c, l);
521  //
522  c = ncdf.lookupVar(fcCalcWobModule.name())->data2char();
523  l = ncdf.lookupVar(fcCalcWobModule.name())->dimensions().at(0)->getN();
524  sPmModule = QString::fromLatin1(c, l);
525  //
526  c = ncdf.lookupVar(fcWobbleOrigin.name())->data2char();
527  l = ncdf.lookupVar(fcWobbleOrigin.name())->dimensions().at(0)->getN();
528  sPmOrigin = QString::fromLatin1(c, l);
529  //
531  "::loadCalcEop(): data loaded successfully from " + ncdf.getFileName() );
532  return true;
533 };
534 
535 
536 
537 //
538 bool SgVgosDb::loadCalibrations(int &obsCalFlags, QVector<int> &statCalFlags,
539  QVector< QVector<int> > &flybyFlags, QVector<QString> &statCalNames, QVector<QString> &flybyNames,
540  QVector<QString> &calSiteNames, QVector<QString> &obsCalNames)
541 {
543  if (var.isEmpty())
544  {
546  "::loadCalibrations(): the vgosDb variable CalibrationSetup is empty");
547  return false;
548  };
549  SgNetCdf ncdf(path2RootDir_ + "/" + var.getFileName());
550  ncdf.getData();
551  if (!checkFormat(fcfCalibrationSetup, ncdf))
552  {
554  "::loadCalibrations(): format check failed");
555  return false;
556  };
557  int n, l;
558  const short *p;
559  const char *c;
560  //
561  if (ncdf.lookupVar(fcObsCalFlag.name()))
562  obsCalFlags = *ncdf.lookupVar(fcObsCalFlag.name())->data2short();
563  else
564  {
565  obsCalFlags = 0;
567  "::loadCalibrations(): cannot find " + fcObsCalFlag.name() +
568  " variable in the file " + ncdf.getFileName());
569  };
570  //
571  p = ncdf.lookupVar(fcStatCalFlag.name())->data2short();
572  n = ncdf.lookupVar(fcStatCalFlag.name())->dimensions().at(0)->getN();
573  statCalFlags.resize(n);
574  for (int i=0; i<n; i++)
575  statCalFlags[i] = p[i];
576  //
577  if (ncdf.lookupVar(fcFlybyFlag.name()))
578  {
579  p = ncdf.lookupVar(fcFlybyFlag.name())->data2short();
580  n = ncdf.lookupVar(fcFlybyFlag.name())->dimensions().at(0)->getN();
581  l = ncdf.lookupVar(fcFlybyFlag.name())->dimensions().at(1)->getN();
582  flybyFlags.resize(n);
583  for (int iStn=0; iStn<n; iStn++)
584  {
585  flybyFlags[iStn].resize(l);
586  for (int j=0; j<l; j++)
587  (flybyFlags[iStn])[j] = p[l*iStn + j];
588  };
589  }
590  else
591  {
592  flybyFlags.clear();
594  "::loadCalibrations(): cannot find " + fcFlybyFlag.name() +
595  " variable in the file " + ncdf.getFileName());
596  };
597  //
598  c = ncdf.lookupVar(fcStatCalName.name())->data2char();
599  n = ncdf.lookupVar(fcStatCalName.name())->dimensions().at(0)->getN();
600  l = ncdf.lookupVar(fcStatCalName.name())->dimensions().at(1)->getN();
601  statCalNames.resize(n);
602  for (int i=0; i<n; i++)
603  statCalNames[i] = QString::fromLatin1(c + l*i, l);
604  //
605  if (ncdf.lookupVar(fcFlybyName.name()))
606  {
607  c = ncdf.lookupVar(fcFlybyName.name())->data2char();
608  n = ncdf.lookupVar(fcFlybyName.name())->dimensions().at(0)->getN();
609  l = ncdf.lookupVar(fcFlybyName.name())->dimensions().at(1)->getN();
610  flybyNames.resize(n);
611  for (int i=0; i<n; i++)
612  flybyNames[i] = QString::fromLatin1(c + l*i, l);
613  }
614  else
615  {
616  flybyFlags.clear();
618  "::loadCalibrations(): cannot find " + fcFlybyName.name() +
619  " variable in the file " + ncdf.getFileName());
620  };
621  //
622  c = ncdf.lookupVar(fcCalStationName.name())->data2char();
623  n = ncdf.lookupVar(fcCalStationName.name())->dimensions().at(0)->getN();
624  l = ncdf.lookupVar(fcCalStationName.name())->dimensions().at(1)->getN();
625  calSiteNames.resize(n);
626  for (int i=0; i<n; i++)
627  calSiteNames[i] = QString::fromLatin1(c + l*i, l);
628  //
629  if (ncdf.lookupVar(fcObsCalName.name()))
630  {
631  c = ncdf.lookupVar(fcObsCalName.name())->data2char();
632  n = ncdf.lookupVar(fcObsCalName.name())->dimensions().at(0)->getN();
633  l = ncdf.lookupVar(fcObsCalName.name())->dimensions().at(1)->getN();
634  obsCalNames.resize(n);
635  for (int i=0; i<n; i++)
636  obsCalNames[i] = QString::fromLatin1(c + l*i, l);
637  }
638  else
639  {
640  obsCalNames.clear();
642  "::loadCalibrations(): cannot find " + fcObsCalName.name() +
643  " variable in the file " + ncdf.getFileName());
644  };
645  //
647  "::loadCalibrations(): data loaded successfully from " + ncdf.getFileName() );
648  return true;
649 };
650 
651 
652 
653 //
654 bool SgVgosDb::loadSelectionStatus(QVector<int> &sourcesSelection,
655  QVector< QVector<int> > &baselinesSelection)
656 {
658  if (var.isEmpty())
659  {
661  "::loadSelectionStatus(): the vgosDb variable SelectionStatus is empty");
662  return false;
663  };
664  SgNetCdf ncdf(path2RootDir_ + "/" + var.getFileName());
665  ncdf.getData();
666  if (!checkFormat(fcfSelectionStatus, ncdf))
667  {
669  "::loadSelectionStatus(): format check failed");
670  return false;
671  };
672  const short *pS=ncdf.lookupVar(fcSrcSelectionFlag.name())->data2short();
673  const short *pB=ncdf.lookupVar(fcBlnSelectionFlag.name())->data2short();
674  int nS=ncdf.lookupVar(fcSrcSelectionFlag.name())->dimensions().at(0)->getN();
675  int nB=ncdf.lookupVar(fcBlnSelectionFlag.name())->dimensions().at(0)->getN();
676  sourcesSelection.resize(nS);
677  for (int i=0; i<nS; i++)
678  sourcesSelection[i] = pS[i];
679  baselinesSelection.resize(nB);
680  for (int i=0; i<nB; i++)
681  {
682  baselinesSelection[i].resize(nB);
683  for (int j=0; j<nB; j++)
684  baselinesSelection[i][j] = pB[nB*i + j];
685  };
686  //
688  "::loadSelectionStatus(): data loaded successfully from " + ncdf.getFileName() );
689  return true;
690 };
691 
692 
693 
694 //
695 bool SgVgosDb::loadSolveWeights(QVector<QString> &baselineNames, SgMatrix* &groupBlWeights)
696 {
698  {
700  "::loadSolveWeights(): the vgosDb variable GroupBLWeights is empty");
701  return false;
702  };
704  ncdf.getData();
705  //
706  if (!checkFormat(fcfGroupBLWeights, ncdf))
707  {
709  "::loadSolveWeights(): format check failed");
710  return false;
711  };
712  // plus additional check:
713  SgNcdfVariable *vW, *vN;
714  vW = ncdf.lookupVar(fcGroupBLWeights .name());
715  vN = ncdf.lookupVar(fcGroupBLWeightName.name());
716  if (vW->dimensions().at(1)->getN() != vN->dimensions().at(0)->getN())
717  {
719  "::loadSolveWeights(): dimensions mismatch");
720  return false;
721  };
722  const double *pW=vW->data2double();
723  const char *pN=vN->data2char();
724  int n =vW->dimensions().at(1)->getN();
725  int l =vN->dimensions().at(2)->getN();
726  baselineNames.resize(n);
727  for (int i=0; i<n; i++)
728  baselineNames[i] =
729  QString::fromLatin1(pN + 2*l*i, l) + ":" + QString::fromLatin1(pN + 2*l*i + l, l);
730  groupBlWeights = new SgMatrix(2, n);
731  for (int i=0; i<n; i++)
732  {
733  groupBlWeights->setElement(0, i, pW[ i]);
734  groupBlWeights->setElement(1, i, pW[n + i]);
735  };
736  //
738  "::loadSolveWeights(): data loaded successfully from " + ncdf.getFileName() );
739  return true;
740 };
741 
742 
743 
744 //
745 bool SgVgosDb::loadClockBreaks(QVector<QString> &cbNames, QVector<SgMJD> &cbEpochs,
746  QVector<int> &cbFlags)
747 {
748  if (vClockBreak_.isEmpty())
749  {
751  "::loadClockBreaks(): the vgosDb variable ClockBreak is empty, no clock breaks yet");
752  return false;
753  };
755  ncdf.getData();
756  if (!checkFormat(fcfClockBreak, ncdf))
757  {
759  "::loadClockBreaks(): format check failed");
760  return false;
761  };
762  // need checking for dimensions...
763  const short *pF=ncdf.lookupVar(fcClockBreakFlag .name())->data2short();
764  const char *pN=ncdf.lookupVar(fcClockBreakSite .name())->data2char();
765  const double *pT=ncdf.lookupVar(fcClockBreakEpoch.name())->data2double();
766  int n =ncdf.lookupVar(fcClockBreakEpoch.name())->dimensions().at(0)->getN();
767  int l =ncdf.lookupVar(fcClockBreakSite .name())->dimensions().last()->getN();
768  cbNames.resize(n);
769  cbEpochs.resize(n);
770  cbFlags.resize(n);
771  for (int i=0; i<n; i++)
772  {
773  cbNames[i] = QString::fromLatin1(pN + l*i, l);
774  cbEpochs[i] = SgMJD(pT[i]<2000000.0?pT[i]:pT[i]-2400000.5);
775  cbFlags[i] = pF[i];
776  };
777  //
779  "::loadClockBreaks(): data loaded successfully from " + ncdf.getFileName() );
780  return true;
781 };
782 
783 
784 
785 //
786 bool SgVgosDb::loadLeapSecond(int &leapSeconds)
787 {
788  if (vLeapSecond_.isEmpty())
789  {
791  "::loadLeapSecond(): the vgosDb variable LeapSecond is empty");
792  return false;
793  };
795  ncdf.getData();
796  if (!checkFormat(fcfLeapSecondIn, ncdf))
797  {
799  "::loadLeapSecond(): format check failed");
800  return false;
801  };
802  if (ncdf.lookupVar(fcTai_Utc.name()))
803  {
804  leapSeconds = *(ncdf.lookupVar(fcTai_Utc.name())->data2double() + 1);
805  have2redoLeapSecond_ = true;
807  "::loadLeapSecond(): found data in the obsolete format, leapSeconds = " +
808  QString("").setNum(leapSeconds));
809  }
810  else if (ncdf.lookupVar(fcLeapSecond.name()))
811  {
812  leapSeconds = *(ncdf.lookupVar(fcLeapSecond.name())->data2short());
813  have2redoLeapSecond_ = false;
815  "::loadLeapSecond(): found data in the current format, leapSeconds = " +
816  QString("").setNum(leapSeconds));
817  }
818  else
819  {
820  leapSeconds = 0;
821  have2redoLeapSecond_ = true;
823  "::loadLeapSecond(): cannot find anything familiar");
824  };
825  //
827  "::loadLeapSecond(): data loaded successfully from " + ncdf.getFileName() );
828  return true;
829 };
830 
831 
832 
833 //
834 bool SgVgosDb::loadCalcInfo(int &tidalUt1, double &calcVersionValue)
835 {
837  if (var.isEmpty())
838  {
840  "::loadCalcInfo(): the vgosDb variable CalcInfo is empty");
841  return false;
842  };
843  SgNetCdf ncdf(path2RootDir_ + "/" + var.getFileName());
844  ncdf.getData();
845  if (!checkFormat(fcfCalcInfo, ncdf))
846  {
848  "::loadCalcInfo(): format check failed");
849  return false;
850  };
851  const short *pUt1C=ncdf.lookupVar(fcTidalUt1Control.name())->data2short();
852  const double *pCver=ncdf.lookupVar(fcCalcVersion.name())->data2double();
853  tidalUt1 = *pUt1C;
854  calcVersionValue = *pCver;
856  "::loadCalcInfo(): data loaded successfully from " + ncdf.getFileName());
857  return true;
858 };
859 
860 
861 
862 //
864 {
866  if (var.isEmpty())
867  {
869  "::loadCalcInfo(): the vgosDb variable CalcInfo is empty");
870  return false;
871  };
872  SgNetCdf ncdf(path2RootDir_ + "/" + var.getFileName());
873  ncdf.getData();
874  if (!checkFormat(fcfCalcInfo, ncdf))
875  {
877  "::loadCalcInfo(): format check failed");
878  return false;
879  };
880 
881  //
882  int l, m;
883  const short *pTidUt1C=ncdf.lookupVar(fcTidalUt1Control.name())?
884  ncdf.lookupVar(fcTidalUt1Control.name())->data2short():NULL;
885  const double *pCver=ncdf.lookupVar(fcCalcVersion.name())?
886  ncdf.lookupVar(fcCalcVersion.name())->data2double():NULL;
887  //
888  const char *pCtrlN=ncdf.lookupVar(fcCalcControlNames .name())?
889  ncdf.lookupVar(fcCalcControlNames .name())->data2char():NULL;
890  const short *pCtrlF=ncdf.lookupVar(fcCalcControlValues .name())?
891  ncdf.lookupVar(fcCalcControlValues .name())->data2short():NULL;
892  const char *pAtmM=ncdf.lookupVar(fcATMMessage .name())?
893  ncdf.lookupVar(fcATMMessage .name())->data2char():NULL;
894  const char *pAtmC=ncdf.lookupVar(fcATMControl .name())?
895  ncdf.lookupVar(fcATMControl .name())->data2char():NULL;
896  const char *pAxoM=ncdf.lookupVar(fcAxisOffsetMessage .name())?
897  ncdf.lookupVar(fcAxisOffsetMessage .name())->data2char():NULL;
898  const char *pAxoC=ncdf.lookupVar(fcAxisOffsetControl .name())?
899  ncdf.lookupVar(fcAxisOffsetControl .name())->data2char():NULL;
900  const char *pEtdM=ncdf.lookupVar(fcEarthTideMessage .name())?
901  ncdf.lookupVar(fcEarthTideMessage .name())->data2char():NULL;
902  const char *pEtdC=ncdf.lookupVar(fcEarthTideControl .name())?
903  ncdf.lookupVar(fcEarthTideControl .name())->data2char():NULL;
904  const char *pPtdM=ncdf.lookupVar(fcPoleTideMessage .name())?
905  ncdf.lookupVar(fcPoleTideMessage .name())->data2char():NULL;
906  const char *pPtdC=ncdf.lookupVar(fcPoleTideControl .name())?
907  ncdf.lookupVar(fcPoleTideControl .name())->data2char():NULL;
908  const char *pNutM=ncdf.lookupVar(fcNutationMessage .name())?
909  ncdf.lookupVar(fcNutationMessage .name())->data2char():NULL;
910  const char *pNutC=ncdf.lookupVar(fcNutationControl .name())?
911  ncdf.lookupVar(fcNutationControl .name())->data2char():NULL;
912  const char *pOtdM=ncdf.lookupVar(fcOceanMessage .name())?
913  ncdf.lookupVar(fcOceanMessage .name())->data2char():NULL;
914  const char *pOtdC=ncdf.lookupVar(fcOceanControl .name())?
915  ncdf.lookupVar(fcOceanControl .name())->data2char():NULL;
916  const char *pAtiM=ncdf.lookupVar(fcATIMessage .name())?
917  ncdf.lookupVar(fcATIMessage .name())->data2char():NULL;
918  const char *pAtiC=ncdf.lookupVar(fcATIControl .name())?
919  ncdf.lookupVar(fcATIControl .name())->data2char():NULL;
920  const char *pCtiM=ncdf.lookupVar(fcCTIMessage .name())?
921  ncdf.lookupVar(fcCTIMessage .name())->data2char():NULL;
922  const char *pCtiC=ncdf.lookupVar(fcCTIControl .name())?
923  ncdf.lookupVar(fcCTIControl .name())->data2char():NULL;
924  const char *pPlxM=ncdf.lookupVar(fcParallaxMessage .name())?
925  ncdf.lookupVar(fcParallaxMessage .name())->data2char():NULL;
926  const char *pPlxC=ncdf.lookupVar(fcParallaxControl .name())?
927  ncdf.lookupVar(fcParallaxControl .name())->data2char():NULL;
928  const char *pStrM=ncdf.lookupVar(fcStarMessage .name())?
929  ncdf.lookupVar(fcStarMessage .name())->data2char():NULL;
930  const char *pStrC=ncdf.lookupVar(fcStarControl .name())?
931  ncdf.lookupVar(fcStarControl .name())->data2char():NULL;
932  const char *pRelM=ncdf.lookupVar(fcTheoryMessage .name())?
933  ncdf.lookupVar(fcTheoryMessage .name())->data2char():NULL;
934  const char *pRelC=ncdf.lookupVar(fcRelativityControl .name())?
935  ncdf.lookupVar(fcRelativityControl .name())->data2char():NULL;
936  const char *pSitM=ncdf.lookupVar(fcSiteMessage .name())?
937  ncdf.lookupVar(fcSiteMessage .name())->data2char():NULL;
938  const char *pFdHM=ncdf.lookupVar(fcFeedhornMessage .name())?
939  ncdf.lookupVar(fcFeedhornMessage .name())->data2char():NULL;
940  const char *pEphM=ncdf.lookupVar(fcPepMessage .name())?
941  ncdf.lookupVar(fcPepMessage .name())->data2char():NULL;
942  const char *pPxyC=ncdf.lookupVar(fcWobbleControl .name())?
943  ncdf.lookupVar(fcWobbleControl .name())->data2char():NULL;
944  const char *pUt1C=ncdf.lookupVar(fcUT1Control .name())?
945  ncdf.lookupVar(fcUT1Control .name())->data2char():NULL;
946  const char *pOSts=ncdf.lookupVar(fcOceanStationsFlag .name())?
947  ncdf.lookupVar(fcOceanStationsFlag .name())->data2char():NULL;
948  const double *pRelD=ncdf.lookupVar(fcRelativityData .name())?
949  ncdf.lookupVar(fcRelativityData .name())->data2double():NULL;
950  const double *pPrcD=ncdf.lookupVar(fcPrecessionData .name())?
951  ncdf.lookupVar(fcPrecessionData .name())->data2double():NULL;
952  const double *pEtdD=ncdf.lookupVar(fcEarthTideData .name())?
953  ncdf.lookupVar(fcEarthTideData .name())->data2double():NULL;
954  const double *pUt1E=ncdf.lookupVar(fcUT1EPOCH .name())?
955  ncdf.lookupVar(fcUT1EPOCH .name())->data2double():NULL;
956  const double *pWobE=ncdf.lookupVar(fcWOBEPOCH .name())?
957  ncdf.lookupVar(fcWOBEPOCH .name())->data2double():NULL;
958  const double *pSitZ=ncdf.lookupVar(fcSiteZenithDelay .name())?
959  ncdf.lookupVar(fcSiteZenithDelay .name())->data2double():NULL;
960 
961  const double *pOptc=ncdf.lookupVar(fcOceanPoleTideCoef .name())?
962  ncdf.lookupVar(fcOceanPoleTideCoef .name())->data2double():NULL;
963  const double *pOvPh=ncdf.lookupVar(fcOceanUpPhase .name())?
964  ncdf.lookupVar(fcOceanUpPhase .name())->data2double():NULL;
965  const double *pOhPh=ncdf.lookupVar(fcOceanHorizontalPhase .name())?
966  ncdf.lookupVar(fcOceanHorizontalPhase .name())->data2double():NULL;
967  const double *pOvAm=ncdf.lookupVar(fcOceanUpAmp .name())?
968  ncdf.lookupVar(fcOceanUpAmp .name())->data2double():NULL;
969  const double *pOhAm=ncdf.lookupVar(fcOceanHorizontalAmp .name())?
970  ncdf.lookupVar(fcOceanHorizontalAmp .name())->data2double():NULL;
971 
972  //
973  //
974  if (pTidUt1C)
975  calcInfo.setFlagTidalUt1(*pTidUt1C);
976  if (pCver)
977  calcInfo.setDversion(*pCver);
978  //
979  if (pCtrlN && pCtrlF)
980  {
981  l = ncdf.lookupVar(fcCalcControlNames.name())->dimensions().at(0)->getN();
982  m = ncdf.lookupVar(fcCalcControlNames.name())->dimensions().at(1)->getN();
983  if (l != ncdf.lookupVar(fcCalcControlValues.name())->dimensions().at(0)->getN())
985  "::loadCalcInfo(): the dimensions of CalcControlNames and CalcControlValues mismatch,"
986  " the file is \"" + ncdf.getFileName() + "\"");
987  else
988  {
989  QList<int>* flagVals=&calcInfo.controlFlagValues();
990  QList<QString>* flagNames=&calcInfo.controlFlagNames();
991  flagVals->clear();
992  flagNames->clear();
993  for (int i=0; i<l; i++)
994  {
995  flagVals->append(pCtrlF[i]);
996  flagNames->append(QString::fromLatin1(pCtrlN + m*i, m) );
997  };
998  };
999  };
1000  //
1001  if (pAtmM && pAtmC)
1002  {
1003  calcInfo.troposphere().setDefinition(QString::fromLatin1(pAtmM,
1004  ncdf.lookupVar(fcATMMessage.name())->dimensions().at(0)->getN() ));
1005  calcInfo.troposphere().setControlFlag(QString::fromLatin1(pAtmC,
1006  ncdf.lookupVar(fcATMControl.name())->dimensions().at(0)->getN() ));
1007  };
1008  //
1009  if (pAxoM && pAxoC)
1010  {
1011  calcInfo.axisOffset().setDefinition(QString::fromLatin1(pAxoM,
1012  ncdf.lookupVar(fcAxisOffsetMessage.name())->dimensions().at(0)->getN() ));
1013  calcInfo.axisOffset().setControlFlag(QString::fromLatin1(pAxoC,
1014  ncdf.lookupVar(fcAxisOffsetControl.name())->dimensions().at(0)->getN() ));
1015  };
1016  //
1017  if (pEtdM && pEtdC)
1018  {
1019  calcInfo.earthTide().setDefinition(QString::fromLatin1(pEtdM,
1020  ncdf.lookupVar(fcEarthTideMessage.name())->dimensions().at(0)->getN() ));
1021  calcInfo.earthTide().setControlFlag(QString::fromLatin1(pEtdC,
1022  ncdf.lookupVar(fcEarthTideControl.name())->dimensions().at(0)->getN() ));
1023  };
1024  //
1025  if (pPtdM && pPtdC)
1026  {
1027  calcInfo.poleTide().setDefinition(QString::fromLatin1(pPtdM,
1028  ncdf.lookupVar(fcPoleTideMessage.name())->dimensions().at(0)->getN() ));
1029  calcInfo.poleTide().setControlFlag(QString::fromLatin1(pPtdC,
1030  ncdf.lookupVar(fcPoleTideControl.name())->dimensions().at(0)->getN() ));
1031  };
1032 
1033  //
1034  if (pNutM && pNutC)
1035  {
1036  calcInfo.nutation().setDefinition(QString::fromLatin1(pNutM,
1037  ncdf.lookupVar(fcNutationMessage.name())->dimensions().at(0)->getN() ));
1038  calcInfo.nutation().setControlFlag(QString::fromLatin1(pNutC,
1039  ncdf.lookupVar(fcNutationControl.name())->dimensions().at(0)->getN() ));
1040  };
1041  //
1042  if (pOtdM && pOtdC)
1043  {
1044  calcInfo.oceanLoading().setDefinition(QString::fromLatin1(pOtdM,
1045  ncdf.lookupVar(fcOceanMessage.name())->dimensions().at(0)->getN() ));
1046  calcInfo.oceanLoading().setControlFlag(QString::fromLatin1(pOtdC,
1047  ncdf.lookupVar(fcOceanControl.name())->dimensions().at(0)->getN() ));
1048  };
1049  //
1050  if (pAtiM && pAtiC)
1051  {
1052  calcInfo.atomicTime().setDefinition(QString::fromLatin1(pAtiM,
1053  ncdf.lookupVar(fcATIMessage.name())->dimensions().at(0)->getN() ));
1054  calcInfo.atomicTime().setControlFlag(QString::fromLatin1(pAtiC,
1055  ncdf.lookupVar(fcATIControl.name())->dimensions().at(0)->getN() ));
1056  };
1057  //
1058  if (pCtiM && pCtiC)
1059  {
1060  calcInfo.coordinateTime().setDefinition(QString::fromLatin1(pCtiM,
1061  ncdf.lookupVar(fcCTIMessage.name())->dimensions().at(0)->getN() ));
1062  calcInfo.coordinateTime().setControlFlag(QString::fromLatin1(pCtiC,
1063  ncdf.lookupVar(fcCTIControl.name())->dimensions().at(0)->getN() ));
1064  };
1065  //
1066  if (pPlxM && pPlxC)
1067  {
1068  calcInfo.parallax().setDefinition(QString::fromLatin1(pPlxM,
1069  ncdf.lookupVar(fcParallaxMessage.name())->dimensions().at(0)->getN() ));
1070  calcInfo.parallax().setControlFlag(QString::fromLatin1(pPlxC,
1071  ncdf.lookupVar(fcParallaxControl.name())->dimensions().at(0)->getN() ));
1072  };
1073  //
1074  if (pStrM && pStrC)
1075  {
1076  calcInfo.star().setDefinition(QString::fromLatin1(pStrM,
1077  ncdf.lookupVar(fcStarMessage.name())->dimensions().at(0)->getN() ));
1078  calcInfo.star().setControlFlag(QString::fromLatin1(pStrC,
1079  ncdf.lookupVar(fcStarControl.name())->dimensions().at(0)->getN() ));
1080  };
1081  //
1082  if (pRelM && pRelC)
1083  {
1084  calcInfo.relativity().setDefinition(QString::fromLatin1(pRelM,
1085  ncdf.lookupVar(fcTheoryMessage.name())->dimensions().at(0)->getN() ));
1086  calcInfo.relativity().setControlFlag(QString::fromLatin1(pRelC,
1087  ncdf.lookupVar(fcRelativityControl.name())->dimensions().at(0)->getN() ));
1088  };
1089  if (pSitM)
1090  calcInfo.site().setDefinition(QString::fromLatin1(pSitM,
1091  ncdf.lookupVar(fcSiteMessage.name())->dimensions().at(0)->getN()));
1092  if (pFdHM)
1093  calcInfo.feedHorn().setDefinition(QString::fromLatin1(pFdHM,
1094  ncdf.lookupVar(fcFeedhornMessage.name())->dimensions().at(0)->getN()));
1095  if (pEphM)
1096  calcInfo.ephemeris().setDefinition(QString::fromLatin1(pEphM,
1097  ncdf.lookupVar(fcPepMessage.name())->dimensions().at(0)->getN()));
1098  if (pPxyC)
1099  calcInfo.polarMotion().setControlFlag(QString::fromLatin1(pPxyC,
1100  ncdf.lookupVar(fcWobbleControl.name())->dimensions().at(0)->getN()));
1101  if (pUt1C)
1102  calcInfo.ut1().setControlFlag(QString::fromLatin1(pUt1C,
1103  ncdf.lookupVar(fcUT1Control.name())->dimensions().at(0)->getN()));
1104  //
1105  if (pOSts)
1106  {
1107  int nOcnLdSts, lOcnLdSts;
1108  nOcnLdSts = ncdf.lookupVar(fcOceanStationsFlag.name())->dimensions().at(0)->getN();
1109  lOcnLdSts = ncdf.lookupVar(fcOceanStationsFlag.name())->dimensions().at(1)->getN();
1110 
1111  QList<QString> *statuses=&calcInfo.oLoadStationStatus();
1112  statuses->clear();
1113  for (int i=0; i<nOcnLdSts; i++)
1114  statuses->append(QString::fromLatin1(pOSts + lOcnLdSts*i, lOcnLdSts));
1115  };
1116  //
1117  if (pRelD)
1118  calcInfo.setRelativityData(*pRelD);
1119  if (pPrcD)
1120  calcInfo.setPrecessionData(*pPrcD);
1121  if (pEtdD)
1122  {
1123  calcInfo.setEarthTideData(0, pEtdD[0]);
1124  calcInfo.setEarthTideData(1, pEtdD[1]);
1125  calcInfo.setEarthTideData(2, pEtdD[2]);
1126  };
1127  //
1128  if (pUt1E)
1129  {
1130  m = ncdf.lookupVar(fcUT1EPOCH.name())->dimensions().at(1)->getN();
1131  calcInfo.prepareUt1InterpData(m);
1132  for (int i=0; i<m; i++)
1133  for (int j=0; j<2; j++)
1134  calcInfo.ut1InterpData()->setElement(i, j, pUt1E[2*i + j]);
1135  };
1136  //
1137  if (pWobE)
1138  {
1139  m = ncdf.lookupVar(fcWOBEPOCH.name())->dimensions().at(1)->getN();
1140  calcInfo.prepareWobInterpData(m);
1141  for (int i=0; i<m; i++)
1142  for (int j=0; j<2; j++)
1143  calcInfo.wobInterpData()->setElement(i, j, pWobE[2*i + j]);
1144  };
1145  //
1146  if (pSitZ)
1147  {
1148  m = ncdf.lookupVar(fcSiteZenithDelay.name())->dimensions().at(0)->getN();
1149  calcInfo.siteZenDelays().clear();
1150  for (int i=0; i<m; i++)
1151  calcInfo.siteZenDelays().append(pSitZ[i]);
1152  };
1153  //
1154  if (pOvPh && pOhPh && pOvAm && pOhAm && pOptc)
1155  {
1156  m = ncdf.lookupVar(fcOceanPoleTideCoef.name())->dimensions().at(0)->getN();
1157  l = ncdf.lookupVar(fcOceanUpPhase.name())->dimensions().at(1)->getN();
1158 
1159  if (m != ncdf.lookupVar(fcOceanUpPhase.name())->dimensions().at(0)->getN())
1161  "::loadCalcInfo(): dimensions of OceanPoleTideCoef and OceanUpPhase mismatch");
1162  else if (m != ncdf.lookupVar(fcOceanHorizontalPhase.name())->dimensions().at(0)->getN())
1164  "::loadCalcInfo(): dimensions of OceanPoleTideCoef and OceanHorizontalPhase mismatch");
1165  else if (m != ncdf.lookupVar(fcOceanUpAmp.name())->dimensions().at(0)->getN())
1167  "::loadCalcInfo(): dimensions of OceanPoleTideCoef and OceanUpAmp mismatch");
1168  else if (m != ncdf.lookupVar(fcOceanHorizontalAmp.name())->dimensions().at(0)->getN())
1170  "::loadCalcInfo(): dimensions of OceanPoleTideCoef and OceanHorizontalAmp mismatch");
1171  else if (m != calcInfo.stations().size())
1173  "::loadCalcInfo(): dimensions of OceanPoleTideCoef and number of stations mismatch");
1174  else if (l != 11)
1176  "::loadCalcInfo(): unexpected dimension of OceanUpPhase");
1177  else if (l != ncdf.lookupVar(fcOceanHorizontalPhase.name())->dimensions().at(2)->getN())
1179  "::loadCalcInfo(): unexpected dimension(2) of OceanHorizontalPhase");
1180  else if (l != ncdf.lookupVar(fcOceanUpAmp.name())->dimensions().at(1)->getN())
1182  "::loadCalcInfo(): unexpected dimension of OceanUpAmp");
1183  else if (l != ncdf.lookupVar(fcOceanHorizontalAmp.name())->dimensions().at(2)->getN())
1185  "::loadCalcInfo(): unexpected dimension(2) of OceanHorizontalAmp");
1186  else if (2 != ncdf.lookupVar(fcOceanHorizontalPhase.name())->dimensions().at(1)->getN())
1188  "::loadCalcInfo(): unexpected dimension(1) of OceanHorizontalPhase");
1189  else if (2 != ncdf.lookupVar(fcOceanHorizontalAmp.name())->dimensions().at(1)->getN())
1191  "::loadCalcInfo(): unexpected dimension(1) of OceanHorizontalAmp");
1192  else
1193  {
1194  for (int i=0; i<m; i++)
1195  {
1196  SgVlbiStationInfo *si=calcInfo.stations().at(i);
1197  if (si)
1198  {
1199  for (int j=0; j<l; j++)
1200  {
1201  si->setOLoadPhase(j, 0, pOvPh[l*i + j]);
1202  si->setOLoadPhase(j, 1, pOhPh[2*l*i + j]);
1203  si->setOLoadPhase(j, 2, pOhPh[2*l*i + l + j]);
1204 
1205  si->setOLoadAmplitude(j, 0, pOvAm[l*i + j]);
1206  si->setOLoadAmplitude(j, 1, pOhAm[2*l*i + j]);
1207  si->setOLoadAmplitude(j, 2, pOhAm[2*l*i + l + j]);
1208  };
1209  for (int j=0; j<6; j++)
1210  si->setOptLoadCoeff(j, pOptc[6*i + j]);
1211  }
1212  else
1214  "::loadCalcInfo(): the station # " + QString("").setNum(i) + " is NULL");
1215  };
1216  };
1217  };
1218  //
1220  "::loadCalcInfo(): data loaded successfully from " + ncdf.getFileName());
1221  return true;
1222 };
1223 
1224 
1225 
1226 //
1227 bool SgVgosDb::loadMiscCable(QMap<QString, QString>& cableSignByKey)
1228 {
1230  if (var.isEmpty())
1231  {
1233  "::loadMiscCable(): the vgosDb variable MiscCable is empty");
1234  return false;
1235  };
1236  SgNetCdf ncdf(path2RootDir_ + "/" + var.getFileName());
1237  ncdf.getData();
1238  if (!checkFormat(fcfMiscCable, ncdf))
1239  {
1241  "::loadMiscCable(): format check failed");
1242  return false;
1243  };
1244  if (!ncdf.lookupVar(fcCableSign.name())) // it is possible, no signs at all..
1245  {
1247  "::loadMiscCable(): the vgosDb variable " + fcCableSign.name() + " missed in the file");
1248  return false;
1249  };
1250  QString sSign, sKey;
1251  int lSgns, nStns, lStns;
1252  const char *pSgn=ncdf.lookupVar(fcCableSign.name())->data2char();
1253  const char *pStn=ncdf.lookupVar(fcCableStnName.name())->data2char();
1254  lSgns = ncdf.lookupVar(fcCableSign.name())->dimensions().at(0)->getN();
1255  nStns = ncdf.lookupVar(fcCableStnName.name())->dimensions().at(0)->getN();
1256  lStns = ncdf.lookupVar(fcCableStnName.name())->dimensions().at(1)->getN();
1257 
1258  for (int i=0; i<nStns; i++)
1259  {
1260  if (2*i < lSgns)
1261  sSign = QString::fromLatin1(pSgn + 2*i, 1); // take only first char: CableSign = "+ - - + + +"
1262  else
1263  sSign = "?";
1264  sKey = QString::fromLatin1(pStn + lStns*i, lStns);
1265  if (sKey.simplified().size()> 1 && 0<*(pStn + lStns*i))
1266  {
1267  if (!cableSignByKey.contains(sKey))
1268  cableSignByKey.insert(sKey, sSign);
1269  else
1270  {
1272  "::loadMiscCable(): got a duplicated stn name [" + sKey + "](" + sSign +
1273  "); previous value is [" + cableSignByKey.key(sKey) + "](" + cableSignByKey.value(sKey) +
1274  ") from " + ncdf.getFileName());
1275  };
1276  };// everything else is just garbage
1277  };
1278  //
1280  "::loadMiscCable(): data loaded successfully from " + ncdf.getFileName());
1281  return true;
1282 };
1283 
1284 
1285 
1286 //
1287 bool SgVgosDb::loadMiscFourFit(const QString& band,
1288  QVector<QString>& fourfitControlFile, QVector<QString>& fourfitCommand,
1289  QVector<int>& numLags, QVector<double>& apLength)
1290 {
1291  SgVdbVariable *var=NULL;
1292  double fmtVer=inputFormatVersion_;
1293 
1294  if (band.size())
1295  {
1296  if (!bandDataByName_.contains(band))
1297  {
1299  "::loadMiscFourFit(): the band \"" + band + "\" is not registered");
1300  return false;
1301  };
1302  var = &bandDataByName_[band].vMiscFourFit_;
1303  }
1304  else
1305  var = &vMiscFourFit_;
1306 
1307  //
1308  if (var->isEmpty())
1309  {
1310  if (band.size())
1312  "::loadMiscFourFit(): the vgosDb variable MiscFourFit" +
1313  (band.size()?" for the band [" + band + "]" :"") + " is empty");
1314  else
1316  "::loadMiscFourFit(): the vgosDb variable MiscFourFit is empty");
1317  return false;
1318  };
1319 
1320  FmtChkVar *fcNumLagsUsed, *fcFourFitCmdCString, *fcFourfitControlFile, *fcAplength;
1321  QList<SgVgosDb::FmtChkVar*> *fcfMiscFourFit;
1322 // QList<SgVgosDb::FmtChkVar*> fcfMiscFourFit;
1323  int strIdx;
1324 
1325  // get data and figure out the format :-/
1326 /*
1327  // check content first:
1328  SgNcdfVariable *svcV;
1329  if ( (svcV=ncdf.lookupServiceVar(SgNetCdf::svcVgosDbVersion.toUpper())) )
1330  {
1331  const char *c=svcV->data2char();
1332  int l=svcV->dimensions().at(0)->getN();
1333  QString fmtVersion(QString::fromLatin1(c, l));
1334  // quick and dirty:
1335  if (fmtVersion.left(5)==QString("1.004") && fmtVer<=1.002)
1336  {
1337  fcNumLagsUsed = &fcNumLagsUsed_v1004;
1338  fcFourFitCmdCString = &fcFourFitCmdCString_v1004;
1339  fcFourfitControlFile = &fcFourfitControlFile_v1004;
1340  fcAplength = &fcAplength_v1004;
1341  fcfMiscFourFit.clear();
1342  fcfMiscFourFit << fcFourFitCmdCString << fcNumLagsUsed << fcFourfitControlFile << fcAplength;
1343  strIdx = 0;
1344  fmtVer = 1.004;
1345  logger->write(SgLogger::WRN, SgLogger::IO_NCDF, className() +
1346  "::loadMiscFourFit(): format version has been corrected to 1.004");
1347  };
1348  }
1349  else
1350  logger->write(SgLogger::WRN, SgLogger::IO_NCDF, className() +
1351  "::loadMiscFourFit(): cannot find service variable \"" + SgNetCdf::svcVgosDbVersion +
1352  "\" in " + ncdf.getFileName());
1353  */
1354 
1355  SgNetCdf ncdf(path2RootDir_ + "/" + var->getFileName());
1356  ncdf.getData();
1357 
1359  if (ncdfVar)
1360  {
1361  if (ncdfVar->dimensions().size() == 2) // ver 1.002:
1362  {
1363  fcNumLagsUsed = &fcNumLagsUsed_v1002;
1364  fcFourFitCmdCString = &fcFourFitCmdCString_v1002;
1365  fcFourfitControlFile = &fcFourfitControlFile_v1002;
1366  fcAplength = &fcAplength_v1002;
1367  fcfMiscFourFit = &fcfMiscFourFit_v1002;
1368  strIdx = 1;
1369  if (1.002 < fmtVer)
1370  {
1372  "::loadMiscFourFit(): the input format version has been adjusted to 1.002");
1373  fmtVer = 1.002;
1374  };
1375  }
1376  else if (ncdfVar->dimensions().size() == 1) // ver 1.004:
1377  {
1378  fcNumLagsUsed = &fcNumLagsUsed_v1004;
1379  fcFourFitCmdCString = &fcFourFitCmdCString_v1004;
1380  fcFourfitControlFile = &fcFourfitControlFile_v1004;
1381  fcAplength = &fcAplength_v1004;
1382  fcfMiscFourFit = &fcfMiscFourFit_v1004;
1383  strIdx = 0;
1384  if (fmtVer <= 1.002)
1385  {
1387  "::loadMiscFourFit(): the input format version has been adjusted to 1.004");
1388  fmtVer = 1.004;
1389  };
1390  }
1391  else
1392  {
1393  strIdx = -1;
1395  "::loadMiscFourFit(): get unknown version of the file, number of dimensions is " +
1396  QString("").setNum(ncdfVar->dimensions().size()));
1397  return false;
1398  };
1399  }
1400  else
1401  {
1402  strIdx = -1;
1404  "::loadMiscFourFit(): unexpected content of the file: the variable \"" +
1405  fcFourFitCmdCString_v1002.name() + "\" is not found");
1406  return false;
1407  };
1408  //
1409  //
1410  //
1411  //
1412  //
1413  if (!checkFormat(*fcfMiscFourFit, ncdf))
1414  {
1416  "::loadMiscFourFit(): format check failed");
1417  return false;
1418  };
1419 
1420  fourfitControlFile.resize(numOfObs_);
1421  fourfitCommand.resize(numOfObs_);
1422  numLags.resize(numOfObs_);
1423  apLength.resize(numOfObs_);
1424 
1425  int lFFcmd, lFFctrl;
1426 /*
1427  const short *pNumLags=ncdf.lookupVar(fcNumLagsUsed_v1002.name())->data2short();
1428  const char *pFFcmd=ncdf.lookupVar(fcFourFitCmdCString_v1002.name())->data2char();
1429  const char *pFFctrl=ncdf.lookupVar(fcFourfitControlFile_v1002.name())->data2char();
1430  const double *pApLength=ncdf.lookupVar(fcAplength_v1002.name())->data2double();
1431 
1432  lFFcmd = ncdf.lookupVar(fcFourFitCmdCString_v1002.name())->dimensions().at(1)->getN();
1433  lFFctrl = ncdf.lookupVar(fcFourfitControlFile_v1002.name())->dimensions().at(1)->getN();
1434 */
1435  const short *pNumLags=ncdf.lookupVar(fcNumLagsUsed->name())->data2short();
1436  const char *pFFcmd=ncdf.lookupVar(fcFourFitCmdCString->name())->data2char();
1437  const char *pFFctrl=ncdf.lookupVar(fcFourfitControlFile->name())->data2char();
1438  const double *pApLength=ncdf.lookupVar(fcAplength->name())->data2double();
1439 
1440 // const int *pCppSoft=NULL;
1441 // if (ncdf.lookupVar(fcCorrPostProcSoftware.name()))
1442 // pCppSoft = ncdf.lookupVar(fcCorrPostProcSoftware.name())->data2int();
1443 
1444  lFFcmd = ncdf.lookupVar(fcFourFitCmdCString->name())->dimensions().at(strIdx)->getN();
1445  lFFctrl = ncdf.lookupVar(fcFourfitControlFile->name())->dimensions().at(strIdx)->getN();
1446 
1447  for (int i=0; i<numOfObs_; i++)
1448  {
1449  if (fmtVer <= 1.002)
1450  {
1451  fourfitCommand[i] = QString::fromLatin1(pFFcmd + lFFcmd*i, lFFcmd);
1452  fourfitControlFile[i] = QString::fromLatin1(pFFctrl + lFFctrl*i, lFFctrl);
1453  numLags[i] = *(pNumLags + i);
1454  apLength[i] = *(pApLength + i);
1455  }
1456  else // the same for all obs:
1457  {
1458  fourfitCommand[i] = QString::fromLatin1(pFFcmd, lFFcmd);
1459  fourfitControlFile[i] = QString::fromLatin1(pFFctrl, lFFctrl);
1460  numLags[i] = *pNumLags;
1461  apLength[i] = *pApLength;
1462  };
1463  };
1464  //
1465  //
1467  "::loadMiscFourFit(): data loaded successfully from " + ncdf.getFileName());
1468  return true;
1469 };
1470 
1471 
1472 
1473 //
1474 bool SgVgosDb::loadSessionHead(QString& corrType, QString& corrName, QString& piName,
1475  QString& experimentName, int& experimentSerialNumber, QString& experimentDescription,
1476  QString& recordingMode, QList<QString>& stations, QList<QString>& sources,
1477  SgMJD& tStart, SgMJD& tFinis, int& cppsIdx)
1478 {
1479  int numObs=0, numScan=0;
1480  SgNcdfVariable *ndcV=NULL;
1481  //
1482  if (vHead_.isEmpty())
1483  {
1485  "::loadSessionHead(): the vgosDb variable Head is empty");
1486  return false;
1487  };
1488  SgNetCdf ncdf(path2RootDir_ + "/" + vHead_.getFileName());
1489  ncdf.getData();
1490  if (!checkFormat(fcfHead, ncdf))
1491  {
1493  "::loadSessionHead(): format check failed");
1494  return false;
1495  };
1496 
1497  // corrType:
1498  ndcV = ncdf.lookupVar(fcCorrelatorType.name());
1499  if (ndcV)
1500  corrType = QString::fromLatin1(ndcV->data2char(), ndcV->dimensions().at(0)->getN());
1501  // corrName:
1502  ndcV = ncdf.lookupVar(fcCorrelator.name());
1503  if (ndcV)
1504  corrName = QString::fromLatin1(ndcV->data2char(), ndcV->dimensions().at(0)->getN());
1505  // piName:
1506  ndcV = ncdf.lookupVar(fcPrincipalInvestigator.name());
1507  if (ndcV)
1508  piName = QString::fromLatin1(ndcV->data2char(), ndcV->dimensions().at(0)->getN());
1509  // experimentName:
1510  ndcV = ncdf.lookupVar(fcExpName.name());
1511  if (ndcV)
1512  experimentName = QString::fromLatin1(ndcV->data2char(), ndcV->dimensions().at(0)->getN());
1513  // experimentDesription:
1514  ndcV = ncdf.lookupVar(fcExpDescription.name());
1515  if (ndcV)
1516  experimentDescription = QString::fromLatin1(ndcV->data2char(), ndcV->dimensions().at(0)->getN());
1517  // recordingMode:
1518  ndcV = ncdf.lookupVar(fcRecordingMode.name());
1519  if (ndcV)
1520  recordingMode = QString::fromLatin1(ndcV->data2char(), ndcV->dimensions().at(0)->getN());
1521  // CppSoftware:
1522  ndcV = ncdf.lookupVar(fcCorrPostProcSoftware.name());
1523  if (ndcV)
1524  cppsIdx = *ndcV->data2int();
1525  // numbers of *:
1526  ndcV = ncdf.lookupVar(fcNumObs.name());
1527  if (ndcV)
1528  numObs = *ndcV->data2int();
1529  ndcV = ncdf.lookupVar(fcNumScan.name());
1530  if (ndcV)
1531  numScan = *ndcV->data2int();
1532  // experimentSerialNumber:
1533  ndcV = ncdf.lookupVar(fcExpSerialNumber.name());
1534  if (ndcV)
1535  experimentSerialNumber = *ndcV->data2short();
1536  //
1537  //
1538  int l, n;
1539  const char *c;
1540 
1541  stations.clear();
1542  sources.clear();
1543  // stations:
1544  ndcV = ncdf.lookupVar(fcStationList.name());
1545  if (ndcV)
1546  {
1547  c = ndcV->data2char();
1548  n = ndcV->dimensions().at(0)->getN();
1549  l = ndcV->dimensions().at(1)->getN();
1550  for (int i=0; i<n; i++)
1551  stations << QString::fromLatin1(c + l*i, l);
1552  };
1553  // sources:
1554  ndcV = ncdf.lookupVar(fcSourceList.name());
1555  if (ndcV)
1556  {
1557  c = ndcV->data2char();
1558  n = ndcV->dimensions().at(0)->getN();
1559  l = ndcV->dimensions().at(1)->getN();
1560  for (int i=0; i<n; i++)
1561  sources << QString::fromLatin1(c + l*i, l);
1562  };
1563  //
1564  ndcV = ncdf.lookupVar(fciUTCInterval.name());
1565  if (ndcV)
1566  {
1567  const short *pYMDHM=ndcV->data2short();
1568  tStart = SgMJD(pYMDHM[0], pYMDHM[1], pYMDHM[2], pYMDHM[3], pYMDHM[4], 0.0);
1569  tFinis = SgMJD(pYMDHM[5], pYMDHM[6], pYMDHM[7], pYMDHM[8], pYMDHM[9], 0.0);
1570  };
1571  //
1572  // check?
1573  if (numOfObs_ && numObs && numOfObs_ != numObs)
1575  "::loadSessionHead(): the declared number of observations, " + QString("").setNum(numObs) +
1576  ", does not equal to the actual number, " + QString("").setNum(numOfObs_));
1577  if (numOfScans_ && numScan && numOfScans_ != numScan)
1579  "::loadSessionHead(): the declared number of scans, " + QString("").setNum(numScan) +
1580  ", does not equal to the actual number, " + QString("").setNum(numOfScans_));
1581  //
1583  "::loadSessionHead(): data loaded successfully from " + ncdf.getFileName());
1584  return true;
1585 };
1586 
1587 
1588 
1589 //
1591 {
1592  QString str, strAux;
1593 
1594 //if (historyDescriptorByName_.size()==0)
1595  if (historyDescriptors_.size()==0)
1596  {
1598  "::loadHistory(): the history collector is empty");
1599  history.clear();
1600  return false;
1601  };
1602  //
1603  QMap<QString, const HistoryDescriptor*> hdByEpoch;
1604  int idx(0);
1605 //for (QMap<QString, HistoryDescriptor>::iterator it=historyDescriptorByName_.begin();
1606 // it!=historyDescriptorByName_.end(); ++it)
1607  for (int i=0; i<historyDescriptors_.size(); i++)
1608  {
1609  const HistoryDescriptor &hd=historyDescriptors_.at(i);
1610 //
1611 // unfortunately, nobody respects timekeeping
1612 // str = hd.epochOfCreation_.toString(SgMJD::F_INTERNAL) + QString("").sprintf("__%06d", idx++);
1613  str = QString("").sprintf("__%06d", idx++);
1614  hdByEpoch[str] = &hd;
1615  };
1616  // read them:
1617  const QString timeTag("TIMETAG"), versionTag("MK3DB_VERSION");
1618  int version(-1), latestVersion(0), numOfParsedStrings(0);
1619  SgMJD t(tZero);
1620  for (QMap<QString, const HistoryDescriptor*>::iterator it=hdByEpoch.begin();
1621  it!=hdByEpoch.end(); ++it)
1622  {
1623  const HistoryDescriptor *hd=it.value();
1624  str = path2RootDir_;
1625  if (hd->defaultDir_.size())
1626  str += "/" + hd->defaultDir_;
1627  QFile f(str + "/" + hd->historyFileName_);
1628  if (!f.exists())
1629  {
1631  "::loadHistory(): the history file [" + f.fileName() + "] does not exist");
1632  }
1633  else
1634  {
1635  //
1636  if (f.open(QFile::ReadOnly))
1637  {
1638  QTextStream s(&f);
1639  bool isOk;
1640  int numOfStrs(0);
1641  t = tZero;
1642  while (!s.atEnd())
1643  {
1644  str = s.readLine();
1645  if (str.startsWith(timeTag, Qt::CaseInsensitive)) // parse time tag:
1646  {
1647  bool isUtc=false;
1648  strAux = str.mid(timeTag.length() + 1).simplified();
1649  if (strAux.endsWith("UTC"))
1650  {
1651  strAux.chop(3);
1652  isUtc = true;
1653  };
1654  if (!t.fromString(SgMJD::F_YYYYMMDDHHMMSSSS, strAux))
1656  "::loadHistory(): cannot guess an epoch from [" + strAux + "] string");
1657  else if (!isUtc)
1658  t = t.toUtc();
1659  }
1660  else if (str.startsWith(versionTag, Qt::CaseInsensitive)) // parse version tag:
1661  {
1662  strAux = str.mid(versionTag.length() + 1).simplified();
1663  version = strAux.toInt(&isOk);
1664  if (!isOk)
1665  {
1667  "::loadHistory(): cannot guess a version number from [" + strAux + "] string");
1668  version = -1;
1669  }
1670  else
1671  latestVersion = version;
1672  }
1673  else if (tZero < t) // ignore all before the first time tag:
1674  {
1675  history.append(new SgVlbiHistoryRecord(t, version==-1?latestVersion+1:version, str));
1676  if (lastModified_ < t)
1677  lastModified_ = t;
1678  };
1679  numOfStrs++;
1680  };
1681  f.close();
1682  s.setDevice(NULL);
1684  "::loadHistory(): parsed " + QString("").setNum(numOfStrs) +
1685  " strings from the history file [" + f.fileName() + "]");
1686  numOfParsedStrings += numOfStrs;
1687  }
1688  else
1689  {
1691  "::loadHistory(): cannot open the history file [" + f.fileName() + "] for read access");
1692  };
1693  };
1694  };
1695  currentVersion_ = latestVersion;
1696  // put fingerprints:
1697  history.append(new SgVlbiHistoryRecord(SgMJD::currentMJD().toUtc(), currentVersion_ + 1,
1699  ": Library ID: " + libraryVersion.name() + " released on " +
1701  history.append(new SgVlbiHistoryRecord(SgMJD::currentMJD().toUtc(), currentVersion_ + 1,
1703  ": Driver ID: " + currentDriverVersion_->name() + " released on " +
1705  history.append(new SgVlbiHistoryRecord(SgMJD::currentMJD().toUtc(), currentVersion_ + 1,
1707  ": Host ID: " + currentIdentities_->getMachineNodeName() +
1708  " (Hw: " + currentIdentities_->getMachineMachineName() +
1709  "; Sw: " + currentIdentities_->getMachineRelease() +
1710  " version of " + currentIdentities_->getMachineSysName() + ")"));
1711  history.append(new SgVlbiHistoryRecord(SgMJD::currentMJD().toUtc(), currentVersion_ + 1,
1713  ": User ID: " + currentIdentities_->getUserName() +
1715  history.append(new SgVlbiHistoryRecord(SgMJD::currentMJD().toUtc(), currentVersion_ + 1,
1717  ": Input data : " + path2RootDir_ + "/" + wrapperFileName_));
1718 
1719  return true;
1720 };
1721 /*=====================================================================================================*/
1722 
1723 
1724 
1725 
1726 
1727 
1728 
1729 /*=====================================================================================================*/
1730 //
1731 // Constants:
1732 //
1733 
1734 
1735 
1736 // Variable descriptions:
1738  // Source Apriori:
1739  fcSourceNameApriori ("AprioriSourceList", NC_CHAR, true, QList<int>() << SD_NumSrc << 8,
1740  "STRNAMES", "Source names in RA order."),
1741  fcSource2000RaDec ("AprioriSource2000RaDec",
1742  NC_DOUBLE, true, QList<int>() << SD_NumSrc << 2,
1743  "STAR2000", "J2000 Source RA and Dec"),
1744  fcSourceReference ("AprioriSourceReference",
1745  NC_CHAR, false,QList<int>() << SD_NumSrc << SD_Any,
1746  "STAR REF", "Source of coordinate values."),
1747  // Clock Apriori:
1748 //fcClockAprioriSite ("ClockAprioriSite", NC_CHAR, true, QList<int>() << SD_Any << 8,
1749  fcClockAprioriSite ("AprioriClockStationList",
1750  NC_CHAR, true, QList<int>() << SD_Any << 8,
1751  "STAT_ACM", "Stations with a priori clock mod"),
1752 //fcClockAprioriOffset ("ClockAprioriOffset", NC_DOUBLE, true, QList<int>() << SD_Any,
1753  fcClockAprioriOffset ("AprioriClockOffset", NC_DOUBLE, true, QList<int>() << SD_Any,
1754  "CLOOFACM", "A priori clock offset (sec)"),
1755 //fcClockAprioriRate ("ClockAprioriRate", NC_DOUBLE, true, QList<int>() << SD_Any,
1756  fcClockAprioriRate ("AprioriClockRate", NC_DOUBLE, true, QList<int>() << SD_Any,
1757  "CLODRACM", "A priori clock drift (sec/sec)"),
1758 
1759  // Station Apriori:
1760  fcStationNameApriori ("AprioriStationList", NC_CHAR, true, QList<int>() << SD_NumStn << 8,
1761  "SITNAMES", "Site names in alphabetical order"),
1762  fcStationXYZ ("AprioriStationXYZ", NC_DOUBLE, true, QList<int>() << SD_NumStn << 3,
1763  "SITERECS", "Site cartesian coords (m).", "meter"),
1764  fcStationPlateName ("AprioriStationTectonicPlate",
1765  NC_CHAR, true, QList<int>() << SD_NumStn << 4,
1766  "TECTPLNM", "4-char tectonic plate names."),
1767  // Antenna Apriori:
1768  fcAxisType ("AntennaAxisType", NC_SHORT, true, QList<int>() << SD_NumStn,
1769  "AXISTYPS", "Axis type (1-eq 2-xy 3-azel 4 5)"),
1770  fcAntennaName ("AntennaStationList", NC_CHAR, true, QList<int>() << SD_NumStn << 8,
1771  "", "List of Antennas"),
1772  fcAxisOffset ("AntennaAxisOffset", NC_DOUBLE, true, QList<int>() << SD_NumStn,
1773  "AXISOFFS", "Axis offsets (m).", "meter"),
1774  fcAxisTilt ("AntennaAxisTilt", NC_DOUBLE, false,QList<int>() << SD_NumStn << 2,
1775  "AXISTILT", "Fixed axis tilt", "radian"),
1776 
1777  // CalcERP:
1778  fcUT1IntrpMode ("UT1IntrpMode", NC_CHAR, true, QList<int>() << SD_Any,
1779  "UT1INTRP", "Message for UT1 interp. scheme"),
1780  fcWobIntrpMode ("WobIntrpMode", NC_CHAR, true, QList<int>() << SD_Any,
1781  "WOBINTRP", "Interp. scheme for polar motion."),
1782  fcCalcUt1Module ("CalcUt1Module", NC_CHAR, true, QList<int>() << SD_Any,
1783  "UT1 MESS", "UT1 Module message definition"),
1784  fcCalcWobModule ("CalcWobModule", NC_CHAR, true, QList<int>() << SD_Any,
1785  "WOB MESS", "Wobble message definition."),
1786  fcUT1Origin ("UT1Origin", NC_CHAR, true, QList<int>() << SD_Any,
1787  "FUT1TEXT", "Final Value TAI-UT1 origin text."),
1788  fcWobbleOrigin ("WobbleOrigin", NC_CHAR, true, QList<int>() << SD_Any,
1789  "FWOBTEXT", "Final Value wobble origin text."),
1790  fcUT1ArrayInfo ("UT1ArrayInfo", NC_DOUBLE, true, QList<int>() << 4,
1791  "FUT1 INF", "Array: (FJD of start, spacing in days, number points, Scaling (should be 1))"),
1792  fcWobArrayInfo ("WobArrayInfo", NC_DOUBLE, true, QList<int>() << 3,
1793  "FWOB INF", "Array: (FJD of start, spacing in days, number points)"),
1794  fcUT1Values ("UT1Values", NC_DOUBLE, true, QList<int>() << SD_Any,
1795  "FUT1 PTS", "Final Value TAI-UT1 data points."),
1796  fcWobValues ("WobValues", NC_DOUBLE, true, QList<int>() << SD_Any << 2,
1797  "FWOBX&YT", "Final wobble X Y component value"),
1798  // CalcInfo:
1799  fcTidalUt1Control ("TidalUT1Control", NC_SHORT, true, QList<int>() << 1,
1800  "TIDALUT1", "Flag for tidal terms in UT1 sers"),
1801  fcCalcVersion ("CalcVersion", NC_DOUBLE, true, QList<int>() << 1,
1802  "CALC VER", "CALC version number"),
1803  fcCalcControlNames ("CalcControlNames", NC_CHAR, true, QList<int>() << SD_Any << SD_Any,
1804  "CALCFLGN", "CALC flow control flags name def"),
1805  fcCalcControlValues ("CalcControlValues", NC_SHORT, true, QList<int>() << SD_Any,
1806  "CALCFLGV", "CALC flow control flags valu def"),
1807  fcATMMessage ("ATMMessage", NC_CHAR, true, QList<int>() << SD_Any,
1808  "ATM MESS", "Atmosphere message definition"),
1809  fcATMControl ("ATMControl", NC_CHAR, true, QList<int>() << SD_Any,
1810  "ATM CFLG", "Atmosphere control flag mess def"),
1811  fcAxisOffsetMessage ("AxisOffsetMessage", NC_CHAR, true, QList<int>() << SD_Any,
1812  "AXO MESS", "Axis Offset Message Definition"),
1813  fcAxisOffsetControl ("AxisOffsetControl", NC_CHAR, true, QList<int>() << SD_Any,
1814  "AXO CFLG", "Axis Offset Control flag mes def"),
1815  fcEarthTideMessage ("EarthTideMessage", NC_CHAR, true, QList<int>() << SD_Any,
1816  "ETD MESS", "Earth Tide message definition"),
1817  fcEarthTideControl ("EarthTideControl", NC_CHAR, true, QList<int>() << SD_Any,
1818  "ETD CFLG", "Earth Tide flow control mess def"),
1819  fcPoleTideMessage ("PoleTideMessage", NC_CHAR, true, QList<int>() << SD_Any,
1820  "PTD MESS", "Pole tide message definition"),
1821  fcPoleTideControl ("PoleTideControl", NC_CHAR, true, QList<int>() << SD_Any,
1822  "PTD CFLG", "Pole tide flow control mess def"),
1823  fcNutationMessage ("NutationMessage", NC_CHAR, true, QList<int>() << SD_Any,
1824  "NUT MESS", "Nutation message definition"),
1825  fcNutationControl ("NutationControl", NC_CHAR, true, QList<int>() << SD_Any,
1826  "NUT CFLG", "Nutation flow control mess def."),
1827  fcOceanMessage ("OceanMessage", NC_CHAR, true, QList<int>() << SD_Any,
1828  "OCE MESS", "Ocean loading message definition"),
1829  fcOceanControl ("OceanControl", NC_CHAR, true, QList<int>() << SD_Any,
1830  "OCE CFLG", "Ocean load flow control mess def"),
1831  fcATIMessage ("ATIMessage", NC_CHAR, true, QList<int>() << SD_Any,
1832  "ATI MESS", "ATIME Message Definition"),
1833  fcATIControl ("ATIControl", NC_CHAR, true, QList<int>() << SD_Any,
1834  "ATI CFLG", "ATIME Flow Control Message Def."),
1835  fcCTIMessage ("CTIMessage", NC_CHAR, true, QList<int>() << SD_Any,
1836  "CTI MESS", "CTIMG Message Definition"),
1837  fcCTIControl ("CTIControl", NC_CHAR, true, QList<int>() << SD_Any,
1838  "CTI CFLG", "CTIMG Flow Control Message Def"),
1839  fcParallaxMessage ("ParallaxMessage", NC_CHAR, true, QList<int>() << SD_Any,
1840  "PLX MESS", "Parallax message definition"),
1841  fcParallaxControl ("ParallaxControl", NC_CHAR, true, QList<int>() << SD_Any,
1842  "PLX CFLG", "Parallax flow control mess def"),
1843  fcStarMessage ("StarMessage", NC_CHAR, true, QList<int>() << SD_Any,
1844  "STR MESS", "Star module message definition"),
1845  fcStarControl ("StarParallaxControl", NC_CHAR, true, QList<int>() << SD_Any,
1846  "STR CFLG", "Parallax flow control mess def"),
1847  fcTheoryMessage ("TheoryMessage", NC_CHAR, true, QList<int>() << SD_Any,
1848  "THE MESS", "Theory module identification"),
1849  fcRelativityControl ("RelativityControl", NC_CHAR, true, QList<int>() << SD_Any,
1850  "REL CFLG", "Relativisitc bending use status"),
1851  fcSiteMessage ("SiteMessage", NC_CHAR, true, QList<int>() << SD_Any,
1852  "SIT MESS", "Site Module Message Definition"),
1853  fcFeedhornMessage ("FeedhornMessage", NC_CHAR, true, QList<int>() << SD_Any,
1854  "PAN MESS", "Feedhorn rot. angle mod. ident."),
1855  fcPepMessage ("PepMessage", NC_CHAR, true, QList<int>() << SD_Any,
1856  "PEP MESS", "PEP Utility Message Definition"),
1857  fcWobbleControl ("WobbleControl", NC_CHAR, true, QList<int>() << SD_Any,
1858  "WOB CFLG", "Wobble flow control mess def."),
1859  fcUT1Control ("UT1Control", NC_CHAR, true, QList<int>() << SD_Any,
1860  "UT1 CFLG", "UT1 control flag message def."),
1861  fcOceanStationsFlag ("OceanStationsFlag", NC_CHAR, true, QList<int>() << SD_NumStn << 4,
1862  "OCE STAT", "Ocean loading station status."),
1863  fcRelativityData ("RelativityMessage", NC_DOUBLE, true, QList<int>() << 1,
1864  "REL DATA", "Relativity mod data (gamma)."),
1865  fcPrecessionData ("PrecessionData", NC_DOUBLE, true, QList<int>() << 1,
1866  "PRE DATA", "Precession constant (asec/cent)."),
1867  fcEarthTideData ("EarthTideData", NC_DOUBLE, true, QList<int>() << 3,
1868  "ETD DATA", "Earth tide module data (la. h l)"),
1869  fcUT1EPOCH ("UT1EPOCH", NC_DOUBLE, true, QList<int>() << 2 << SD_Any,
1870  "UT1EPOCH", "TAI - UT1 epoch value definition"),
1871  fcWOBEPOCH ("WOBEPOCH", NC_DOUBLE, true, QList<int>() << 2 << SD_Any,
1872  "WOBEPOCH", "Interpolated wobble array def"),
1873  fcSiteZenithDelay ("SiteZenithDelay", NC_DOUBLE, true, QList<int>() << SD_NumStn,
1874  "SITEZENS", "Site zenith path delays (nsec)."),
1875  fcOceanPoleTideCoef ("OceanPoleTideCoef", NC_DOUBLE, false,QList<int>() << SD_NumStn << 6,
1876  "OPTLCOEF", "Ocean Pole Tide loading Coefficients"),
1877  fcOceanUpPhase ("OceanUpPhase", NC_DOUBLE, true, QList<int>() << SD_NumStn << 11,
1878  "SITOCPHS", "Vert ocean loading phases (rad).", "radians"),
1879  fcOceanHorizontalPhase("OceanHorizontalPhase",NC_DOUBLE, true, QList<int>() << SD_NumStn << 2 << 11,
1880  "SITHOCPH", "Horz ocean loading phases (rad).", "radians"),
1881  fcOceanUpAmp ("OceanUpAmp", NC_DOUBLE, true, QList<int>() << SD_NumStn << 11,
1882  "SITOCAMP", "Vert ocean loading ampltudes (m)", "meter"),
1883  fcOceanHorizontalAmp ("OceanHorizontalAmp", NC_DOUBLE, true, QList<int>() << SD_NumStn << 2 << 11,
1884  "SITHOCAM", "Horz ocean loading ampltudes (m)", "meter"),
1885 
1886  //
1887  fcLeapSecond ("LeapSecond", NC_SHORT, false,QList<int>() << 1,
1888  "LeapSeco", "Leap seconds", "second"),
1889  fcTai_Utc ("TAI- UTC", NC_DOUBLE, false,QList<int>() << 3 ),
1890  //
1891  // Head:
1892  fcCorrelatorType ("CorrelatorType", NC_CHAR, true, QList<int>() << SD_Any),
1893  fcCorrelator ("Correlator", NC_CHAR, true, QList<int>() << SD_Any,
1894  "CORPLACE", "Correlator name (from a master file)."),
1895  fcNumObs ("NumObs", NC_INT, true, QList<int>() << 1,
1896  "NUM4 OBS", "Number of observations (I*4)"),
1897  fcNumScan ("NumScan", NC_INT, true, QList<int>() << 1 ),
1898  fcNumSource ("NumSource", NC_SHORT, false,QList<int>() << 1 ),
1899  fcNumStation ("NumStation", NC_SHORT, false,QList<int>() << 1 ),
1901  ("PrincipalInvestigator",
1902  NC_CHAR, false,QList<int>() << SD_Any),
1903  fcExpName ("ExpName", NC_CHAR, false,QList<int>() << SD_Any,
1904  "EXPCODE ", "Experiment name."),
1905  fcExpSerialNumber ("ExpSerialNumber", NC_SHORT, false,QList<int>() << 1,
1906  "EXPSERNO", "Experiment Serial Number."),
1907  fcExpDescription ("ExpDescription", NC_CHAR, false,QList<int>() << SD_Any,
1908  "EXPDESC ", "Experiment description."),
1909  fcRecordingMode ("RecordingMode", NC_CHAR, false,QList<int>() << SD_Any,
1910  "RECMODE ", "Recoding mode"),
1911  fcStationList ("StationList", NC_CHAR, true, QList<int>() << SD_NumStn << 8 ),
1912  fcSourceList ("SourceList", NC_CHAR, true, QList<int>() << SD_NumSrc << 8 ),
1913  fciUTCInterval ("iUTCInterval", NC_SHORT, true, QList<int>() << 2 << 5,
1914  "INTRVAL4", "First and last UTC time tag in input file."),
1915  //
1916  //
1917  fcCableSign ("CableSign", NC_CHAR, false,QList<int>() << SD_Any,
1918  "CBL SIGN", "Sign applied to cable calibration"),
1919  fcCableStnName ("CableStationList", NC_CHAR, true, QList<int>() << SD_Any << 8,
1920  "CBL STAT", "Stations for cable sign"),
1921 
1923  ("FourFitCmdCString", NC_CHAR, false,QList<int>() << SD_NumObs << SD_Any,
1924  "FOURF CS", "Command string used for fourfit."),
1925  fcNumLagsUsed_v1002 ("NumLagsUsed", NC_SHORT, false,QList<int>() << SD_NumObs,
1926  "NLAGS ", "Num of lags used for correlation"),
1928  ("FourfitControlFile",NC_CHAR, false,QList<int>() << SD_NumObs << SD_Any,
1929  "FOURF CF", "Control file name for fourfit."),
1930  fcAplength_v1002 ("Aplength", NC_DOUBLE, false,QList<int>() << SD_NumObs,
1931  "APLENGTH", "Length of accumul. period in sec", "second"),
1932 
1934  ("FourFitCmdCString", NC_CHAR, false,QList<int>() << SD_Any,
1935  "FOURF CS", "Command string used for fourfit."),
1936  fcNumLagsUsed_v1004 ("NumLagsUsed", NC_SHORT, false,QList<int>() << 1,
1937  "NLAGS ", "Num of lags used for correlation"),
1939  ("FourfitControlFile",NC_CHAR, false,QList<int>() << SD_Any,
1940  "FOURF CF", "Control file name for fourfit."),
1941  fcAplength_v1004 ("Aplength", NC_DOUBLE, false,QList<int>() << 1,
1942  "APLENGTH", "Length of accumul. period in sec", "second"),
1943  fcCorrPostProcSoftware("CorrPpSoftware", NC_INT, false,QList<int>() << 1,
1944  "", "Correlator post processing software: 0 - HOPS, 1 - PIMA", ""),
1945 
1946 
1947 
1948  fcBracket("N/A", NC_SHORT, false, QList<int>() << 1, "N/A", "N/A")
1949  ;
1950 
1951 
1952 
1953 
1954 // netCDF files:
1957  << &fcSourceReference,
1959  << &fcClockAprioriRate,
1962  << &fcStationPlateName,
1965  << &fcAxisTilt,
1967  << &fcWobValues << &fcUT1IntrpMode
1968  << &fcCalcUt1Module << &fcUT1Origin
1970  << &fcWobbleOrigin,
1973  << &fcATMMessage << &fcATMControl
1979  << &fcATIMessage << &fcATIControl
1980  << &fcCTIMessage << &fcCTIControl
1986  << &fcOceanStationsFlag
1988  << &fcEarthTideData
1993 
1994  ,
2000  << &fcExpName << &fcExpSerialNumber
2008  ,
2012  ,
2013 
2014 
2015 
2017  ;
2018 
2019 
2020 
2021 /*=====================================================================================================*/
2022 
@ SD_NumStn
Definition: SgIoDriver.h:58
@ SD_NumObs
Definition: SgIoDriver.h:53
@ SD_Any
Definition: SgIoDriver.h:62
@ SD_NumSrc
Definition: SgIoDriver.h:57
SgLogger * logger
Definition: SgLogger.cpp:231
const SgMJD tZero(1957, 10, 4)
SgVersion libraryVersion("SgLib", 0, 8, 2, "Compton Peak (rc2)", SgMJD(2023, 4, 3, 10, 59))
SgVgosDb::FmtChkVar fcCalcControlNames("CalcControlNames", NC_CHAR, true, QList< int >()<< SD_Any<< SD_Any, "CALCFLGN", "CALC flow control flags name def")
QList< SgVgosDb::FmtChkVar * > fcfHead
SgVgosDb::FmtChkVar fcSourceNameApriori("AprioriSourceList", NC_CHAR, true, QList< int >()<< SD_NumSrc<< 8, "STRNAMES", "Source names in RA order.")
SgVgosDb::FmtChkVar fcTheoryMessage("TheoryMessage", NC_CHAR, true, QList< int >()<< SD_Any, "THE MESS", "Theory module identification")
QList< SgVgosDb::FmtChkVar * > fcfCalcInfo
SgVgosDb::FmtChkVar fcWobbleControl("WobbleControl", NC_CHAR, true, QList< int >()<< SD_Any, "WOB CFLG", "Wobble flow control mess def.")
SgVgosDb::FmtChkVar fcNumStation("NumStation", NC_SHORT, false, QList< int >()<< 1)
SgVgosDb::FmtChkVar fcCableStnName("CableStationList", NC_CHAR, true, QList< int >()<< SD_Any<< 8, "CBL STAT", "Stations for cable sign")
SgVgosDb::FmtChkVar fcATIMessage("ATIMessage", NC_CHAR, true, QList< int >()<< SD_Any, "ATI MESS", "ATIME Message Definition")
SgVgosDb::FmtChkVar fcWobValues("WobValues", NC_DOUBLE, true, QList< int >()<< SD_Any<< 2, "FWOBX&YT", "Final wobble X Y component value")
SgVgosDb::FmtChkVar fcFourfitControlFile_v1004("FourfitControlFile", NC_CHAR, false, QList< int >()<< SD_Any, "FOURF CF", "Control file name for fourfit.")
SgVgosDb::FmtChkVar fciUTCInterval("iUTCInterval", NC_SHORT, true, QList< int >()<< 2<< 5, "INTRVAL4", "First and last UTC time tag in input file.")
SgVgosDb::FmtChkVar fcNumLagsUsed_v1004("NumLagsUsed", NC_SHORT, false, QList< int >()<< 1, "NLAGS ", "Num of lags used for correlation")
SgVgosDb::FmtChkVar fcStationList("StationList", NC_CHAR, true, QList< int >()<< SD_NumStn<< 8)
SgVgosDb::FmtChkVar fcSourceList("SourceList", NC_CHAR, true, QList< int >()<< SD_NumSrc<< 8)
SgVgosDb::FmtChkVar fcUT1ArrayInfo("UT1ArrayInfo", NC_DOUBLE, true, QList< int >()<< 4, "FUT1 INF", "Array: (FJD of start, spacing in days, number points, Scaling (should be 1))")
SgVgosDb::FmtChkVar fcPepMessage("PepMessage", NC_CHAR, true, QList< int >()<< SD_Any, "PEP MESS", "PEP Utility Message Definition")
SgVgosDb::FmtChkVar fcParallaxControl("ParallaxControl", NC_CHAR, true, QList< int >()<< SD_Any, "PLX CFLG", "Parallax flow control mess def")
SgVgosDb::FmtChkVar fcSourceReference("AprioriSourceReference", NC_CHAR, false, QList< int >()<< SD_NumSrc<< SD_Any, "STAR REF", "Source of coordinate values.")
SgVgosDb::FmtChkVar fcUT1Origin("UT1Origin", NC_CHAR, true, QList< int >()<< SD_Any, "FUT1TEXT", "Final Value TAI-UT1 origin text.")
SgVgosDb::FmtChkVar fcFourFitCmdCString_v1004("FourFitCmdCString", NC_CHAR, false, QList< int >()<< SD_Any, "FOURF CS", "Command string used for fourfit.")
SgVgosDb::FmtChkVar fcStationPlateName("AprioriStationTectonicPlate", NC_CHAR, true, QList< int >()<< SD_NumStn<< 4, "TECTPLNM", "4-char tectonic plate names.")
SgVgosDb::FmtChkVar fcClockAprioriOffset("AprioriClockOffset", NC_DOUBLE, true, QList< int >()<< SD_Any, "CLOOFACM", "A priori clock offset (sec)")
SgVgosDb::FmtChkVar fcClockAprioriRate("AprioriClockRate", NC_DOUBLE, true, QList< int >()<< SD_Any, "CLODRACM", "A priori clock drift (sec/sec)")
SgVgosDb::FmtChkVar fcFeedhornMessage("FeedhornMessage", NC_CHAR, true, QList< int >()<< SD_Any, "PAN MESS", "Feedhorn rot. angle mod. ident.")
SgVgosDb::FmtChkVar fcAxisOffset("AntennaAxisOffset", NC_DOUBLE, true, QList< int >()<< SD_NumStn, "AXISOFFS", "Axis offsets (m).", "meter")
SgVgosDb::FmtChkVar fcRecordingMode("RecordingMode", NC_CHAR, false, QList< int >()<< SD_Any, "RECMODE ", "Recoding mode")
SgVgosDb::FmtChkVar fcUT1Values("UT1Values", NC_DOUBLE, true, QList< int >()<< SD_Any, "FUT1 PTS", "Final Value TAI-UT1 data points.")
SgVgosDb::FmtChkVar fcTidalUt1Control("TidalUT1Control", NC_SHORT, true, QList< int >()<< 1, "TIDALUT1", "Flag for tidal terms in UT1 sers")
QList< SgVgosDb::FmtChkVar * > fcfMiscFourFit_v1004
SgVgosDb::FmtChkVar fcCableSign("CableSign", NC_CHAR, false, QList< int >()<< SD_Any, "CBL SIGN", "Sign applied to cable calibration")
SgVgosDb::FmtChkVar fcOceanHorizontalPhase("OceanHorizontalPhase", NC_DOUBLE, true, QList< int >()<< SD_NumStn<< 2<< 11, "SITHOCPH", "Horz ocean loading phases (rad).", "radians")
SgVgosDb::FmtChkVar fcPoleTideControl("PoleTideControl", NC_CHAR, true, QList< int >()<< SD_Any, "PTD CFLG", "Pole tide flow control mess def")
SgVgosDb::FmtChkVar fcEarthTideData("EarthTideData", NC_DOUBLE, true, QList< int >()<< 3, "ETD DATA", "Earth tide module data (la. h l)")
SgVgosDb::FmtChkVar fcWOBEPOCH("WOBEPOCH", NC_DOUBLE, true, QList< int >()<< 2<< SD_Any, "WOBEPOCH", "Interpolated wobble array def")
QList< SgVgosDb::FmtChkVar * > fcfCalcEop
SgVgosDb::FmtChkVar fcOceanStationsFlag("OceanStationsFlag", NC_CHAR, true, QList< int >()<< SD_NumStn<< 4, "OCE STAT", "Ocean loading station status.")
SgVgosDb::FmtChkVar fcAxisTilt("AntennaAxisTilt", NC_DOUBLE, false, QList< int >()<< SD_NumStn<< 2, "AXISTILT", "Fixed axis tilt", "radian")
SgVgosDb::FmtChkVar fcPrecessionData("PrecessionData", NC_DOUBLE, true, QList< int >()<< 1, "PRE DATA", "Precession constant (asec/cent).")
SgVgosDb::FmtChkVar fcSiteMessage("SiteMessage", NC_CHAR, true, QList< int >()<< SD_Any, "SIT MESS", "Site Module Message Definition")
SgVgosDb::FmtChkVar fcCorrPostProcSoftware("CorrPpSoftware", NC_INT, false, QList< int >()<< 1, "", "Correlator post processing software: 0 - HOPS, 1 - PIMA", "")
SgVgosDb::FmtChkVar fcRelativityControl("RelativityControl", NC_CHAR, true, QList< int >()<< SD_Any, "REL CFLG", "Relativisitc bending use status")
SgVgosDb::FmtChkVar fcWobArrayInfo("WobArrayInfo", NC_DOUBLE, true, QList< int >()<< 3, "FWOB INF", "Array: (FJD of start, spacing in days, number points)")
SgVgosDb::FmtChkVar fcSiteZenithDelay("SiteZenithDelay", NC_DOUBLE, true, QList< int >()<< SD_NumStn, "SITEZENS", "Site zenith path delays (nsec).")
SgVgosDb::FmtChkVar fcExpDescription("ExpDescription", NC_CHAR, false, QList< int >()<< SD_Any, "EXPDESC ", "Experiment description.")
SgVgosDb::FmtChkVar fcSource2000RaDec("AprioriSource2000RaDec", NC_DOUBLE, true, QList< int >()<< SD_NumSrc<< 2, "STAR2000", "J2000 Source RA and Dec")
SgVgosDb::FmtChkVar fcOceanPoleTideCoef("OceanPoleTideCoef", NC_DOUBLE, false, QList< int >()<< SD_NumStn<< 6, "OPTLCOEF", "Ocean Pole Tide loading Coefficients")
SgVgosDb::FmtChkVar fcCTIMessage("CTIMessage", NC_CHAR, true, QList< int >()<< SD_Any, "CTI MESS", "CTIMG Message Definition")
SgVgosDb::FmtChkVar fcUT1Control("UT1Control", NC_CHAR, true, QList< int >()<< SD_Any, "UT1 CFLG", "UT1 control flag message def.")
QList< SgVgosDb::FmtChkVar * > fcfBracket
SgVgosDb::FmtChkVar fcCalcUt1Module("CalcUt1Module", NC_CHAR, true, QList< int >()<< SD_Any, "UT1 MESS", "UT1 Module message definition")
SgVgosDb::FmtChkVar fcExpName("ExpName", NC_CHAR, false, QList< int >()<< SD_Any, "EXPCODE ", "Experiment name.")
SgVgosDb::FmtChkVar fcCorrelator("Correlator", NC_CHAR, true, QList< int >()<< SD_Any, "CORPLACE", "Correlator name (from a master file).")
QList< SgVgosDb::FmtChkVar * > fcfSourceApriori
SgVgosDb::FmtChkVar fcNumLagsUsed_v1002("NumLagsUsed", NC_SHORT, false, QList< int >()<< SD_NumObs, "NLAGS ", "Num of lags used for correlation")
SgVgosDb::FmtChkVar fcATMControl("ATMControl", NC_CHAR, true, QList< int >()<< SD_Any, "ATM CFLG", "Atmosphere control flag mess def")
SgVgosDb::FmtChkVar fcOceanUpPhase("OceanUpPhase", NC_DOUBLE, true, QList< int >()<< SD_NumStn<< 11, "SITOCPHS", "Vert ocean loading phases (rad).", "radians")
SgVgosDb::FmtChkVar fcOceanHorizontalAmp("OceanHorizontalAmp", NC_DOUBLE, true, QList< int >()<< SD_NumStn<< 2<< 11, "SITHOCAM", "Horz ocean loading ampltudes (m)", "meter")
SgVgosDb::FmtChkVar fcLeapSecond("LeapSecond", NC_SHORT, false, QList< int >()<< 1, "LeapSeco", "Leap seconds", "second")
SgVgosDb::FmtChkVar fcFourFitCmdCString_v1002("FourFitCmdCString", NC_CHAR, false, QList< int >()<< SD_NumObs<< SD_Any, "FOURF CS", "Command string used for fourfit.")
SgVgosDb::FmtChkVar fcCalcControlValues("CalcControlValues", NC_SHORT, true, QList< int >()<< SD_Any, "CALCFLGV", "CALC flow control flags valu def")
SgVgosDb::FmtChkVar fcClockAprioriSite("AprioriClockStationList", NC_CHAR, true, QList< int >()<< SD_Any<< 8, "STAT_ACM", "Stations with a priori clock mod")
SgVgosDb::FmtChkVar fcWobIntrpMode("WobIntrpMode", NC_CHAR, true, QList< int >()<< SD_Any, "WOBINTRP", "Interp. scheme for polar motion.")
SgVgosDb::FmtChkVar fcNutationMessage("NutationMessage", NC_CHAR, true, QList< int >()<< SD_Any, "NUT MESS", "Nutation message definition")
SgVgosDb::FmtChkVar fcAxisOffsetMessage("AxisOffsetMessage", NC_CHAR, true, QList< int >()<< SD_Any, "AXO MESS", "Axis Offset Message Definition")
SgVgosDb::FmtChkVar fcAplength_v1004("Aplength", NC_DOUBLE, false, QList< int >()<< 1, "APLENGTH", "Length of accumul. period in sec", "second")
SgVgosDb::FmtChkVar fcFourfitControlFile_v1002("FourfitControlFile", NC_CHAR, false, QList< int >()<< SD_NumObs<< SD_Any, "FOURF CF", "Control file name for fourfit.")
SgVgosDb::FmtChkVar fcParallaxMessage("ParallaxMessage", NC_CHAR, true, QList< int >()<< SD_Any, "PLX MESS", "Parallax message definition")
SgVgosDb::FmtChkVar fcRelativityData("RelativityMessage", NC_DOUBLE, true, QList< int >()<< 1, "REL DATA", "Relativity mod data (gamma).")
SgVgosDb::FmtChkVar fcPoleTideMessage("PoleTideMessage", NC_CHAR, true, QList< int >()<< SD_Any, "PTD MESS", "Pole tide message definition")
SgVgosDb::FmtChkVar fcEarthTideMessage("EarthTideMessage", NC_CHAR, true, QList< int >()<< SD_Any, "ETD MESS", "Earth Tide message definition")
SgVgosDb::FmtChkVar fcATMMessage("ATMMessage", NC_CHAR, true, QList< int >()<< SD_Any, "ATM MESS", "Atmosphere message definition")
SgVgosDb::FmtChkVar fcOceanUpAmp("OceanUpAmp", NC_DOUBLE, true, QList< int >()<< SD_NumStn<< 11, "SITOCAMP", "Vert ocean loading ampltudes (m)", "meter")
SgVgosDb::FmtChkVar fcATIControl("ATIControl", NC_CHAR, true, QList< int >()<< SD_Any, "ATI CFLG", "ATIME Flow Control Message Def.")
SgVgosDb::FmtChkVar fcPrincipalInvestigator("PrincipalInvestigator", NC_CHAR, false, QList< int >()<< SD_Any)
SgVgosDb::FmtChkVar fcCalcVersion("CalcVersion", NC_DOUBLE, true, QList< int >()<< 1, "CALC VER", "CALC version number")
SgVgosDb::FmtChkVar fcUT1IntrpMode("UT1IntrpMode", NC_CHAR, true, QList< int >()<< SD_Any, "UT1INTRP", "Message for UT1 interp. scheme")
SgVgosDb::FmtChkVar fcAxisType("AntennaAxisType", NC_SHORT, true, QList< int >()<< SD_NumStn, "AXISTYPS", "Axis type (1-eq 2-xy 3-azel 4 5)")
SgVgosDb::FmtChkVar fcOceanControl("OceanControl", NC_CHAR, true, QList< int >()<< SD_Any, "OCE CFLG", "Ocean load flow control mess def")
QList< SgVgosDb::FmtChkVar * > fcfClockApriori
SgVgosDb::FmtChkVar fcStarMessage("StarMessage", NC_CHAR, true, QList< int >()<< SD_Any, "STR MESS", "Star module message definition")
SgVgosDb::FmtChkVar fcStationNameApriori("AprioriStationList", NC_CHAR, true, QList< int >()<< SD_NumStn<< 8, "SITNAMES", "Site names in alphabetical order")
SgVgosDb::FmtChkVar fcNumSource("NumSource", NC_SHORT, false, QList< int >()<< 1)
SgVgosDb::FmtChkVar fcTai_Utc("TAI- UTC", NC_DOUBLE, false, QList< int >()<< 3)
SgVgosDb::FmtChkVar fcAplength_v1002("Aplength", NC_DOUBLE, false, QList< int >()<< SD_NumObs, "APLENGTH", "Length of accumul. period in sec", "second")
QList< SgVgosDb::FmtChkVar * > fcfStationApriori
SgVgosDb::FmtChkVar fcOceanMessage("OceanMessage", NC_CHAR, true, QList< int >()<< SD_Any, "OCE MESS", "Ocean loading message definition")
SgVgosDb::FmtChkVar fcNutationControl("NutationControl", NC_CHAR, true, QList< int >()<< SD_Any, "NUT CFLG", "Nutation flow control mess def.")
QList< SgVgosDb::FmtChkVar * > fcfLeapSecondIn
SgVgosDb::FmtChkVar fcCorrelatorType("CorrelatorType", NC_CHAR, true, QList< int >()<< SD_Any)
SgVgosDb::FmtChkVar fcUT1EPOCH("UT1EPOCH", NC_DOUBLE, true, QList< int >()<< 2<< SD_Any, "UT1EPOCH", "TAI - UT1 epoch value definition")
SgVgosDb::FmtChkVar fcBracket("N/A", NC_SHORT, false, QList< int >()<< 1, "N/A", "N/A")
QList< SgVgosDb::FmtChkVar * > fcfAntennaApriori
SgVgosDb::FmtChkVar fcNumScan("NumScan", NC_INT, true, QList< int >()<< 1)
SgVgosDb::FmtChkVar fcEarthTideControl("EarthTideControl", NC_CHAR, true, QList< int >()<< SD_Any, "ETD CFLG", "Earth Tide flow control mess def")
QList< SgVgosDb::FmtChkVar * > fcfMiscCable
SgVgosDb::FmtChkVar fcWobbleOrigin("WobbleOrigin", NC_CHAR, true, QList< int >()<< SD_Any, "FWOBTEXT", "Final Value wobble origin text.")
QList< SgVgosDb::FmtChkVar * > fcfMiscFourFit_v1002
QList< SgVgosDb::FmtChkVar * > fcfLeapSecond
SgVgosDb::FmtChkVar fcCTIControl("CTIControl", NC_CHAR, true, QList< int >()<< SD_Any, "CTI CFLG", "CTIMG Flow Control Message Def")
SgVgosDb::FmtChkVar fcExpSerialNumber("ExpSerialNumber", NC_SHORT, false, QList< int >()<< 1, "EXPSERNO", "Experiment Serial Number.")
SgVgosDb::FmtChkVar fcCalcWobModule("CalcWobModule", NC_CHAR, true, QList< int >()<< SD_Any, "WOB MESS", "Wobble message definition.")
SgVgosDb::FmtChkVar fcStationXYZ("AprioriStationXYZ", NC_DOUBLE, true, QList< int >()<< SD_NumStn<< 3, "SITERECS", "Site cartesian coords (m).", "meter")
SgVgosDb::FmtChkVar fcAxisOffsetControl("AxisOffsetControl", NC_CHAR, true, QList< int >()<< SD_Any, "AXO CFLG", "Axis Offset Control flag mes def")
SgVgosDb::FmtChkVar fcStarControl("StarParallaxControl", NC_CHAR, true, QList< int >()<< SD_Any, "STR CFLG", "Parallax flow control mess def")
SgVgosDb::FmtChkVar fcAntennaName("AntennaStationList", NC_CHAR, true, QList< int >()<< SD_NumStn<< 8, "", "List of Antennas")
SgVgosDb::FmtChkVar fcNumObs("NumObs", NC_INT, true, QList< int >()<< 1, "NUM4 OBS", "Number of observations (I*4)")
SgVgosDb::FmtChkVar fcEccentricityVector("EccentricityVector", NC_DOUBLE, false, QList< int >()<< SD_NumStn<< 3, "ECCCOORD", "Eccentricity taken from eccentricity file.", "Meter")
SgVgosDb::FmtChkVar fcFlybyName("FlybyList", NC_CHAR, false, QList< int >()<< SD_Any<< 8, "FCL LIST", "Key to the standard flcal config")
SgVgosDb::FmtChkVar fcClockInterval("ClockInterval", NC_DOUBLE, false, QList< int >()<< SD_Any, "CLK_INTV", "Batchmode clock interval - hours")
SgVgosDb::FmtChkVar fcClockBreakFlag("ClockBreakFlag", NC_SHORT, true, QList< int >()<< SD_Any, "BRK_FLAG", "Batchmode clock break flags")
QList< SgVgosDb::FmtChkVar * > fcfSelectionStatus
Definition: SgVgosDb.cpp:2693
SgVgosDb::FmtChkVar fcClockRateName("ClockRateConstraintStationList", NC_CHAR, false, QList< int >()<< SD_Any<< 8, "CC_SITES", "Site list for clocks constraints")
SgVgosDb::FmtChkVar fcStatCalFlag("StatCalFlag", NC_SHORT, true, QList< int >()<< SD_NumStn, "CAL FLGS", "Bit set indicate that calibration is recommended.")
SgVgosDb::FmtChkVar fcGroupBLWeights("GroupBLWeights", NC_DOUBLE, true, QList< int >()<< 2<< SD_Any, "ERROR K ", "Group delay and rate re-weighting constants.")
SgVgosDb::FmtChkVar fcEccentricityName("EccentricityStationList", NC_CHAR, true, QList< int >()<< SD_NumStn<< 8, "--NEW-- ", "Station name of the corresponding eccentricity")
SgVgosDb::FmtChkVar fcObsCalFlag("ObsCalFlag", NC_SHORT, false, QList< int >()<< 1, "OBCLFLGS", "Bit set indicate that calibration is recommended.")
SgVgosDb::FmtChkVar fcEccentricityMonument("EccentricityMonument", NC_CHAR, false, QList< int >()<< SD_NumStn<< 10, "ECCNAMES", "Eccentricity monument name")
QList< SgVgosDb::FmtChkVar * > fcfClockSetup
Definition: SgVgosDb.cpp:2688
SgVgosDb::FmtChkVar fcAtmRateConstraint("AtmRateConstraint", NC_DOUBLE, true, QList< int >()<< SD_Any, "ATM_CNST", "Atmosphere constraint. ps/hr")
SgVgosDb::FmtChkVar fcSrcSelectionFlag("SourceSelectionFlag", NC_SHORT, true, QList< int >()<< SD_NumSrc, "SOURSTAT", "Source selection status bit-mapped array.")
SgVgosDb::FmtChkVar fcCalStationName("StatCalStationList", NC_CHAR, true, QList< int >()<< SD_NumStn<< 8, "CALSITES", "List of sites for standard cal")
QList< SgVgosDb::FmtChkVar * > fcfClockBreak
Definition: SgVgosDb.cpp:2703
QList< SgVgosDb::FmtChkVar * > fcfCalibrationSetup
Definition: SgVgosDb.cpp:2700
QList< SgVgosDb::FmtChkVar * > fcfEccentricity
Definition: SgVgosDb.cpp:2696
SgVgosDb::FmtChkVar fcClockRateConstraint("ClockRateConstraint", NC_DOUBLE, true, QList< int >()<< SD_Any, "CLK_CNST", "Clock constraint-Parts in 1.e14")
SgVgosDb::FmtChkVar fcClockBreakSite("ClockBreakStationList", NC_CHAR, true, QList< int >(), "BRK_SNAM", "Batchmode clock break stations")
SgVgosDb::FmtChkVar fcGroupBLWeightName("GroupBLWeightStationList", NC_CHAR, true, QList< int >()<< SD_Any<< 2<< 8, "ERROR BL", "B.L.names for formal errors")
SgVgosDb::FmtChkVar fcEccentricityType("EccentricityType", NC_CHAR, false, QList< int >()<< SD_NumStn<< 2, "ECCTYPES", "Eccentricity type: XY or NE")
SgVgosDb::FmtChkVar fcAtmInterval("AtmInterval", NC_DOUBLE, false, QList< int >()<< SD_Any, "ATM_INTV", "Batchmode atmos interval - hours")
SgVgosDb::FmtChkVar fcAtmRateSite("AtmRateStationList", NC_CHAR, false, QList< int >()<< SD_Any<< 8, "AC_SITES", "Site list for atmos constraints")
QList< SgVgosDb::FmtChkVar * > fcfGroupBLWeights
Definition: SgVgosDb.cpp:2692
QList< SgVgosDb::FmtChkVar * > fcfAtmSetup
Definition: SgVgosDb.cpp:2686
SgVgosDb::FmtChkVar fcBlnSelectionFlag("BaselineSelectionFlag", NC_SHORT, true, QList< int >()<< SD_NumStn<< SD_NumStn, "BASLSTAT", "Baseline selection bit maped array. 1=some obs, etc.")
SgVgosDb::FmtChkVar fcObsCalName("ObsCalList", NC_CHAR, false, QList< int >()<< SD_Any<< 8, "OBCLLIST", "Available obs dependent calibrations (poletide, earthdide, ?)")
SgVgosDb::FmtChkVar fcClockBreakEpoch("ClockBreakEpoch", NC_DOUBLE, true, QList< int >()<< SD_Any, "BRK_EPOC", "Batchmode clock break epochs")
SgVgosDb::FmtChkVar fcFlybyFlag("FlybyFlag", NC_SHORT, false, QList< int >()<< SD_NumStn<< 7, "FCL FLGS", "Standard flcal configuration")
SgVgosDb::FmtChkVar fcStatCalName("StatCalList", NC_CHAR, true, QList< int >()<< SD_Any<< 8, "CAL LIST", "Station depedendent calibrations (Cable, Phase, etc?)")
const QString & getUserEmailAddress() const
Definition: SgIdentities.h:223
const QString & getMachineMachineName() const
Definition: SgIdentities.h:303
const QString & getMachineRelease() const
Definition: SgIdentities.h:319
const QString & getMachineNodeName() const
Definition: SgIdentities.h:295
const QString & getAcFullName() const
Definition: SgIdentities.h:239
const QString & getUserName() const
Definition: SgIdentities.h:215
const QString & getMachineSysName() const
Definition: SgIdentities.h:311
const SgIdentities * currentIdentities_
Definition: SgIoDriver.h:133
const SgVersion * currentDriverVersion_
Definition: SgIoDriver.h:134
virtual void write(LogLevel, quint32, const QString &, bool=false)
Definition: SgLogger.cpp:88
@ IO_NCDF
Definition: SgLogger.h:66
@ IO_TXT
Definition: SgLogger.h:65
Definition: SgMJD.h:59
bool fromString(Format format, const QString &str, bool isReset=true)
Definition: SgMJD.cpp:268
@ F_YYYYMMDDHHMMSSSS
Long verbose: Fri, the 2nd of Apr, 2010; 17hr 02min 43.6400sec.
Definition: SgMJD.h:67
@ F_DDMonYYYY
Date: 2010 Apr 02.
Definition: SgMJD.h:87
SgMJD toUtc() const
Definition: SgMJD.cpp:1230
QString toString(Format format=F_Verbose) const
Definition: SgMJD.cpp:1008
static SgMJD currentMJD()
Definition: SgMJD.cpp:119
void setElement(unsigned int i, unsigned int j, double d)
Definition: SgMatrix.h:402
void setDefinition(const QString &def)
Definition: SgModelsInfo.h:73
void setControlFlag(const QString &flag)
Definition: SgModelsInfo.h:72
void prepareWobInterpData(int nRow)
QList< SgVlbiStationInfo * > & stations()
Definition: SgModelsInfo.h:155
DasModel & troposphere()
Definition: SgModelsInfo.h:145
QList< QString > & oLoadStationStatus()
Definition: SgModelsInfo.h:151
DasModel & earthTide()
Definition: SgModelsInfo.h:142
SgMatrix *& wobInterpData()
Definition: SgModelsInfo.h:154
void setDversion(double d)
Definition: SgModelsInfo.h:123
DasModel & nutation()
Definition: SgModelsInfo.h:141
DasModel & coordinateTime()
Definition: SgModelsInfo.h:134
QList< QString > & controlFlagNames()
Definition: SgModelsInfo.h:149
void setEarthTideData(int i, double d)
Definition: SgModelsInfo.h:128
DasModel & feedHorn()
Definition: SgModelsInfo.h:148
void setFlagTidalUt1(short f)
Definition: SgModelsInfo.h:125
DasModel & polarMotion()
Definition: SgModelsInfo.h:137
DasModel & atomicTime()
Definition: SgModelsInfo.h:135
QList< double > & siteZenDelays()
Definition: SgModelsInfo.h:152
SgMatrix *& ut1InterpData()
Definition: SgModelsInfo.h:153
DasModel & oceanLoading()
Definition: SgModelsInfo.h:144
DasModel & parallax()
Definition: SgModelsInfo.h:147
DasModel & poleTide()
Definition: SgModelsInfo.h:143
void setPrecessionData(double d)
Definition: SgModelsInfo.h:127
DasModel & ephemeris()
Definition: SgModelsInfo.h:133
void prepareUt1InterpData(int nRow)
DasModel & star()
Definition: SgModelsInfo.h:132
DasModel & site()
Definition: SgModelsInfo.h:131
QList< int > & controlFlagValues()
Definition: SgModelsInfo.h:150
DasModel & axisOffset()
Definition: SgModelsInfo.h:146
DasModel & ut1()
Definition: SgModelsInfo.h:139
void setRelativityData(double d)
Definition: SgModelsInfo.h:126
DasModel & relativity()
Definition: SgModelsInfo.h:136
nc_type getTypeOfData() const
Definition: SgNetCdf.h:222
const char * data2char() const
Definition: SgNetCdf.cpp:459
const int * data2int() const
Definition: SgNetCdf.cpp:503
const short * data2short() const
Definition: SgNetCdf.cpp:481
const QList< SgNcdfDimension * > & dimensions() const
Definition: SgNetCdf.h:247
const double * data2double() const
Definition: SgNetCdf.cpp:525
SgNcdfVariable * lookupVar(const QString &name) const
Definition: SgNetCdf.h:395
const QString & getFileName() const
Definition: SgNetCdf.h:497
bool getData()
Definition: SgNetCdf.cpp:1053
bool isEmpty() const
Definition: SgVgosDb.cpp:159
const QString & getFileName() const
Definition: SgVgosDb.h:100
void setElement(unsigned int i, double d)
Definition: SgVector.h:348
const SgMJD & getReleaseEpoch() const
Definition: SgVersion.h:294
const QString & getSoftwareName() const
Definition: SgVersion.h:254
QString name(NameFormat fmt=NF_Human) const
Definition: SgVersion.cpp:54
const QString & name() const
Definition: SgVgosDb.h:213
bool loadClockSetup(QList< QString > &refClocks, SgVector *&interval, SgVector *&rateConstraint, QVector< QString > &stationsNames)
bool loadHistory(QList< SgVlbiHistoryRecord * > &)
SgVdbVariable vClockBreak_
Definition: SgVgosDb.h:1435
bool loadCalibrations(int &obsCalFlags, QVector< int > &statCalFlags, QVector< QVector< int > > &flybyFlags, QVector< QString > &statCalNames, QVector< QString > &flybyNames, QVector< QString > &calSiteNames, QVector< QString > &obsCalNames)
static const QString className()
Definition: SgVgosDb.cpp:251
bool loadSelectionStatus(QVector< int > &sourcesSelection, QVector< QVector< int > > &baselinesSelection)
bool loadAtmSetup(SgVector *&interval, SgVector *&rateConstraint, QVector< QString > &stationsNames)
SgVdbVariable vClockApriori_
Definition: SgVgosDb.h:1445
bool loadLeapSecond(int &leapSecond)
bool loadSolveWeights(QVector< QString > &baselineNames, SgMatrix *&groupBlWeights)
SgVdbVariable vStationApriori_
Definition: SgVgosDb.h:1443
bool checkFormat(const QList< FmtChkVar * > &, const SgNetCdf &, bool ok2fail=false)
Definition: SgVgosDb.cpp:2173
bool loadStationsApriories(QVector< QString > &stationsNames, SgMatrix *&cooXYZ, QVector< QString > &tectonicPlateNames)
SgVdbVariable vEccentricity_
Definition: SgVgosDb.h:1447
double inputFormatVersion_
Definition: SgVgosDb.h:1410
SgMJD lastModified_
Definition: SgVgosDb.h:1422
SgVdbVariable vHead_
Definition: SgVgosDb.h:1431
int currentVersion_
Definition: SgVgosDb.h:1421
bool loadSessionHead(QString &corrType, QString &corrName, QString &piName, QString &experimentName, int &experimentSerialNumber, QString &experimentDescription, QString &recordingMode, QList< QString > &stations, QList< QString > &sources, SgMJD &tStart, SgMJD &tFinis, int &cppsIdx)
QString wrapperFileName_
Definition: SgVgosDb.h:1407
bool loadClockBreaks(QVector< QString > &cbNames, QVector< SgMJD > &cbEpochs, QVector< int > &cbFlags)
bool loadEccentricities(QVector< QString > &stationsNames, QVector< QString > &eccTypes, QVector< QString > &eccNums, SgMatrix *&eccVals)
QList< HistoryDescriptor > historyDescriptors_
Definition: SgVgosDb.h:1419
SgVdbVariable vGroupBLWeights_
Definition: SgVgosDb.h:1434
bool loadMiscFourFit(const QString &band, QVector< QString > &fourfitControlFile, QVector< QString > &fourfitCommand, QVector< int > &numLags, QVector< double > &apLength)
bool loadCalcEop(SgVector *&pmArrayInfo, SgVector *&utArrayInfo, SgMatrix *&pmValues, SgVector *&utValues, QString &sUtMode, QString &sUtModule, QString &sUtOrigin, QString &sPmMode, QString &sPmModule, QString &sPmOrigin)
int numOfStn_
Definition: SgVgosDb.h:1400
SgVdbVariable vAntennaApriori_
Definition: SgVgosDb.h:1446
bool loadSourcesApriories(QVector< QString > &sourcesNames, SgMatrix *&cooRaDe, QVector< QString > &sourcesApRefs)
SgVdbVariable vMiscFourFit_
Definition: SgVgosDb.h:1438
SgVdbVariable vMiscCable_
Definition: SgVgosDb.h:1439
bool loadMiscCable(QMap< QString, QString > &cableSignByKey)
bool loadCalcInfo(int &tidalUt1, double &calcVersionValue)
QMap< QString, BandData > bandDataByName_
Definition: SgVgosDb.h:1483
SgVdbVariable vLeapSecond_
Definition: SgVgosDb.h:1436
bool loadAntennaApriories(QVector< QString > &stationsNames, QVector< int > &axisTypes, SgVector *&axisOffsets, SgMatrix *&axisTilts)
SgVdbVariable vSourceApriori_
Definition: SgVgosDb.h:1444
ProgramSolveDescriptor progSolveDescriptor_
Definition: SgVgosDb.h:1537
int numOfObs_
Definition: SgVgosDb.h:1397
bool have2redoLeapSecond_
Definition: SgVgosDb.h:1437
int numOfSrc_
Definition: SgVgosDb.h:1401
QString path2RootDir_
Definition: SgVgosDb.h:1406
int numOfScans_
Definition: SgVgosDb.h:1398
bool loadClockApriories(QVector< QString > &stationNames, SgMatrix *&offsets_n_rates)
void setOLoadPhase(int iWave, int iCoord, double phase)
void setOptLoadCoeff(int idx, double c)
void setOLoadAmplitude(int iWave, int iCoord, double amplitude)