General Purpose Geodetic Library
SgVlbiSession.h
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 #ifndef SG_VLBI_SESSION_H
24 #define SG_VLBI_SESSION_H
25 
26 
27 #ifdef HAVE_CONFIG_H
28 # include <config.h>
29 #endif
30 
31 
32 #include <math.h>
33 
34 class QDataStream;
35 
36 #include <QtCore/QMap>
37 #include <QtCore/QList>
38 
39 
40 #include <SgVlbiSessionInfo.h>
41 
42 #include <SgAPrioriData.h>
43 #include <SgExternalErpFile.h>
44 #include <SgExternalWeights.h>
45 #include <SgModelEop_JMG_96_hf.h>
46 #include <SgModelsInfo.h>
47 #include <SgParametersDescriptor.h>
48 #include <SgSolutionReporter.h>
49 #include <SgTaskConfig.h>
50 #include <SgTidalUt1.h>
51 #include <SgVlbiBaselineInfo.h>
52 #include <SgVlbiHistory.h>
53 #include <SgVlbiSourceInfo.h>
54 #include <SgVlbiStationInfo.h>
55 
56 
57 
58 
59 
60 // temporary?:
62 {
63 public:
66  double shift_;
67  double sigma_;
69  SgClockBreakAgent() : epoch_(tZero) {stn_=NULL; shift_=0.0; sigma_=0.0; pC_=NULL;};
70  ~SgClockBreakAgent() {stn_=NULL; shift_=0.0; sigma_=0.0; pC_=NULL;};
71 };
72 
73 
74 
75 
76 
77 class SgCubicSpline;
78 class SgDbhImage;
79 class SgIdentities;
80 class SgIoDriver;
81 class SgLogger;
82 class SgNetworkStations;
83 class SgVgosDb;
84 //class SgSolutionReporter;
85 class SgVersion;
86 class SgVlbiBand;
87 class SgVlbiObservation;
88 class SgVlbiSourceInfo;
89 
90 
91 //
92 // for internal use:
93 class StationInfo;
94 class VexInfo;
95 
96 //
97 /***===================================================================================================*/
104 {
105 public:
106  // Statics:
109  static QString className();
110 
111  // SgVlbiSessionIoSupport.cpp:
112  //
113  static bool guessWrapperFileNameBySession(const QString& inputArg, const QString& path2VgosDb,
114  const QString& acAbbName,
115  QString& path2wrapperFile, QString& wrapperFileName, QString& sessionName, int& version,
116  bool noYears=false);
117  //
118  static bool guessSessionByWrapperFileName(const QString& inputArg, const QString& path2VgosDb,
119  QString& path2wrapperFile, QString& wrapperFileName, QString& sessionName, int& version);
120 
121 
122  //
123  // constructors/destructors:
124  //
128  SgVlbiSession();
129 
133  virtual ~SgVlbiSession();
134 
135 
136 
137  //
138  // Interfaces:
139  //
140  // gets:
143  inline SgTaskConfig* getConfig();
144 
148 
152  inline int getNumOfParameters() const {return numOfParameters_;};
153  inline int getNumOfConstraints() const {return numOfConstraints_;};
154  inline int getNumOfDOF() const {return numOfDOF_;};
155 
156 
159  inline const SgAPriories& getApStationPositions() const;
160 
163  inline const SgAPriories& getApStationVelocities() const;
164 
167  inline const SgAPriories& getApSourcePositions() const;
168 
171  inline const SgAPriories& getApSourceStrModel() const;
172 
175  inline const SgAPriories& getApAxisOffsets() const;
176 
179  inline const SgAPriories& getApStationGradients() const;
180 
183  inline const SgModelEop_JMG_96_hf& getApHiFyEop() const;
184 
185 // inline double getCalcVersionValue() const {return calcVersionValue_;};
186 
187  inline bool getHasUt1Interpolation() const;
188  inline void setHasUt1Interpolation(bool has);
189 
190  inline bool getHasPxyInterpolation() const;
191  inline void setHasPxyInterpolation(bool has);
192 
193  inline bool isAble2InterpolateErp() const;
196 
197  inline const QVector<bool>& getUserCorrectionsUse() const {return userCorrectionsUse_;};
198  inline QVector<bool>& userCorrectionsUse() {return userCorrectionsUse_;};
199  inline const QVector<QString>& getUserCorrectionsName() const {return userCorrectionsName_;};
200  inline QVector<QString>& userCorrectionsName() {return userCorrectionsName_;};
201 
202 
205  inline bool hasOceanTideContrib() const {return hasOceanTideContrib_;};
206  inline bool hasPoleTideContrib() const {return hasPoleTideContrib_;};
207  inline bool hasEarthTideContrib() const {return hasEarthTideContrib_;};
208  inline bool hasWobblePxContrib() const {return hasWobblePxContrib_;};
209  inline bool hasWobblePyContrib() const {return hasWobblePyContrib_;};
210  inline bool hasWobbleNutContrib() const {return hasWobbleNutContrib_;};
212  inline bool hasUt1HighFreqContrib() const {return hasUt1HighFreqContrib_;};
213  inline bool hasFeedCorrContrib() const {return hasFeedCorrContrib_;};
214  inline bool hasTiltRemvrContrib() const {return hasTiltRemvrContrib_;};
215  inline bool hasPxyLibrationContrib() const {return hasPxyLibrationContrib_;};
216  inline bool hasUt1LibrationContrib() const {return hasUt1LibrationContrib_;};
217  inline bool hasOceanPoleTideContrib() const {return hasOceanPoleTideContrib_;};
218  inline bool hasGpsIonoContrib() const {return hasGpsIonoContrib_;};
219  inline bool hasPoleTideOldContrib() const {return hasPoleTideOldContrib_;};
220  inline bool hasOceanTideOldContrib() const {return hasOceanTideOldContrib_;};
221  inline bool hasNdryContrib() const {return hasNdryContrib_;};
222  inline bool hasNwetContrib() const {return hasNwetContrib_;};
223  inline bool hasUnPhaseCalContrib() const {return hasUnPhaseCalContrib_;};
224  inline bool hasGradPartials() const {return hasGradPartials_;};
225  inline bool hasCipPartials() const {return hasCipPartials_;};
226 
227  //
229  inline const SgVlbiHistory& contemporaryHistory() const {return contemporaryHistory_;};
230 
231  inline const SgIoDriver* getInputDriver() const {return inputDriver_;};
232 
233  // temporary:
234  inline double dUt1Value() const {return reporter_?reporter_->dUt1Value():0.0;};
235  inline double dUt1Correction() const {return reporter_?reporter_->dUt1Correction():0.0;};
236  inline double dUt1StdDev() const {return reporter_?reporter_->dUt1StdDev():0.0;};
237 
239  inline const SgMJD& getLastProcessed() const {return lastProcessed_;};
240 
241 
242 
243  //
244  // sets:
248  inline void setConfig(SgTaskConfig* cfg);
249 
253  inline void setReporter(SgSolutionReporter* reporter);
254 
255  inline void setNumOfParameters(int n) {numOfParameters_ = n;};
256  inline void setNumOfConstraints(int n) {numOfConstraints_ = n;};
257  inline void setNumOfDOF(int n) {numOfDOF_ = n;};
258 
259 
264 
267  inline QList<SgVlbiBand*>& bands();
268  inline const QList<SgVlbiBand*>& bands() const {return bands_;};
269  inline QMap<QString, SgVlbiBand*>& bandByKey() {return bandByKey_;};
270 
273  inline SgVlbiBand* primaryBand();
274  inline const SgVlbiBand* primaryBand() const {return primaryBand_;};
275 
279 
280  inline QMap<QString, SgVlbiObservation*>& observationByKey() {return observationByKey_;};
281 
282 
285  inline const QList<SgVlbiObservation*>& observations() const {return observations_;};
286 
289  inline const QList<SgMJD*>& scanEpochs() const {return scanEpochs_;};
290 
293  void setPrimaryBandByIdx(int);
294 
297  inline QMap<QString, SgVlbiStationInfo*>& stationsByName();
298  inline const QMap<QString, SgVlbiStationInfo*>& stationsByName() const {return stationsByName_;};
299 
302  inline QMap<QString, SgVlbiBaselineInfo*>& baselinesByName();
303  inline const QMap<QString, SgVlbiBaselineInfo*>& baselinesByName() const {return baselinesByName_;};
304 
307  inline QMap<QString, SgVlbiSourceInfo*>& sourcesByName();
308  inline const QMap<QString, SgVlbiSourceInfo*>& sourcesByName() const {return sourcesByName_;};
309 
310  //
311  inline QMap<int, SgVlbiStationInfo*>& stationsByIdx() {return stationsByIdx_;}
312  inline QMap<int, SgVlbiBaselineInfo*>& baselinesByIdx() {return baselinesByIdx_;}
313  inline QMap<int, SgVlbiSourceInfo*>& sourcesByIdx() {return sourcesByIdx_;}
314 
315 
316  inline void setPath2Masterfile(const QString&);
317 
318  inline void setPath2APrioriFiles(const QString&);
319 
320  inline QMap<QString, double>& skyFreqByIfId() {return skyFreqByIfId_;};
321  inline const QMap<QString, double>& skyFreqByIfId() const {return skyFreqByIfId_;};
322 
323  // temporary:
326  inline SgParameter* pPolusX();
327 
330  inline SgParameter* pPolusY();
331 
334  inline SgParameter* pUT1();
335 
338  inline SgParameter* pUT1Rate();
339 
342  inline SgParameter* pPolusXRate();
343 
346  inline SgParameter* pPolusYRate();
347 
350  inline SgParameter* pNutX();
351 
352  inline SgParameter* pNutXRate();
353 
356  inline SgParameter* pNutY();
357 
358  inline SgParameter* pNutYRate();
359 
360  inline double getLeapSeconds() {return leapSeconds_;};
361 
362  inline void setLeapSeconds(double s) {leapSeconds_ = s;};
363 
364  inline void setHave2InteractWithGui(bool have2) {have2InteractWithGui_ = have2;};
365 
366  inline void setLongOperationStart(void (*operation)(int, int, const QString&))
367  {longOperationStart_ = operation;};
368 
369  inline void setLongOperationProgress(void (*operation)(int)) {longOperationProgress_ = operation;};
370 
371  inline void setLongOperationStop(void (*operation)()) {longOperationStop_ = operation;};
372 
373  inline void setLongOperationMessage(void (*operation)(const QString&))
374  {longOperationMessage_ = operation;};
375  inline void setLongOperationShowStats(void (*operation)
376  (const QString& label, int numTot, int numPrc, double wrms, double chi2))
377  {longOperationShowStats_ = operation;};
378 
379 // inline void setCalcVersionValue(double v) {calcVersionValue_ = v;};
380 
381  inline void setInputDriver(SgIoDriver* drv) {inputDriver_ = drv;};
382 
383  inline SgModelsInfo& calcInfo() {return calcInfo_;};
384 
389 
391  inline void setLastProcessed(const SgMJD& t) {lastProcessed_ = t;};
392 
393  //
394  // Functions:
395  //
396  inline const SgMJD& tRefer() const {return tRefer_;};
397 
400  int numberOfBands() const;
401 
404  bool getDataFromDbhImages(QMap<QString, SgDbhImage*> &images,
405  bool have2LoadImmatureSession, bool guiExpected);
406 
409  bool getDataFromDbhImage(SgDbhImage *image,
410  bool have2getAll, bool isStandardSession, bool have2LoadImmatureSession, bool guiExpected);
411 
414  bool putDataIntoDbhImage(SgDbhImage *image);
415 
418  bool exportDataIntoNgsFile(const QString& fileName);
419 
422  bool getDataFromVgosDb(SgVgosDb* vgosDb, bool have2LoadImmatureSession, bool guiExpected);
423 
426  bool putDataIntoVgosDb(SgVgosDb* vgosDb);
427 
430  bool getDataFromAgvFile(const QString& fileName, SgIdentities *ids, SgVersion *driverVersion);
431 
434  bool putDataIntoAgvFile(const QString& dirName, const QString& fileName,
436 
439  bool getDataFromFringeFiles(const QString& path2, const QString& altDatabaseName,
440  const QString& altCorrelatorName, const QString& historyFileName, const QString& mapFileName,
441  const QList<QString>&);
442 
445  bool getDataFromKombFiles(const QString& path2, const QString& altDatabaseName,
446  const QString& altCorrelatorName, const QString& historyFileName, const QString& mapFileName,
447  bool need2correctRefClocks);
448 
451  bool selfCheck(bool guiExpected);
452 
453 
457 
460  inline SgVlbiSourceInfo* lookupSourceByIdx(int);
461 
465 
468  void prepare4Analysis();
469 
470  // temporary:
473  void createParameters();
474 
477  void releaseParameters();
478 
481  void resetAllEditings(bool have2resetConfig);
482 
486 
489  void zerofyIonoCorrections(const SgTaskConfig*);
490 
494 
497  void calculateClockBreakParameter(const SgMJD&, SgVlbiStationInfo*, SgVlbiBand*, double&, double&);
498 
502 
505  bool detectClockBreaks_mode1(SgVlbiBand*, QString&, SgMJD&);
506 
509  int checkBandForClockBreaks(int, bool);
510 
514 
517  void eliminateOutliersMode1();
518 
524  void eliminateOutliersSimpleMode(int bandIdx, int maxNumOfPasses, double threshold, double=0.0);
525 
531  void eliminateLargeOutliers(int bandIdx, int maxNumOfPasses, double wrmsRatio);
532 
537  int eliminateOutliers(int bandIdx);
538 
543  int restoreOutliers(int bandIdx);
544 
548  void scanBaselines4GrDelayAmbiguities(int bandIdx);
549 
552  void process(bool haveProcessAllBands, bool interactWithGui);
553 
556  void doPostReadActions_old();
557 
558  int suppressNotSoGoodObs();
559 
562  bool doPostReadActions();
563 
564  // automated processing, case of INT sessions, tests:
566 
568  void setReferenceClocksStation(const QString& stnKey);
569 
571 
573 
574  void setClockModelOrder4Stations(int);
575 
576  int doReWeighting();
577 
578  bool check4ClockBreaksAtSBD();
579 
580  // end of automatizations
581  //
584  void correctClockBreak(SgVlbiBand*, SgVlbiStationInfo*, const SgMJD&, double, double, bool, bool=true);
585 
588  void zerofySigma2add();
589 
590 // void reweightByBaselines();
591 
592 // QString nickName();
593 
594  QString name4SirFile(bool);
595 
597 
598  bool isInUse(SgVlbiStationInfo*);
599 
601 
602  bool importDataFromLogFiles(const QString& path2sessions, const QList<QString>& stations,
603  const QList<QString>& kinds,
604  const QMap<QString, int>* defaultCableSignByStn,
605  const QMap<QString, QString>* rinexFileNameByStn,
606  const QMap<QString, double>* rinexPressureOffsetByStn,
607  bool have2overwriteAntabFile,
608  bool reportAllTsysData,
609  const QString& altPath2InputFiles,
610  const QString& orderOfMeteo);
611  bool resetDataFromLogFiles(bool doCable, bool doMeteo, bool doTsys, const QList<QString>& stations);
612 
613  void allocUt1InterpolEpochs(double t0, double dt, unsigned int numOfPts);
614  void allocPxyInterpolEpochs(double t0, double dt, unsigned int numOfPts);
615  void allocUt1InterpolValues(const SgVector* vals);
616  void allocPxyInterpolValues(const SgMatrix* vals);
617 
618  void getAprioriErp(const SgMJD& t,
619  double& vUt1, double& rUt1, double& vPx, double& rPx, double& vPy, double& rPy,
620  double& vCx, double& rCx, double& vCy, double& rCy);
621 
622  void setupTimeRefer();
623 
625 
627 
628  bool writeUserData2File(const QString& fileName);
629 
630  //
631  // Friends:
632  //
633 
634  // I/O support:
637  void applyObsCalibrationSetup(int bitFlags, const QList<QString> &calList);
638  void formObsCalibrationSetup(int& bitFlags, QList<QString> &calList);
639 
640  // I/O:
641  //
643 
645  //
646 
647 
648 private:
649  // a list of bands, we are the owner:
651  QMap<QString, SgVlbiBand*> bandByKey_;
653  // a list of observations, an owner:
656  QMap<QString, SgVlbiObservation*> observationByKey_;
657  // owners of pointers (the allocated memmory should be released in the destructor):
661  SgMJD tRefer_; // a reference epoch for polynomial parameters
662 
663  // current configuration:
669 
670  // just for quick look-ups, not the owners:
671  QMap<int, SgVlbiStationInfo*> stationsByIdx_;
672  QMap<int, SgVlbiBaselineInfo*> baselinesByIdx_;
673  QMap<int, SgVlbiSourceInfo*> sourcesByIdx_;
674 
675  //
677  // available "contributions" from a database file:
699 // double calcVersionValue_;
700 
701 
702  // temporary place for EOP-estimations:
713 
714  // and temporary place for pathes:
717  // and apriories:
728  // info for ERP interpolation from the database:
740 
741  static const QString sSkipCode_;
742 
743  // reporter:
745  // info on the last solution:
749 
750  // aux:
751  double leapSeconds_; // mimic CALC/SOLVE behavior
752  //
755  //
756  SgVlbiHistory contemporaryHistory_; // collector for history records
757  // input driver:
759  //
760  //
761  QMap<QString, double> skyFreqByIfId_;
762  //
763  //
764  // User corrections:
765  QVector<bool> userCorrectionsUse_;
766  QVector<QString> userCorrectionsName_;
767  //
768  // temporary options:
770  //
772 
773 
774 
775  // Functions:
776  //
777  // interactions with GUI:
779  void (*longOperationStart_)(int minStep, int maxStep, const QString& message);
780  void (*longOperationProgress_)(int step);
782  void (*longOperationMessage_)(const QString& message);
783  void (*longOperationShowStats_) (const QString& label, int numTot, int numPrc,
784  double wrms, double chi2);
785 
786 
787  // internal functions:
788  //
791  bool checkChannelSetup(bool guiExpected);
792 
795  virtual void calcTMean();
796 
799  virtual void setUpPrimaryBand();
800 
803  void checkExcludedStations();
804 
805 
808  void collectAPriories();
809 
812  void lookupExternalWeights();
813 
817 
821 
824  void makeHistory(SgVlbiHistory&);
825 
828  void restoreIonCorrections();
829 
832  void parseVexFile(const QString&, QString&, QString&);
833 
836  void processVexFile(const QString&, QMap<QString, StationInfo>&, VexInfo&,
837  const QMap<QString, QString>& stn2stn, QString& correlatorName);
838 
841  void processFringeFile(const QString& path2file, const QString& fringeFileName,
842  const QMap<QString, StationInfo>& stnsInfo, const VexInfo&, const QString& vexFileName,
843  const QMap<QString, QString>& stnNameById, const QMap<QString, QString>& stnNameByI,
844  const QMap<QString, QString>& stn2stn, const QMap<QString, QString>& src2src,
845  const QMap<QString, QString>& bnd2bnd,
846  const QMap<QString, int>& fringeErrorCodeByInt, int& expSerialNumber);
847 
850  void processKombFile(const QString& path2file, const QString& kombFileName,
851  const QMap<QString, QString>& stn2stn, const QMap<QString, QString>& src2src,
852  const QMap<QString, QString>& bnd2bnd);
853 
856  bool getCorrelatorHistory(const QString& fileName);
857 
858 
862  void importMapFile(const QString& mapFileName, QMap<QString, QString>& map4Stn,
863  QMap<QString, QString>& map4Src, QMap<QString, QString>& map4Bnd);
864 
865  bool check4NameMap(const QMap<QString, QString> &map, QString& name);
866 
867 
868 
869  //
870  void search4missedLogFiles(QMap<QString, QString>& logFileByKey, const SgNetworkStations &ns_codes);
871  void stnInpt2Key(const QString& stnNameInpt, SgNetworkStations& ns_codes, QString& key);
872 
873 
874  // ambig.resolv. support:
875  void resolveGrAmbigTriangles(int bandIdx);
876 
877 };
878 /*=====================================================================================================*/
879 
880 
881 //
882 void evaluatePCal4GrpDelay (SgVector&, const SgVector&, int, double&, double&, int, const SgMJD&,
883  const QString&, const QString&);
884 
885 //
886 //void evaluateEffectiveFreqs(const SgVector&, const SgVector&, const SgVector&, const SgVector&,
887 // const SgVector&, const SgVector&, double, double, int, double&, double&,
888 // double&, int, const SgMJD&, const QString&, const QString&);
890  // input:
891  const SgVector& numOfAccPeriodsByChan_USB, const SgVector& numOfAccPeriodsByChan_LSB,
892  const SgVector& refFreqByChan, const SgVector& fringeAmplitudeByChan,
893  const SgVector& numOfSamplesByChan_USB, const SgVector& numOfSamplesByChan_LSB,
894  double sampleRate, double refFreq, int numOfChannels,
895  // output:
896  double& effFreq4GR, double& effFreq4PH, double& effFreq4RT,
897  // type of a correlator
898  const QString& correlatorType,
899  // info about the observation (for Log's purposes) and equalWeightsFlag:
900  const QString& oId,
901  bool useEqualWeights=false);
902 
903 
904 
905 
906 /*=====================================================================================================*/
907 /* */
908 /* SgVlbiSession inline members: */
909 /* */
910 /*=====================================================================================================*/
911 //
912 //
913 // INTERFACES:
914 //
915 //
917 {
918  return config_;
919 };
920 
921 
922 
923 //
925 {
926  return parametersDescriptor_;
927 };
928 
929 
930 
931 //
933 {
934  return reporter_;
935 };
936 
937 
938 
939 //
941 {
942  return apStationPositions_;
943 };
944 
945 
946 
947 //
949 {
950  return apStationVelocities_;
951 };
952 
953 
954 
955 //
957 {
958  return apSourcePositions_;
959 };
960 
961 
962 
963 //
965 {
966  return apSourceStrModel_;
967 };
968 
969 
970 //
972 {
973  return apAxisOffsets_;
974 };
975 
976 
977 
978 //
980 {
981  return apStationGradients_;
982 };
983 
984 
985 
986 //
988 {
989  return apHiFyEop_;
990 };
991 
992 
993 
994 //
996 {
997  return hasUt1Interpolation_;
998 };
999 
1000 
1001 
1002 //
1004 {
1005  hasUt1Interpolation_ = has;
1006 };
1007 
1008 
1009 
1010 //
1012 {
1013  return hasPxyInterpolation_;
1014 };
1015 
1016 
1017 
1018 //
1020 {
1021  hasPxyInterpolation_ = has;
1022 };
1023 
1024 
1025 
1026 //
1028 {
1029  return isAble2InterpolateErp_;
1030 };
1031 
1032 
1033 
1034 //
1036 {
1037  config_ = cfg;
1040 };
1041 
1042 
1043 
1044 //
1046 {
1047  reporter_ = reporter;
1048 };
1049 
1050 
1051 
1052 //
1054 {
1057 };
1058 
1059 
1060 
1061 //
1063 {
1064  return bands_;
1065 };
1066 
1067 
1068 
1069 //
1071 {
1072  return primaryBand_;
1073 };
1074 
1075 
1076 
1077 //
1079 {
1080  return observations_;
1081 };
1082 
1083 
1084 
1085 //
1086 /*
1087 inline QList<SgVlbiMbandObservation*>* SgVlbiSession::compositeObservations()
1088 {
1089  return &compositeObservations_;
1090 };
1091 
1092 
1093 
1094 //
1095 inline QList<SgVlbiMbandObservation*>* SgVlbiSession::matchedObservations()
1096 {
1097  return &matchedObservations_;
1098 };
1099 */
1100 
1101 
1102 //
1103 inline QMap<QString, SgVlbiStationInfo*>& SgVlbiSession::stationsByName()
1104 {
1105  return stationsByName_;
1106 };
1107 
1108 
1109 
1110 //
1111 inline QMap<QString, SgVlbiBaselineInfo*>& SgVlbiSession::baselinesByName()
1112 {
1113  return baselinesByName_;
1114 };
1115 
1116 
1117 
1118 //
1119 inline QMap<QString, SgVlbiSourceInfo*>& SgVlbiSession::sourcesByName()
1120 {
1121  return sourcesByName_;
1122 };
1123 
1124 
1125 
1126 //
1128 {
1129  return pPolusX_;
1130 };
1131 
1132 
1133 
1134 //
1136 {
1137  return pPolusY_;
1138 };
1139 
1140 
1141 
1142 //
1144 {
1145  return pUT1_;
1146 };
1147 
1148 
1149 
1150 //
1152 {
1153  return pUT1Rate_;
1154 };
1155 
1156 
1157 
1158 //
1160 {
1161  return pPolusXRate_;
1162 };
1163 
1164 
1165 
1166 //
1168 {
1169  return pPolusYRate_;
1170 };
1171 
1172 
1173 
1174 //
1176 {
1177  return pNutX_;
1178 };
1180 {
1181  return pNutXRate_;
1182 };
1183 
1184 
1185 
1186 //
1188 {
1189  return pNutY_;
1190 };
1192 {
1193  return pNutYRate_;
1194 };
1195 
1196 
1197 
1198 //
1199 inline void SgVlbiSession::setPath2Masterfile(const QString& path)
1200 {
1201  path2Masterfile_ = path;
1202 };
1203 
1204 
1205 
1206 //
1207 inline void SgVlbiSession::setPath2APrioriFiles(const QString& path)
1208 {
1209  path2APrioriFiles_ = path;
1210 };
1211 
1212 
1213 
1214 //
1215 // FUNCTIONS:
1216 //
1217 //
1218 //
1219 //
1221 {
1222  if (stationsByIdx_.contains(idx))
1223  return stationsByIdx_.value(idx);
1224  else
1225  return NULL;
1226 };
1227 
1228 
1229 
1230 //
1232 {
1233  if (sourcesByIdx_.contains(idx))
1234  return sourcesByIdx_.value(idx);
1235  else
1236  return NULL;
1237 };
1238 
1239 
1240 
1241 //
1243 {
1244  if (baselinesByIdx_.contains(idx))
1245  return baselinesByIdx_.value(idx);
1246  else
1247  return NULL;
1248 };
1249 
1250 
1251 
1252 
1253 //
1254 // FRIENDS:
1255 //
1256 //
1257 //
1258 
1259 
1260 /*=====================================================================================================*/
1261 
1262 
1263 
1264 
1265 
1266 /*=====================================================================================================*/
1267 //
1268 // aux functions:
1269 //
1270 
1271 
1272 /*=====================================================================================================*/
1273 #endif // SG_VLBI_SESSION_H
const SgMJD tZero(1957, 10, 4)
QMap< QString, SgVlbiBaselineInfo * > BaselinesByName
QMap< QString, QString > src2src
QMap< QString, QString > stn2stn
void evaluatePCal4GrpDelay(SgVector &, const SgVector &, int, double &, double &, int, const SgMJD &, const QString &, const QString &)
void evaluateEffectiveFreqs(const SgVector &numOfAccPeriodsByChan_USB, const SgVector &numOfAccPeriodsByChan_LSB, const SgVector &refFreqByChan, const SgVector &fringeAmplitudeByChan, const SgVector &numOfSamplesByChan_USB, const SgVector &numOfSamplesByChan_LSB, double sampleRate, double refFreq, int numOfChannels, double &effFreq4GR, double &effFreq4PH, double &effFreq4RT, const QString &correlatorType, const QString &oId, bool useEqualWeights=false)
QMap< QString, SgVlbiSourceInfo * > SourcesByName
QMap< QString, SgVlbiStationInfo * > StationsByName
SgParameter * pC_
Definition: SgVlbiSession.h:68
SgVlbiStationInfo * stn_
Definition: SgVlbiSession.h:65
Definition: SgMJD.h:59
double dUt1Value() const
double dUt1StdDev() const
double dUt1Correction() const
UT1TideContentType
Definition: SgTidalUt1.h:60
QList< SgMJD * > scanEpochs_
const SgAPriories & getApStationGradients() const
SgAPriories apStationGradients_
void(* longOperationStart_)(int minStep, int maxStep, const QString &message)
SgVlbiBand * primaryBand()
int checkBandForClockBreaks(int, bool)
int numberOfBands() const
StationsByName stationsByName_
bool writeUserData2File(const QString &fileName)
bool hasOceanPoleTideContrib_
bool hasWobbleNutContrib_
bool getDataFromVgosDb(SgVgosDb *vgosDb, bool have2LoadImmatureSession, bool guiExpected)
void search4missedLogFiles(QMap< QString, QString > &logFileByKey, const SgNetworkStations &ns_codes)
const SgAPriories & getApStationVelocities() const
QMap< QString, SgVlbiBand * > & bandByKey()
const SgMJD & getLastProcessed() const
SgParameter * pPolusYRate_
void allocPxyInterpolValues(const SgMatrix *vals)
QString path2Masterfile_
void setLeapSeconds(double s)
bool hasUt1LibrationContrib_
QMap< QString, SgVlbiObservation * > observationByKey_
SgVlbiStationInfo * lookupStationByIdx(int)
SgVlbiHistory & contemporaryHistory()
int getNumOfConstraints() const
bool getDataFromFringeFiles(const QString &path2, const QString &altDatabaseName, const QString &altCorrelatorName, const QString &historyFileName, const QString &mapFileName, const QList< QString > &)
SgParameter * pPolusX_
SgParameter * pNutYRate_
void setLongOperationStart(void(*operation)(int, int, const QString &))
SgModelsInfo & calcInfo()
QList< SgVlbiBand * > & bands()
void resolveGrAmbigTriangles(int bandIdx)
const SgAPriories & getApSourceStrModel() const
QList< SgVlbiBand * > bands_
QVector< bool > userCorrectionsUse_
void formObsCalibrationSetup(int &bitFlags, QList< QString > &calList)
void setPrimaryBandByIdx(int)
const QList< SgVlbiObservation * > & observations() const
SgTidalUt1::UT1TideContentType tabsUt1Type_
bool getDataFromDbhImages(QMap< QString, SgDbhImage * > &images, bool have2LoadImmatureSession, bool guiExpected)
void calculateIonoCorrections(const SgTaskConfig *)
const QVector< QString > & getUserCorrectionsName() const
void setParametersDescriptor(SgParametersDescriptor *parametersDescriptor)
SgVector * args4PxyInterpolation_
bool getDataFromKombFiles(const QString &path2, const QString &altDatabaseName, const QString &altCorrelatorName, const QString &historyFileName, const QString &mapFileName, bool need2correctRefClocks)
bool hasPxyLibrationContrib() const
SgAPriories apStationVelocities_
SgParameter * pUT1()
bool exportDataIntoNgsFile(const QString &fileName)
void processFringeFile(const QString &path2file, const QString &fringeFileName, const QMap< QString, StationInfo > &stnsInfo, const VexInfo &, const QString &vexFileName, const QMap< QString, QString > &stnNameById, const QMap< QString, QString > &stnNameByI, const QMap< QString, QString > &stn2stn, const QMap< QString, QString > &src2src, const QMap< QString, QString > &bnd2bnd, const QMap< QString, int > &fringeErrorCodeByInt, int &expSerialNumber)
double leapSeconds_
bool hasGradPartials() const
const QVector< bool > & getUserCorrectionsUse() const
const SgVlbiHistory & contemporaryHistory() const
QVector< QString > & userCorrectionsName()
int restoreOutliers(int bandIdx)
void(* longOperationProgress_)(int step)
double getLeapSeconds()
void makeHistoryIntro(SgVlbiHistory &)
void setNumOfConstraints(int n)
bool hasGpsIonoContrib_
bool selfCheck(bool guiExpected)
virtual ~SgVlbiSession()
void setLongOperationProgress(void(*operation)(int))
SgTaskConfig lastProcessedConfig_
const QMap< QString, SgVlbiStationInfo * > & stationsByName() const
bool hasOceanPoleTideContrib() const
void processKombFile(const QString &path2file, const QString &kombFileName, const QMap< QString, QString > &stn2stn, const QMap< QString, QString > &src2src, const QMap< QString, QString > &bnd2bnd)
QMap< QString, SgVlbiStationInfo * > & stationsByName()
SgAPriories apAxisOffsets_
SgParameter * pPolusYRate()
QMap< QString, SgVlbiBand * > bandByKey_
bool hasWobblePyContrib() const
SgParameter * pPolusXRate_
const SgMJD & tRefer() const
void applyObsCalibrationSetup(int bitFlags, const QList< QString > &calList)
const SgAPriories & getApStationPositions() const
SgParameter * pNutYRate()
bool hasOceanTideContrib_
QList< SgVlbiObservation * > observations_
SgAPriories apSourceStrModel_
void setLongOperationShowStats(void(*operation)(const QString &label, int numTot, int numPrc, double wrms, double chi2))
void allocPxyInterpolEpochs(double t0, double dt, unsigned int numOfPts)
bool hasPoleTideOldContrib_
bool getDataFromDbhImage(SgDbhImage *image, bool have2getAll, bool isStandardSession, bool have2LoadImmatureSession, bool guiExpected)
SgParameter * pNutY_
SgParameter * pPolusY_
SgAPriories apStationPositions_
SgVector *& args4PxyInterpolation()
bool hasWobblePxContrib_
SgParameter * pPolusY()
void allocUt1InterpolEpochs(double t0, double dt, unsigned int numOfPts)
bool hasWobbleHighFreqContrib_
SgSolutionReporter * reporter_
bool saveIntermediateResults(QDataStream &) const
bool detectClockBreaks_mode1(SgVlbiBand *, QString &, SgMJD &)
bool hasUnPhaseCalContrib_
const QMap< QString, SgVlbiSourceInfo * > & sourcesByName() const
void(* longOperationStop_)()
SgVlbiHistory contemporaryHistory_
SgParameter * pUT1Rate()
bool getCorrelatorHistory(const QString &fileName)
SgParameter * pPolusXRate()
bool hasOutlierRestoratioRun_
QMap< int, SgVlbiStationInfo * > stationsByIdx_
QList< SgVlbiObservation * > & observations()
void process(bool haveProcessAllBands, bool interactWithGui)
virtual void setUpPrimaryBand()
void setHasUt1Interpolation(bool has)
SgAPriories apSourcePositions_
bool hasCipPartials() const
bool hasGpsIonoContrib() const
const SgModelEop_JMG_96_hf & getApHiFyEop() const
QString name4SirFile(bool)
bool hasOceanTideOldContrib() const
SgCubicSpline * externalErpInterpolator_
bool isInUse(SgVlbiBaselineInfo *)
void scanBaselines4GrDelayAmbiguities(int bandIdx)
SgExternalEopFile externalErpFile_
static bool guessSessionByWrapperFileName(const QString &inputArg, const QString &path2VgosDb, QString &path2wrapperFile, QString &wrapperFileName, QString &sessionName, int &version)
SgParameter * pUT1Rate_
bool hasNdryContrib() const
SgModelsInfo calcInfo_
SgParametersDescriptor storedParametersDescriptor_
const SgAPriories & getApSourcePositions() const
SgExternalWeights externalWeights_
void setNumOfParameters(int n)
void(* longOperationMessage_)(const QString &message)
void resetAllEditings(bool have2resetConfig)
void setReporter(SgSolutionReporter *reporter)
const QMap< QString, double > & skyFreqByIfId() const
bool hasUt1HighFreqContrib_
bool putDataIntoAgvFile(const QString &dirName, const QString &fileName, SgIdentities *ids, SgVersion *driverVersion)
void allocUt1InterpolValues(const SgVector *vals)
bool putDataIntoDbhImage(SgDbhImage *image)
SgMatrix *& tabs4Ut1Interpolation()
bool hasPxyInterpolation_
QMap< QString, double > skyFreqByIfId_
bool getDataFromAgvFile(const QString &fileName, SgIdentities *ids, SgVersion *driverVersion)
QMap< int, SgVlbiBaselineInfo * > & baselinesByIdx()
void importMapFile(const QString &mapFileName, QMap< QString, QString > &map4Stn, QMap< QString, QString > &map4Src, QMap< QString, QString > &map4Bnd)
static bool guessWrapperFileNameBySession(const QString &inputArg, const QString &path2VgosDb, const QString &acAbbName, QString &path2wrapperFile, QString &wrapperFileName, QString &sessionName, int &version, bool noYears=false)
void eliminateLargeOutliers(int bandIdx, int maxNumOfPasses, double wrmsRatio)
SgTaskConfig * getConfig()
void correctClockBreak(SgVlbiBand *, SgVlbiStationInfo *, const SgMJD &, double, double, bool, bool=true)
SgMatrix *& tabs4PxyInterpolation()
void setHasPxyInterpolation(bool has)
void zerofyIonoCorrections(const SgTaskConfig *)
double dUt1StdDev() const
void parseVexFile(const QString &, QString &, QString &)
const QList< SgMJD * > & scanEpochs() const
SgCubicSpline * innerUt1Interpolator_
bool hasUt1LibrationContrib() const
const SgIoDriver * getInputDriver() const
void setPath2Masterfile(const QString &)
const QList< SgVlbiBand * > & bands() const
SgSolutionReporter * getReporter()
bool hasWobblePyContrib_
void getAprioriErp(const SgMJD &t, double &vUt1, double &rUt1, double &vPx, double &rPx, double &vPy, double &rPy, double &vCx, double &rCx, double &vCy, double &rCy)
void calculateClockBreaksParameters(QList< SgClockBreakAgent * > &, SgVlbiBand *)
QMap< QString, SgVlbiSourceInfo * > & sourcesByName()
QVector< QString > userCorrectionsName_
static const QString sSkipCode_
const QMap< QString, SgVlbiBaselineInfo * > & baselinesByName() const
bool doPostReadActions4Ints(const SgTaskConfig::AutomaticProcessing &)
bool hasWobbleHighFreqContrib() const
BaselinesByName baselinesByName_
bool hasUt1HighFreqContrib() const
bool resetDataFromLogFiles(bool doCable, bool doMeteo, bool doTsys, const QList< QString > &stations)
double dUt1Value() const
void makeHistory(SgVlbiHistory &)
void calculateClockBreakParameter(const SgMJD &, SgVlbiStationInfo *, SgVlbiBand *, double &, double &)
bool hasUt1Interpolation_
void processVexFile(const QString &, QMap< QString, StationInfo > &, VexInfo &, const QMap< QString, QString > &stn2stn, QString &correlatorName)
SgParameter * pNutXRate()
SgParametersDescriptor * parametersDescriptor_
void createParameters()
QString path2APrioriFiles_
bool importDataFromLogFiles(const QString &path2sessions, const QList< QString > &stations, const QList< QString > &kinds, const QMap< QString, int > *defaultCableSignByStn, const QMap< QString, QString > *rinexFileNameByStn, const QMap< QString, double > *rinexPressureOffsetByStn, bool have2overwriteAntabFile, bool reportAllTsysData, const QString &altPath2InputFiles, const QString &orderOfMeteo)
SgVlbiBand * primaryBand_
bool hasPoleTideContrib_
int getNumOfDOF() const
void setNumOfDOF(int n)
bool getHasPxyInterpolation() const
QMap< QString, SgVlbiObservation * > & observationByKey()
SgTidalUt1::UT1TideContentType getTabsUt1Type() const
SgIoDriver * inputDriver_
const SgVlbiBand * primaryBand() const
bool hasFeedCorrContrib() const
int eliminateOutliers(int bandIdx)
bool hasEarthTideContrib() const
void eliminateOutliersSimpleMode(int bandIdx, int maxNumOfPasses, double threshold, double=0.0)
QMap< int, SgVlbiSourceInfo * > & sourcesByIdx()
SgVlbiSourceInfo * lookupSourceByIdx(int)
QMap< int, SgVlbiStationInfo * > & stationsByIdx()
SgParameter * pUT1_
void setInputDriver(SgIoDriver *drv)
bool hasEarthTideContrib_
void setLongOperationMessage(void(*operation)(const QString &))
int expectedMasterfileVersion_
SgParametersDescriptor * getParametersDescriptor()
SgVector *& args4Ut1Interpolation()
void setPath2APrioriFiles(const QString &)
bool putDataIntoVgosDb(SgVgosDb *vgosDb)
bool hasOutlierEliminationRun_
bool hasWobbleNutContrib() const
static QString className()
bool hasPoleTideContrib() const
int getNumOfParameters() const
SgTaskConfig storedConfig_
virtual void calcTMean()
bool loadIntermediateResults(QDataStream &)
void setReferenceClocksStation(const QString &stnKey)
SgVector * args4Ut1Interpolation_
bool hasPxyLibrationContrib_
SgMatrix * tabs4Ut1Interpolation_
bool hasWobblePxContrib() const
SgParameter * pNutX_
void(* longOperationShowStats_)(const QString &label, int numTot, int numPrc, double wrms, double chi2)
void setConfig(SgTaskConfig *cfg)
bool have2InteractWithGui_
SgParameter * pNutXRate_
bool hasTiltRemvrContrib() const
void setHave2InteractWithGui(bool have2)
int numOfPts4ErpInterpolation_
const SgAPriories & getApAxisOffsets() const
SgParameter * pNutY()
QMap< QString, double > & skyFreqByIfId()
bool hasOceanTideContrib() const
bool hasFeedCorrContrib_
void stnInpt2Key(const QString &stnNameInpt, SgNetworkStations &ns_codes, QString &key)
QMap< int, SgVlbiBaselineInfo * > baselinesByIdx_
SgParameter * pNutX()
bool hasNwetContrib() const
SgMJD lastProcessed_
SourcesByName sourcesByName_
void setTabsUt1Type(SgTidalUt1::UT1TideContentType tp)
bool hasUnPhaseCalContrib() const
bool isAble2InterpolateErp_
SgVlbiBaselineInfo * lookupBaselineByIdx(int)
QVector< bool > & userCorrectionsUse()
SgCubicSpline * innerPxyInterpolator_
QMap< QString, SgVlbiBaselineInfo * > & baselinesByName()
double dUt1Correction() const
void setLastProcessed(const SgMJD &t)
void releaseParameters()
void calculateBaselineClock_F1()
int getExpectedMasterfileVersion() const
void setLongOperationStop(void(*operation)())
SgTaskConfig * config_
bool hasTiltRemvrContrib_
bool check4NameMap(const QMap< QString, QString > &map, QString &name)
bool isAble2InterpolateErp() const
bool getHasUt1Interpolation() const
bool hasOceanTideOldContrib_
SgMatrix * tabs4PxyInterpolation_
QMap< int, SgVlbiSourceInfo * > sourcesByIdx_
bool hasPoleTideOldContrib() const
SgParameter * pPolusX()
bool checkChannelSetup(bool guiExpected)
SgModelEop_JMG_96_hf apHiFyEop_
void setExpectedMasterfileVersion(int v)
SgVersion * driverVersion
Definition: l2aVersion.cpp:31
SgParametersDescriptor parametersDescriptor
Definition: nuSolve.cpp:60