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 
238  //
239  // sets:
243  inline void setConfig(SgTaskConfig* cfg);
244 
248  inline void setReporter(SgSolutionReporter* reporter);
249 
250  inline void setNumOfParameters(int n) {numOfParameters_ = n;};
251  inline void setNumOfConstraints(int n) {numOfConstraints_ = n;};
252  inline void setNumOfDOF(int n) {numOfDOF_ = n;};
253 
254 
259 
262  inline QList<SgVlbiBand*>& bands();
263  inline const QList<SgVlbiBand*>& bands() const {return bands_;};
264  inline QMap<QString, SgVlbiBand*>& bandByKey() {return bandByKey_;};
265 
268  inline SgVlbiBand* primaryBand();
269  inline const SgVlbiBand* primaryBand() const {return primaryBand_;};
270 
274 
275  inline QMap<QString, SgVlbiObservation*>& observationByKey() {return observationByKey_;};
276 
277 
280  inline const QList<SgVlbiObservation*>& observations() const {return observations_;};
281 
284  inline const QList<SgMJD*>& scanEpochs() const {return scanEpochs_;};
285 
288  void setPrimaryBandByIdx(int);
289 
292  inline QMap<QString, SgVlbiStationInfo*>& stationsByName();
293  inline const QMap<QString, SgVlbiStationInfo*>& stationsByName() const {return stationsByName_;};
294 
297  inline QMap<QString, SgVlbiBaselineInfo*>& baselinesByName();
298  inline const QMap<QString, SgVlbiBaselineInfo*>& baselinesByName() const {return baselinesByName_;};
299 
302  inline QMap<QString, SgVlbiSourceInfo*>& sourcesByName();
303  inline const QMap<QString, SgVlbiSourceInfo*>& sourcesByName() const {return sourcesByName_;};
304 
305  //
306  inline QMap<int, SgVlbiStationInfo*>& stationsByIdx() {return stationsByIdx_;}
307  inline QMap<int, SgVlbiBaselineInfo*>& baselinesByIdx() {return baselinesByIdx_;}
308  inline QMap<int, SgVlbiSourceInfo*>& sourcesByIdx() {return sourcesByIdx_;}
309 
310 
311  inline void setPath2Masterfile(const QString&);
312 
313  inline void setPath2APrioriFiles(const QString&);
314 
315  inline QMap<QString, double>& skyFreqByIfId() {return skyFreqByIfId_;};
316  inline const QMap<QString, double>& skyFreqByIfId() const {return skyFreqByIfId_;};
317 
318  // temporary:
321  inline SgParameter* pPolusX();
322 
325  inline SgParameter* pPolusY();
326 
329  inline SgParameter* pUT1();
330 
333  inline SgParameter* pUT1Rate();
334 
337  inline SgParameter* pPolusXRate();
338 
341  inline SgParameter* pPolusYRate();
342 
345  inline SgParameter* pNutX();
346 
347  inline SgParameter* pNutXRate();
348 
351  inline SgParameter* pNutY();
352 
353  inline SgParameter* pNutYRate();
354 
355  inline double getLeapSeconds() {return leapSeconds_;};
356 
357  inline void setLeapSeconds(double s) {leapSeconds_ = s;};
358 
359  inline void setHave2InteractWithGui(bool have2) {have2InteractWithGui_ = have2;};
360 
361  inline void setLongOperationStart(void (*operation)(int, int, const QString&))
362  {longOperationStart_ = operation;};
363 
364  inline void setLongOperationProgress(void (*operation)(int)) {longOperationProgress_ = operation;};
365 
366  inline void setLongOperationStop(void (*operation)()) {longOperationStop_ = operation;};
367 
368  inline void setLongOperationMessage(void (*operation)(const QString&))
369  {longOperationMessage_ = operation;};
370  inline void setLongOperationShowStats(void (*operation)
371  (const QString& label, int numTot, int numPrc, double wrms, double chi2))
372  {longOperationShowStats_ = operation;};
373 
374 // inline void setCalcVersionValue(double v) {calcVersionValue_ = v;};
375 
376  inline void setInputDriver(SgIoDriver* drv) {inputDriver_ = drv;};
377 
378  inline SgModelsInfo& calcInfo() {return calcInfo_;};
379 
384 
385  //
386  // Functions:
387  //
388  inline const SgMJD& tRefer() const {return tRefer_;};
389 
392  int numberOfBands() const;
393 
396  bool getDataFromDbhImages(QMap<QString, SgDbhImage*> &images,
397  bool have2LoadImmatureSession, bool guiExpected);
398 
401  bool getDataFromDbhImage(SgDbhImage *image,
402  bool have2getAll, bool isStandardSession, bool have2LoadImmatureSession, bool guiExpected);
403 
406  bool putDataIntoDbhImage(SgDbhImage *image);
407 
410  bool exportDataIntoNgsFile(const QString& fileName);
411 
414  bool getDataFromVgosDb(SgVgosDb* vgosDb, bool have2LoadImmatureSession, bool guiExpected);
415 
418  bool putDataIntoVgosDb(SgVgosDb* vgosDb);
419 
422  bool getDataFromAgvFile(const QString& fileName, SgIdentities *ids, SgVersion *driverVersion);
423 
426  bool putDataIntoAgvFile(const QString& dirName, const QString& fileName,
428 
431  bool getDataFromFringeFiles(const QString& path2, const QString& altDatabaseName,
432  const QString& altCorrelatorName, const QString& historyFileName, const QString& mapFileName,
433  const QList<QString>&);
434 
437  bool getDataFromKombFiles(const QString& path2, const QString& altDatabaseName,
438  const QString& altCorrelatorName, const QString& historyFileName, const QString& mapFileName,
439  bool need2correctRefClocks);
440 
443  bool selfCheck(bool guiExpected);
444 
445 
449 
452  inline SgVlbiSourceInfo* lookupSourceByIdx(int);
453 
457 
460  void prepare4Analysis();
461 
462  // temporary:
465  void createParameters();
466 
469  void releaseParameters();
470 
473  void resetAllEditings();
474 
478 
481  void zerofyIonoCorrections(const SgTaskConfig*);
482 
486 
489  void calculateClockBreakParameter(const SgMJD&, SgVlbiStationInfo*, SgVlbiBand*, double&, double&);
490 
494 
497  bool detectClockBreaks_mode1(SgVlbiBand*, QString&, SgMJD&);
498 
501  void checkBandForClockBreaks(int, bool);
502 
506 
509  void eliminateOutliersMode1();
510 
516  void eliminateOutliersSimpleMode(int bandIdx, int maxNumOfPasses, double threshold, double=0.0);
517 
523  void eliminateLargeOutliers(int bandIdx, int maxNumOfPasses, double wrmsRatio);
524 
529  int eliminateOutliers(int bandIdx);
530 
535  int restoreOutliers(int bandIdx);
536 
540  void scanBaselines4GrDelayAmbiguities(int bandIdx);
541 
544  void process(bool haveProcessAllBands, bool interactWithGui);
545 
548  void doPostReadActions_old();
549 
550  int suppressNotSoGoodObs();
551 
554  bool doPostReadActions();
555 
556  // automated processing, case of INT sessions, tests:
558 
560  void setReferenceClocksStation(const QString& stnKey);
561 
563 
565 
566  void setClockModelOrder4Stations(int);
567 
568  int doReWeighting();
569 
570  bool check4ClockBreaksAtSBD();
571 
572  // end of automatizations
573  //
576  void correctClockBreak(SgVlbiBand*, SgVlbiStationInfo*, const SgMJD&, double, double, bool, bool=true);
577 
580  void zerofySigma2add();
581 
582 // void reweightByBaselines();
583 
584  QString nickName();
585 
586  QString name4SirFile(bool);
587 
589 
590  bool isInUse(SgVlbiStationInfo*);
591 
593 
594  bool importDataFromLogFiles(const QString& path2sessions, const QList<QString>& stations,
595  const QList<QString>& kinds,
596  const QMap<QString, int>* defaultCableSignByStn,
597  const QMap<QString, QString>* rinexFileNameByStn,
598  const QMap<QString, double>* rinexPressureOffsetByStn,
599  bool have2overwriteAntabFile,
600  bool reportAllTsysData,
601  const QString& altPath2InputFiles,
602  const QString& orderOfMeteo);
603  bool resetDataFromLogFiles(bool doCable, bool doMeteo, bool doTsys, const QList<QString>& stations);
604 
605  void allocUt1InterpolEpochs(double t0, double dt, unsigned int numOfPts);
606  void allocPxyInterpolEpochs(double t0, double dt, unsigned int numOfPts);
607  void allocUt1InterpolValues(const SgVector* vals);
608  void allocPxyInterpolValues(const SgMatrix* vals);
609 
610  void getAprioriErp(const SgMJD& t,
611  double& vUt1, double& rUt1, double& vPx, double& rPx, double& vPy, double& rPy,
612  double& vCx, double& rCx, double& vCy, double& rCy);
613 
614  void setupTimeRefer();
615 
617 
619 
620  bool writeUserData2File(const QString& fileName);
621 
622  //
623  // Friends:
624  //
625 
626  // I/O support:
629  void applyObsCalibrationSetup(int bitFlags, const QList<QString> &calList);
630  void formObsCalibrationSetup(int& bitFlags, QList<QString> &calList);
631 
632  // I/O:
633  //
635 
637  //
638 
639 
640 private:
641  // a list of bands, we are the owner:
643  QMap<QString, SgVlbiBand*> bandByKey_;
645  // a list of observations, an owner:
648  QMap<QString, SgVlbiObservation*> observationByKey_;
649  // owners of pointers (the allocated memmory should be released in the destructor):
653  SgMJD tRefer_; // a reference epoch for polynomial parameters
654 
655  // current configuration:
661 
662  // just for quick look-ups, not the owners:
663  QMap<int, SgVlbiStationInfo*> stationsByIdx_;
664  QMap<int, SgVlbiBaselineInfo*> baselinesByIdx_;
665  QMap<int, SgVlbiSourceInfo*> sourcesByIdx_;
666 
667  //
669  // available "contributions" from a database file:
691 // double calcVersionValue_;
692 
693 
694  // temporary place for EOP-estimations:
705 
706  // and temporary place for pathes:
709  // and apriories:
720  // info for ERP interpolation from the database:
732 
733  static const QString sSkipCode_;
734 
735  // reporter:
737  // info on the last solution:
741 
742  // aux:
743  double leapSeconds_; // mimic CALC/SOLVE behavior
744  //
747  //
748  SgVlbiHistory contemporaryHistory_; // collector for history records
749  // input driver:
751  //
752  //
753  QMap<QString, double> skyFreqByIfId_;
754  //
755  //
756  // User corrections:
757  QVector<bool> userCorrectionsUse_;
758  QVector<QString> userCorrectionsName_;
759 
760 
761 
762  // Functions:
763  //
764  // interactions with GUI:
766  void (*longOperationStart_)(int minStep, int maxStep, const QString& message);
767  void (*longOperationProgress_)(int step);
769  void (*longOperationMessage_)(const QString& message);
770  void (*longOperationShowStats_) (const QString& label, int numTot, int numPrc,
771  double wrms, double chi2);
772 
773 
774  // internal functions:
775  //
778  bool checkChannelSetup(bool guiExpected);
779 
782  virtual void calcTMean();
783 
786  virtual void setUpPrimaryBand();
787 
790  void checkExcludedStations();
791 
792 
795  void collectAPriories();
796 
799  void lookupExternalWeights();
800 
804 
808 
811  void makeHistory(SgVlbiHistory&);
812 
815  void restoreIonCorrections();
816 
819  void parseVexFile(const QString&, QString&, QString&);
820 
823  void processVexFile(const QString&, QMap<QString, StationInfo>&, VexInfo&,
824  const QMap<QString, QString>& stn2stn, QString& correlatorName);
825 
828  void processFringeFile(const QString& path2file, const QString& fringeFileName,
829  const QMap<QString, StationInfo>& stnsInfo, const VexInfo&, const QString& vexFileName,
830  const QMap<QString, QString>& stnNameById, const QMap<QString, QString>& stnNameByI,
831  const QMap<QString, QString>& stn2stn, const QMap<QString, QString>& src2src,
832  const QMap<QString, QString>& bnd2bnd,
833  const QMap<QString, int>& fringeErrorCodeByInt, int& expSerialNumber);
834 
837  void processKombFile(const QString& path2file, const QString& kombFileName,
838  const QMap<QString, QString>& stn2stn, const QMap<QString, QString>& src2src,
839  const QMap<QString, QString>& bnd2bnd);
840 
843  bool getCorrelatorHistory(const QString& fileName);
844 
845 
849  void importMapFile(const QString& mapFileName, QMap<QString, QString>& map4Stn,
850  QMap<QString, QString>& map4Src, QMap<QString, QString>& map4Bnd);
851 
852  bool check4NameMap(const QMap<QString, QString> &map, QString& name);
853 
854 
855 
856  //
857  void search4missedLogFiles(QMap<QString, QString>& logFileByKey, const SgNetworkStations &ns_codes);
858  void stnInpt2Key(const QString& stnNameInpt, SgNetworkStations& ns_codes, QString& key);
859 
860 
861  // ambig.resolv. support:
862  void resolveGrAmbigTriangles(int bandIdx);
863 
864 };
865 /*=====================================================================================================*/
866 
867 
868 //
869 void evaluatePCal4GrpDelay (SgVector&, const SgVector&, int, double&, double&, int, const SgMJD&,
870  const QString&, const QString&);
871 
872 //
873 //void evaluateEffectiveFreqs(const SgVector&, const SgVector&, const SgVector&, const SgVector&,
874 // const SgVector&, const SgVector&, double, double, int, double&, double&,
875 // double&, int, const SgMJD&, const QString&, const QString&);
877  // input:
878  const SgVector& numOfAccPeriodsByChan_USB, const SgVector& numOfAccPeriodsByChan_LSB,
879  const SgVector& refFreqByChan, const SgVector& fringeAmplitudeByChan,
880  const SgVector& numOfSamplesByChan_USB, const SgVector& numOfSamplesByChan_LSB,
881  double sampleRate, double refFreq, int numOfChannels,
882  // output:
883  double& effFreq4GR, double& effFreq4PH, double& effFreq4RT,
884  // type of a correlator
885  const QString& correlatorType,
886  // info about the observation (for Log's purposes) and equalWeightsFlag:
887  const QString& oId,
888  bool useEqualWeights=false);
889 
890 
891 
892 
893 /*=====================================================================================================*/
894 /* */
895 /* SgVlbiSession inline members: */
896 /* */
897 /*=====================================================================================================*/
898 //
899 //
900 // INTERFACES:
901 //
902 //
904 {
905  return config_;
906 };
907 
908 
909 
910 //
912 {
913  return parametersDescriptor_;
914 };
915 
916 
917 
918 //
920 {
921  return reporter_;
922 };
923 
924 
925 
926 //
928 {
929  return apStationPositions_;
930 };
931 
932 
933 
934 //
936 {
937  return apStationVelocities_;
938 };
939 
940 
941 
942 //
944 {
945  return apSourcePositions_;
946 };
947 
948 
949 
950 //
952 {
953  return apSourceStrModel_;
954 };
955 
956 
957 //
959 {
960  return apAxisOffsets_;
961 };
962 
963 
964 
965 //
967 {
968  return apStationGradients_;
969 };
970 
971 
972 
973 //
975 {
976  return apHiFyEop_;
977 };
978 
979 
980 
981 //
983 {
984  return hasUt1Interpolation_;
985 };
986 
987 
988 
989 //
991 {
992  hasUt1Interpolation_ = has;
993 };
994 
995 
996 
997 //
999 {
1000  return hasPxyInterpolation_;
1001 };
1002 
1003 
1004 
1005 //
1007 {
1008  hasPxyInterpolation_ = has;
1009 };
1010 
1011 
1012 
1013 //
1015 {
1016  return isAble2InterpolateErp_;
1017 };
1018 
1019 
1020 
1021 //
1023 {
1024  config_ = cfg;
1027 };
1028 
1029 
1030 
1031 //
1033 {
1034  reporter_ = reporter;
1035 };
1036 
1037 
1038 
1039 //
1041 {
1044 };
1045 
1046 
1047 
1048 //
1050 {
1051  return bands_;
1052 };
1053 
1054 
1055 
1056 //
1058 {
1059  return primaryBand_;
1060 };
1061 
1062 
1063 
1064 //
1066 {
1067  return observations_;
1068 };
1069 
1070 
1071 
1072 //
1073 /*
1074 inline QList<SgVlbiMbandObservation*>* SgVlbiSession::compositeObservations()
1075 {
1076  return &compositeObservations_;
1077 };
1078 
1079 
1080 
1081 //
1082 inline QList<SgVlbiMbandObservation*>* SgVlbiSession::matchedObservations()
1083 {
1084  return &matchedObservations_;
1085 };
1086 */
1087 
1088 
1089 //
1090 inline QMap<QString, SgVlbiStationInfo*>& SgVlbiSession::stationsByName()
1091 {
1092  return stationsByName_;
1093 };
1094 
1095 
1096 
1097 //
1098 inline QMap<QString, SgVlbiBaselineInfo*>& SgVlbiSession::baselinesByName()
1099 {
1100  return baselinesByName_;
1101 };
1102 
1103 
1104 
1105 //
1106 inline QMap<QString, SgVlbiSourceInfo*>& SgVlbiSession::sourcesByName()
1107 {
1108  return sourcesByName_;
1109 };
1110 
1111 
1112 
1113 //
1115 {
1116  return pPolusX_;
1117 };
1118 
1119 
1120 
1121 //
1123 {
1124  return pPolusY_;
1125 };
1126 
1127 
1128 
1129 //
1131 {
1132  return pUT1_;
1133 };
1134 
1135 
1136 
1137 //
1139 {
1140  return pUT1Rate_;
1141 };
1142 
1143 
1144 
1145 //
1147 {
1148  return pPolusXRate_;
1149 };
1150 
1151 
1152 
1153 //
1155 {
1156  return pPolusYRate_;
1157 };
1158 
1159 
1160 
1161 //
1163 {
1164  return pNutX_;
1165 };
1167 {
1168  return pNutXRate_;
1169 };
1170 
1171 
1172 
1173 //
1175 {
1176  return pNutY_;
1177 };
1179 {
1180  return pNutYRate_;
1181 };
1182 
1183 
1184 
1185 //
1186 inline void SgVlbiSession::setPath2Masterfile(const QString& path)
1187 {
1188  path2Masterfile_ = path;
1189 };
1190 
1191 
1192 
1193 //
1194 inline void SgVlbiSession::setPath2APrioriFiles(const QString& path)
1195 {
1196  path2APrioriFiles_ = path;
1197 };
1198 
1199 
1200 
1201 //
1202 // FUNCTIONS:
1203 //
1204 //
1205 //
1206 //
1208 {
1209  if (stationsByIdx_.contains(idx))
1210  return stationsByIdx_.value(idx);
1211  else
1212  return NULL;
1213 };
1214 
1215 
1216 
1217 //
1219 {
1220  if (sourcesByIdx_.contains(idx))
1221  return sourcesByIdx_.value(idx);
1222  else
1223  return NULL;
1224 };
1225 
1226 
1227 
1228 //
1230 {
1231  if (baselinesByIdx_.contains(idx))
1232  return baselinesByIdx_.value(idx);
1233  else
1234  return NULL;
1235 };
1236 
1237 
1238 
1239 
1240 //
1241 // FRIENDS:
1242 //
1243 //
1244 //
1245 
1246 
1247 /*=====================================================================================================*/
1248 
1249 
1250 
1251 
1252 
1253 /*=====================================================================================================*/
1254 //
1255 // aux functions:
1256 //
1257 
1258 
1259 /*=====================================================================================================*/
1260 #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:50
QList< SgMJD * > scanEpochs_
const SgAPriories & getApStationGradients() const
SgAPriories apStationGradients_
void(* longOperationStart_)(int minStep, int maxStep, const QString &message)
SgVlbiBand * primaryBand()
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()
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 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 &))
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
SourcesByName sourcesByName_
void setTabsUt1Type(SgTidalUt1::UT1TideContentType tp)
bool hasUnPhaseCalContrib() const
bool isAble2InterpolateErp_
SgVlbiBaselineInfo * lookupBaselineByIdx(int)
QVector< bool > & userCorrectionsUse()
void checkBandForClockBreaks(int, bool)
SgCubicSpline * innerPxyInterpolator_
QMap< QString, SgVlbiBaselineInfo * > & baselinesByName()
double dUt1Correction() const
void releaseParameters()
void calculateBaselineClock_F1()
QString nickName()
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_
SgVersion * driverVersion
Definition: l2aVersion.cpp:31
SgParametersDescriptor parametersDescriptor
Definition: nuSolve.cpp:60