General Purpose Geodetic Library
NsScrPrx4Session.h
Go to the documentation of this file.
1 /*
2  *
3  * This file is a part of nuSolve. nuSolve is a part of CALC/SOLVE system
4  * and is designed to perform data analyis of a geodetic VLBI session.
5  * Copyright (C) 2017-2020 Sergei Bolotin.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef NS_SCR_PRX_4_SESSION_H
23 #define NS_SCR_PRX_4_SESSION_H
24 
25 
26 #ifdef HAVE_CONFIG_H
27 # include <config.h>
28 #endif
29 
30 
31 #include <QtCore/QtGlobal>
32 
33 
34 #include <QtCore/QDateTime>
35 #include <QtCore/QMap>
36 #include <QtCore/QList>
37 #include <QtCore/QObject>
38 #include <QtCore/QString>
39 #include <QtCore/QStringList>
40 
41 
42 #if 0 < HAVE_SCRIPTS
43 # include <QtScript/QScriptEngine>
44 # include <QtScript/QScriptValue>
45 #endif
46 
47 #include <SgObjectInfo.h>
48 #include <SgVlbiBand.h>
49 #include <SgVlbiBaselineInfo.h>
50 #include <SgVlbiSession.h>
51 #include <SgVlbiSourceInfo.h>
52 #include <SgVlbiStationInfo.h>
53 
54 
55 #include "NsScrPrx4TaskConfig.h"
56 
57 
60 class NsScrPrx4Session;
61 class NsScrPrx4Station;
62 class NsScrPrx4Baseline;
63 class NsScrPrx4Source;
64 
65 
66 /***===================================================================================================*/
72 class NsScrPrx4Object : public QObject
73 {
74  Q_OBJECT
75  Q_PROPERTY(QString key
76  READ getKey)
77  Q_PROPERTY(QString name
78  READ getName)
79  Q_PROPERTY(int numTotal
80  READ getNumTotal)
81  Q_PROPERTY(int numProcessed
82  READ getNumProcessed)
83  Q_PROPERTY(int numUsable
84  READ getNumUsable)
85  Q_PROPERTY(QDateTime tFirst
86  READ getTfirst)
87  Q_PROPERTY(QDateTime tLast
88  READ getTlast)
89  Q_PROPERTY(double sigma2add
90  READ getSigma2add WRITE setSigma2add)
91 // Q_PROPERTY(double normalizedResid
92 // READ getNormedResid)
93 // Q_PROPERTY(double dispersion
94 // READ getDispersion)
95  Q_PROPERTY(double wrms
96  READ getWrms)
97  Q_PROPERTY(double chi2
98  READ getChi2)
99  Q_PROPERTY(double reducedChi2
100  READ getReducedChi2)
101  Q_PROPERTY(double dof
102  READ getDof)
103 
104 
105 public:
106  inline NsScrPrx4Object(SgObjectInfo& obj, QObject *parent=0)
107  : QObject(parent) {obj_=&obj; setUpName();};
108  inline ~NsScrPrx4Object() {obj_=NULL;};
109 
110 public slots:
111  inline const QString& getKey() const {return obj_->getKey();};
112  inline QString getName() const {return name_;};
113  inline int getNumTotal() const {return obj_->numTotal(DT_DELAY);};
114  inline int getNumProcessed() const {return obj_->numProcessed(DT_DELAY);};
115  inline int getNumUsable() const {return obj_->numUsable(DT_DELAY);};
116  inline QDateTime getTfirst() const {return obj_->tFirst(DT_DELAY).toQDateTime();};
117  inline QDateTime getTlast() const {return obj_->tLast(DT_DELAY).toQDateTime();};
118  inline double getSigma2add() const {return obj_->getSigma2add(DT_DELAY);};
119  //inline double getNormedResid() const {return obj_->normedResid(DT_DELAY);};
120  //inline double getDispersion() const {return obj_->dispersion(DT_DELAY, false);};
121  inline double getWrms() const {return obj_->wrms(DT_DELAY);};
122  inline double getChi2() const {return obj_->chi2(DT_DELAY);};
123  inline double getReducedChi2() const {return obj_->reducedChi2(DT_DELAY);};
124  inline double getDof() const {return obj_->dof(DT_DELAY);};
125 
126  inline void setSigma2add(double d) {obj_->setSigma2add(DT_DELAY, d);};
127 
128 
129 protected:
131  QString name_;
132  inline void setUpName() {name_=obj_->getKey().simplified();};
133 };
134 /*=====================================================================================================*/
135 
136 
137 
138 
139 
140 /***===================================================================================================*/
147 {
148  Q_OBJECT
149  Q_PROPERTY(double refFreq
150  READ getRefFreq)
151  Q_PROPERTY(int numOfChannels
152  READ getNumOfChannels)
153  Q_PROPERTY(QDateTime tCreation
154  READ getTCreation)
155  Q_PROPERTY(int inputFileVersion
156  READ getInputFileVersion)
157  Q_PROPERTY(QString correlatorType
158  READ getCorrelatorType)
159  Q_PROPERTY(double groupDelaysAmbigSpacing
161  Q_PROPERTY(const QList<NsScrPrx4Station*>& stations
162  READ getStations)
163  Q_PROPERTY(const QList<NsScrPrx4Baseline*>& baselines
164  READ getBaselines)
165  Q_PROPERTY(const QList<NsScrPrx4Source*>& sources
166  READ getSources)
167 
168 public:
169  inline NsScrPrx4Band(SgVlbiBand& band, QObject *parent=0) : NsScrPrx4Object(band, parent),
171  inline ~NsScrPrx4Band() {};
172  void postLoad(NsScrPrx4Session*);
173 
174 public slots:
175  inline double getRefFreq() const {return bnd()->getFrequency();};
176  inline int getNumOfChannels() const {return bnd()->getMaxNumOfChannels();};
177  inline QDateTime getTCreation() const {return bnd()->getTCreation().toQDateTime();};
178  inline int getInputFileVersion() const {return bnd()->getInputFileVersion();};
179  inline const QString& getCorrelatorType() const {return bnd()->getCorrelatorType();};
180  inline double getGroupDelaysAmbigSpacing() const {return bnd()->typicalGrdAmbigSpacing();};
183  inline const QList<NsScrPrx4Source*>& getSources() {return prxSources_;};
184 
185 protected:
186  inline SgVlbiBand* bnd() {return (SgVlbiBand*)obj_;};
187  inline const SgVlbiBand* bnd() const {return (SgVlbiBand*)obj_;};
188 
189 private:
193 };
194 /*=====================================================================================================*/
195 
196 
197 
198 
199 /***===================================================================================================*/
206 {
207  Q_OBJECT
208 
209  Q_PROPERTY(int numOfClockPolynoms
211  Q_PROPERTY(double cableCalSign
212  READ getCableCalSign)
213  Q_PROPERTY(double latitude
214  READ getLatitude)
215  Q_PROPERTY(double longitude
216  READ getLongitude)
217  Q_PROPERTY(QString sId
218  READ getSid)
219 
220  // Attributes:
221  Q_PROPERTY(bool isValid
222  READ isValid WRITE setIsValid)
223  Q_PROPERTY(bool estimateCoords
225  Q_PROPERTY(bool constrainCoords
227  Q_PROPERTY(bool referenceClocks
229  Q_PROPERTY(bool useCableCal
230  READ getUseCableCal WRITE setUseCableCal)
231  //
232  Q_PROPERTY(bool badMeteo
233  READ getBadMeteo WRITE setBadMeteo)
234  //
235  Q_PROPERTY(bool hasCccFslg
236  READ getHasCccFslg)
237  Q_PROPERTY(bool hasCccCdms
238  READ getHasCccCdms)
239  Q_PROPERTY(bool hasCccPcmt
240  READ getHasCccPcmt)
241  //
242  Q_PROPERTY(bool estimateTroposphere
244  Q_PROPERTY(int numOfScans
245  READ getNumOfScans)
247  READ getAuxObs)
250 // WRITE setFlybyCableCalSource READ getFlybyCableCalSource)
251 
252 
253 public:
255  NsScrPrx4Object(stn, parent), prxAuxes_() {};
256  inline ~NsScrPrx4Station() {prxAuxes_.clear();};
257 
258 public slots:
259  inline int getClocksModelOrder() const {return stn()->getClocksModelOrder();};
260  inline double getCableCalSign() const {return stn()->getCableCalMultiplierDBCal();};
261  inline bool isValid() const {return !stn()->isAttr(SgVlbiStationInfo::Attr_NOT_VALID);};
264  inline bool getRreferenceClocks() const
267  inline bool getBadMeteo() const {return stn()->isAttr(SgVlbiStationInfo::Attr_BAD_METEO);};
271  inline bool getEstimateTroposphere() const
275 
276  inline int getNumOfScans() const {return stn()->auxObservationByScanId()->size();};
277  inline const QList<NsScrPrx4VlbiAuxObservation*>& getAuxObs() const {return prxAuxes_;};
278  inline double getLatitude() const {return stn()->getLatitude();};
279  inline double getLongitude() const {return stn()->getLongitude();};
280  inline QString getSid() const {return stn()->getSid();};
281 
282  inline void setClocksModelOrder(int m) {stn()->setClocksModelOrder(m);};
283  // inline void setCableCalMultiplier(double d) {stn()->setCableCalMultiplier(d);};
284  inline void setIsValid(bool is) {stn()->assignAttr(SgVlbiStationInfo::Attr_NOT_VALID, !is);};
285 
287  inline void setConstrainCoords(bool is)
289  inline void setRreferenceClocks(bool is)
291  inline void setUseCableCal(bool is)
293  inline void setBadMeteo(bool is)
295  inline void setEstimateTroposphere(bool is)
297 //inline void setFlybyCableCalSource(NsScrPrx4TaskConfig::CableCalSource s)
298 // {stn()->setFlybyCableCalSource((SgTaskConfig::CableCalSource) s);};
300 
301 
302 private:
305 
307  inline const SgVlbiStationInfo* stn() const {return (SgVlbiStationInfo*)obj_;};
308  friend class NsScrPrx4Session;
309 };
310 /*=====================================================================================================*/
311 
312 
313 
314 
315 
316 
317 
318 /***===================================================================================================*/
325 {
326 //friend class NsScrPrx4Session;
327  friend class NsScrPrx4Band;
328  Q_OBJECT
329  Q_PROPERTY(double length
330  READ getLength)
331  // Attributes:
332  Q_PROPERTY(bool isValid
333  READ isValid WRITE setIsValid)
334  Q_PROPERTY(bool estimateClocks
337  READ getObservations)
338  // Clock offset estimation:
339  Q_PROPERTY(double clockOffset
340  READ getClockOffset)
341  Q_PROPERTY(double clockOffsetStdDev
343 
344 
345 public:
347  NsScrPrx4Object(bln, parent),
349  {setUpName();};
351 
352 public slots:
353  inline double getLength() const {return bln()->getLength();};
354  inline bool isValid() const {return !bln()->isAttr(SgVlbiBaselineInfo::Attr_NOT_VALID);};
355  inline bool getEstimateClocks() const
358  inline double getClockOffset() const {return bln()->dClock();};
359  inline double getClockOffsetStdDev() const {return bln()->dClockSigma();};
361  inline void setEstimateClocks(bool is)
363 
364 private:
367  //
369  inline const SgVlbiBaselineInfo* bln() const {return (SgVlbiBaselineInfo*)obj_;};
370  inline void setUpName()
371  {name_=obj_->getKey().left(8).simplified() + ":" + obj_->getKey().right(8).simplified();};
372 };
373 /*=====================================================================================================*/
374 
375 
376 
377 
378 
379 
380 /***===================================================================================================*/
387 {
388  Q_OBJECT
389 
390  Q_PROPERTY(double rightAscension
391  READ getRa WRITE setRa)
392  Q_PROPERTY(double declination
393  READ getDn WRITE setDn)
394  //
395  Q_PROPERTY(QString aprioriComments
396  READ getAprioriComments)
397  //
398  // Attributes:
399  Q_PROPERTY(bool isValid
400  READ isValid WRITE setIsValid)
401  Q_PROPERTY(bool estimateCoords
403  Q_PROPERTY(bool constrainCoords
405 //
406  Q_PROPERTY(bool applySsm
407  READ getApplySsm WRITE setApplySsm)
408  Q_PROPERTY(bool testAttr
409  READ getTestAttr WRITE setTestAttr)
410 
411 public:
412  inline NsScrPrx4Source(SgVlbiSourceInfo& src, QObject *parent=0) : NsScrPrx4Object(src, parent) {};
413  inline ~NsScrPrx4Source() {};
414 
415 public slots:
416  inline double getRa() const {return src()->getRA();};
417  inline double getDn() const {return src()->getDN();};
418  //
419  inline bool isValid() const {return !src()->isAttr(SgVlbiSourceInfo::Attr_NOT_VALID);};
422  inline bool getApplySsm() const {return src()->isAttr(SgVlbiSourceInfo::Attr_APPLY_SSM);};
423  inline bool getTestAttr() const {return src()->isAttr(SgVlbiSourceInfo::Attr_TEST);};
424 
425  inline const QString& getAprioriComments() const {return src()->getAprioriComments();};
426 
427  inline void setRa(double d) {src()->setRA(d);};
428  inline void setDn(double d) {src()->setDN(d);};
429  //
430  //
431  inline void setIsValid(bool is) {src()->assignAttr(SgVlbiSourceInfo::Attr_NOT_VALID, !is);};
434  inline void setTestAttr(bool is) {src()->assignAttr(SgVlbiSourceInfo::Attr_TEST, is);};
436 
437  //
438  inline int numOfSrcStructPoints() {return src()->sModel().size();};
439  //
440  inline void addSrcStructPoint(double k, double b, double x, double y,
441  bool estK=false, bool estB=false, bool estR=false)
442  {src()->addSrcStructPoint(k, b, x, y, estK, estB, estR);};
443  //
445  //
446  inline void setK_i(int i, double d) {if (0<=i && i<src()->sModel().size()) src()->sModel()[i].setK(d);};
447  inline void setB_i(int i, double d) {if (0<=i && i<src()->sModel().size()) src()->sModel()[i].setB(d);};
448  inline void setX_i(int i, double d) {if (0<=i && i<src()->sModel().size()) src()->sModel()[i].setX(d);};
449  inline void setY_i(int i, double d) {if (0<=i && i<src()->sModel().size()) src()->sModel()[i].setY(d);};
450 
451  inline double getK_i(int i) const
452  {return 0<=i && i<src()->sModel().size()?src()->sModel().at(i).getK():0.0;};
453  inline double getB_i(int i) const
454  {return 0<=i && i<src()->sModel().size()?src()->sModel().at(i).getB():0.0;};
455  inline double getX_i(int i) const
456  {return 0<=i && i<src()->sModel().size()?src()->sModel().at(i).getX():0.0;};
457  inline double getY_i(int i) const
458  {return 0<=i && i<src()->sModel().size()?src()->sModel().at(i).getY():0.0;};
459  inline double getK_iSig(int i) const
460  {return 0<=i && i<src()->sModel().size()?src()->sModel().at(i).getKsig():0.0;};
461  inline double getB_iSig(int i) const
462  {return 0<=i && i<src()->sModel().size()?src()->sModel().at(i).getBsig():0.0;};
463  inline double getX_iSig(int i) const
464  {return 0<=i && i<src()->sModel().size()?src()->sModel().at(i).getXsig():0.0;};
465  inline double getY_iSig(int i) const
466  {return 0<=i && i<src()->sModel().size()?src()->sModel().at(i).getYsig():0.0;};
467 
468 
469 private:
470  inline SgVlbiSourceInfo* src() {return (SgVlbiSourceInfo*)obj_;};
471  inline const SgVlbiSourceInfo* src() const {return (SgVlbiSourceInfo*)obj_;};
472 };
473 /*=====================================================================================================*/
474 
475 
476 
477 
478 
479 
480 
481 /***===================================================================================================*/
487 class NsScrPrx4Session : public QObject
488 {
489  Q_OBJECT
490 
491  Q_PROPERTY(QString name
492  READ getName)
493  Q_PROPERTY(bool isOk
494  READ getIsOk)
495  Q_PROPERTY(QString networkSuffix
496  READ getNetworkSuffix)
497  Q_PROPERTY(QString sessionCode
498  READ getSessionCode)
499  Q_PROPERTY(QString networkID
500  READ getNetworkID)
501  Q_PROPERTY(QString description
502  READ getDescription)
503  Q_PROPERTY(QString userFlag
504  READ getUserFlag)
505  Q_PROPERTY(QString officialName
506  READ getOfficialName)
507  Q_PROPERTY(QString correlatorName
508  READ getCorrelatorName)
509  Q_PROPERTY(QString correlatorType
510  READ getCorrelatorType)
511  Q_PROPERTY(QString submitterName
512  READ getSubmitterName)
513  Q_PROPERTY(QString schedulerName
514  READ getSchedulerName)
515  Q_PROPERTY(QString piAgencyName
516  READ getPiAgencyName)
517  Q_PROPERTY(int numOfBands
518  READ getNumOfBands)
519  Q_PROPERTY(int numOfStations
520  READ getNumOfStations)
521  Q_PROPERTY(int numOfBaselines
522  READ getNumOfBaselines)
523  Q_PROPERTY(int numOfSources
524  READ getNumOfSources)
525  Q_PROPERTY(int numOfObservations
527  Q_PROPERTY(QDateTime tCreation
528  READ getTCreation)
529  Q_PROPERTY(QDateTime tStart
530  READ getTStart)
531  Q_PROPERTY(QDateTime tFinis
532  READ getTFinis)
533  Q_PROPERTY(QDateTime tMean
534  READ getTMean)
535  Q_PROPERTY(QDateTime tLastProcessed
536  READ getLastProcessed)
537 
538  Q_PROPERTY(int primaryBandIdx
539  READ getPrimaryBandIdx)
540  Q_PROPERTY(const QList<NsScrPrx4Band*>& bands
541  READ getBands)
542  Q_PROPERTY(const QList<NsScrPrx4Station*>& stations
543  READ getStations)
544  Q_PROPERTY(const QList<NsScrPrx4Baseline*>& baselines
545  READ getBaselines)
546  Q_PROPERTY(const QList<NsScrPrx4Source*>& sources
547  READ getSources)
549  READ getObservations)
550 
551  Q_PROPERTY(bool hasReferenceClocksStation
553  Q_PROPERTY(bool hasReferenceCoordinatesStation
555 
556  Q_PROPERTY(double dUt1Value
557  READ dUt1Value)
558  Q_PROPERTY(double dUt1Correction
559  READ dUt1Correction)
560  Q_PROPERTY(double dUt1StdDev
561  READ dUt1StdDev)
562 
563 
564 
565 public:
566  inline NsScrPrx4Session(SgVlbiSession& session, QObject *parent=0)
569  {session_=&session; primaryBandIdx_=-1;};
570 
572  {session_=NULL;
573  prxBands_.clear(); prxStations_.clear(); prxBaselines_.clear(), prxSources_.clear();
574  prxObservations_.clear(); stationsByKey_.clear(); baselinesByKey_.clear(); sourcesByKey_.clear();};
575 
576  inline void setIsOk(bool is) {isOk_=is;};
577  void postLoad();
578 
579 
580 
581 public slots:
582  inline const QString& getName() const {return session_->getName();};
583  inline const QString& getNetworkSuffix() const {return session_->getNetworkSuffix();};
584  inline const QString& getSessionCode() const {return session_->getSessionCode();};
585  inline const QString& getNetworkID() const {return session_->getNetworkID();};
586  inline const QString& getDescription() const {return session_->getDescription();};
587  inline const QString& getUserFlag() const {return session_->getUserFlag();};
588  inline const QString& getOfficialName() const {return session_->getOfficialName();};
589  inline const QString& getCorrelatorName() const {return session_->getCorrelatorName();};
590  inline const QString& getCorrelatorType() const {return session_->getCorrelatorType();};
591  inline const QString& getSubmitterName() const {return session_->getSubmitterName();};
592  inline const QString& getSchedulerName() const {return session_->getSchedulerName();};
593  inline const QString& getPiAgencyName() const {return session_->getPiAgencyName();};
594  inline int getNumOfBands() const {return session_->bandByKey().size();};
595  inline int getNumOfStations() const {return session_->stationsByName().size();};
596  inline int getNumOfBaselines() const {return session_->baselinesByName().size();};
597  inline int getNumOfSources() const {return session_->sourcesByName().size();};
598  inline int getNumOfObservations() const {return session_->observations().size();};
599  inline QDateTime getTCreation() const {return session_->getTCreation().toQDateTime();};
600  inline QDateTime getTStart() const {return session_->getTStart().toQDateTime();};
601  inline QDateTime getTFinis() const {return session_->getTFinis().toQDateTime();};
602  inline QDateTime getTMean() const {return session_->getTMean().toQDateTime();};
603  inline QDateTime getLastProcessed() const {return session_->getLastProcessed().toQDateTime();};
604 
605  inline bool getIsOk() const {return isOk_;};
606  //
607  inline int getPrimaryBandIdx() const {return primaryBandIdx_;};
608  inline const QList<NsScrPrx4Band*>& getBands() {return prxBands_;};
611  inline const QList<NsScrPrx4Source*>& getSources() {return prxSources_;};
613 
614 
615  inline double dUt1Value() const {return session_->dUt1Value();};
616  inline double dUt1Correction() const {return session_->dUt1Correction();};
617  inline double dUt1StdDev() const {return session_->dUt1StdDev();};
618 
619 
620  inline NsScrPrx4Station* lookUpStation(const QString& key)
621  {return stationsByKey_.contains(key)?stationsByKey_.value(key):NULL;};
622  inline NsScrPrx4Baseline* lookUpBaseline(const QString& key)
623  {return baselinesByKey_.contains(key)?baselinesByKey_.value(key):NULL;};
624  inline NsScrPrx4Source* lookUpSource(const QString& key)
625  {return sourcesByKey_.contains(key)?sourcesByKey_.value(key):NULL;};
626 
627 
630 
631  //
632  // functionality:
633  //
634  //
636  //
639  //
640  //
641  inline void resetAllEditings() {if (isOk_) session_->resetAllEditings(false);};
642  //
643  inline void clearAuxSigmas() {if (isOk_) session_->zerofySigma2add();};
644  //
646  //
647  //
649  //
652  //
654  //
655  inline void setReferenceClocksStation(const QString& stnKey)
656  {if (isOk_) session_->setReferenceClocksStation(stnKey);};
657  //
659 
660 
661  //
662  inline void process() {if (isOk_) session_->process(true, false);};
663  //
664  inline void calcIono(bool sbdOnly=false)
665  {if (isOk_) session_->calculateIonoCorrections(sbdOnly?NULL:session_->getConfig());};
666  //
668 
669  //
670  inline int checkClockBreaks(int bandIdx)
671  {if (isOk_) return session_->checkBandForClockBreaks(bandIdx, true); else return 0;};
672  //
673  inline int eliminateOutliers(int bandIdx) {return isOk_?session_->eliminateOutliers(bandIdx):0;};
674  //
675  inline int restoreOutliers(int bandIdx) {return isOk_?session_->restoreOutliers(bandIdx):0;};
676  //
677  inline int doReWeighting() {return isOk_?session_->doReWeighting():0;};
678 
679  //
680  inline void scanAmbiguityMultipliers(int bandIdx)
682 
683  inline void eliminateOutliersSimpleMode(int bandIdx, int maxNumOfPasses,
684  double threshold, double upperLimit)
685  {if (isOk_) session_->eliminateOutliersSimpleMode(bandIdx, maxNumOfPasses, threshold, upperLimit);};
686 
687  inline void eliminateLargeOutliers(int bandIdx, int maxNumOfPasses, double wrmsRatio)
688  {if (isOk_) session_->eliminateLargeOutliers(bandIdx, maxNumOfPasses, wrmsRatio);};
689 
690  inline bool writeUserData2File(const QString& fileName)
691  {if (isOk_) return session_->writeUserData2File(fileName); else return false;};
692 
693  // just a shortcut:
694  inline void doStdSetup()
697 
698 
699 private:
700  bool isOk_;
709  QMap<QString, NsScrPrx4Station*>
711  QMap<QString, NsScrPrx4Baseline*>
713  QMap<QString, NsScrPrx4Source*>
715 
716 };
717 /*=====================================================================================================*/
718 
719 
720 
721 
722 
723 #if 0 < HAVE_SCRIPTS
724 
725 Q_DECLARE_METATYPE(NsScrPrx4Band*);
726 Q_DECLARE_METATYPE(QList<NsScrPrx4Band*>);
727 
728 Q_DECLARE_METATYPE(NsScrPrx4Station*);
729 Q_DECLARE_METATYPE(QList<NsScrPrx4Station*>);
730 
731 Q_DECLARE_METATYPE(NsScrPrx4Baseline*);
732 Q_DECLARE_METATYPE(QList<NsScrPrx4Baseline*>);
733 
734 Q_DECLARE_METATYPE(NsScrPrx4Source*);
735 Q_DECLARE_METATYPE(QList<NsScrPrx4Source*>);
736 
737 #endif
738 
739 
740 
741 
742 
743 
744 
745 
746 
747 
748 
749 
750 
751 
752 
753 /*=====================================================================================================*/
754 //
755 // aux functions:
756 //
757 
758 #if 0 < HAVE_SCRIPTS
759 
760 
761 // band:
762 inline QScriptValue toScriptValue4Band(QScriptEngine *eng, NsScrPrx4Band* const &in)
763 {
764  return eng->newQObject(in);
765 };
766 //
767 inline void fromScriptValue4Band(const QScriptValue &obj, NsScrPrx4Band* &out)
768 {
769  out = qobject_cast<NsScrPrx4Band*>(obj.toQObject());
770 };
771 
772 
773 
774 // station:
775 inline QScriptValue toScriptValue4Stn(QScriptEngine *eng, NsScrPrx4Station* const &in)
776 {
777  return eng->newQObject(in);
778 };
779 //
780 inline void fromScriptValue4Stn(const QScriptValue &obj, NsScrPrx4Station* &out)
781 {
782  out = qobject_cast<NsScrPrx4Station*>(obj.toQObject());
783 };
784 
785 
786 
787 // baseline:
788 inline QScriptValue toScriptValue4Bln(QScriptEngine *eng, NsScrPrx4Baseline* const &in)
789 {
790  return eng->newQObject(in);
791 };
792 //
793 inline void fromScriptValue4Bln(const QScriptValue &obj, NsScrPrx4Baseline* &out)
794 {
795  out = qobject_cast<NsScrPrx4Baseline*>(obj.toQObject());
796 };
797 
798 
799 
800 
801 // source:
802 inline QScriptValue toScriptValue4Src(QScriptEngine *eng, NsScrPrx4Source* const &in)
803 {
804  return eng->newQObject(in);
805 };
806 //
807 inline void fromScriptValue4Src(const QScriptValue &obj, NsScrPrx4Source* &out)
808 {
809  out = qobject_cast<NsScrPrx4Source*>(obj.toQObject());
810 };
811 #endif // SCRIPT_SUPPORT
812 
813 
814 
815 /*=====================================================================================================*/
816 #endif // NS_SCR_PRX_4_SESSION_H
@ DT_DELAY
Definition: SgWrmsable.h:44
const QList< NsScrPrx4Station * > & getStations()
int getNumOfChannels() const
const QList< NsScrPrx4Baseline * > & getBaselines()
QDateTime getTCreation() const
const QString & getCorrelatorType() const
const SgVlbiBand * bnd() const
NsScrPrx4Band(SgVlbiBand &band, QObject *parent=0)
QList< NsScrPrx4Baseline * > prxBaselines_
QList< NsScrPrx4Source * > prxSources_
double getGroupDelaysAmbigSpacing() const
const QList< NsScrPrx4Source * > & getSources()
QString correlatorType
const QList< NsScrPrx4Source * > sources
QList< NsScrPrx4Station * > prxStations_
const QList< NsScrPrx4Baseline * > baselines
SgVlbiBand * bnd()
double groupDelaysAmbigSpacing
void postLoad(NsScrPrx4Session *)
int getInputFileVersion() const
QDateTime tCreation
const QList< NsScrPrx4Station * > stations
double getRefFreq() const
bool isValid() const
SgVlbiBaselineInfo * bln()
const SgVlbiBaselineInfo * bln() const
bool getEstimateClocks() const
double getLength() const
void setEstimateClocks(bool is)
double getClockOffset() const
const QList< NsScrPrx4VlbiObservation * > observations
void setIsValid(bool is)
NsScrPrx4Baseline(SgVlbiBaselineInfo &bln, QObject *parent=0)
QList< NsScrPrx4VlbiObservation * > prxObservations_
double getClockOffsetStdDev() const
const QList< NsScrPrx4VlbiObservation * > & getObservations()
int getNumTotal() const
const QString & getKey() const
QString getName() const
double getReducedChi2() const
QDateTime getTlast() const
int getNumProcessed() const
NsScrPrx4Object(SgObjectInfo &obj, QObject *parent=0)
double getDof() const
double getWrms() const
double getSigma2add() const
int getNumUsable() const
double getChi2() const
SgObjectInfo * obj_
QDateTime getTfirst() const
void setSigma2add(double d)
void scanAmbiguityMultipliers(int bandIdx)
bool hasReferenceClocksStation()
bool hasReferenceCoordinatesStation
QMap< QString, NsScrPrx4Baseline * > baselinesByKey_
QDateTime getTFinis() const
int checkClockBreaks(int bandIdx)
const QString & getCorrelatorType() const
const QList< NsScrPrx4Source * > & getSources()
const QList< NsScrPrx4Station * > stations
QList< NsScrPrx4Baseline * > prxBaselines_
NsScrPrx4Session(SgVlbiSession &session, QObject *parent=0)
QDateTime getTStart() const
NsScrPrx4Baseline * lookUpBaseline(const QString &key)
QDateTime getTMean() const
NsScrPrx4Station * lookUpStation(const QString &key)
QDateTime getTCreation() const
int getNumOfBaselines() const
const QString & getNetworkID() const
QMap< QString, NsScrPrx4Station * > stationsByKey_
const QString & getSubmitterName() const
void pickupReferenceClocksStation()
void dispatchChangeOfZenithParameterModel(SgParameterCfg::PMode)
const QString & getNetworkSuffix() const
const QList< NsScrPrx4Band * > & getBands()
void pickupReferenceCoordinatesStation()
void checkUseOfManualPhaseCals()
const QList< NsScrPrx4VlbiObservation * > & getObservations()
bool writeUserData2File(const QString &fileName)
const QString & getSessionCode() const
int restoreOutliers(int bandIdx)
void calcIono(bool sbdOnly=false)
QList< NsScrPrx4VlbiObservation * > prxObservations_
void dispatchChangeOfClocksParameterModel(SgParameterCfg::PMode)
const QString & getOfficialName() const
QDateTime getLastProcessed() const
const QString & getCorrelatorName() const
double dUt1Value() const
const QList< NsScrPrx4Source * > sources
double dUt1Correction() const
const QString & getName() const
QMap< QString, NsScrPrx4Source * > sourcesByKey_
const QList< NsScrPrx4Baseline * > & getBaselines()
void eliminateLargeOutliers(int bandIdx, int maxNumOfPasses, double wrmsRatio)
double dUt1StdDev() const
void setReferenceClocksStation(const QString &stnKey)
const QString & getUserFlag() const
QList< NsScrPrx4Source * > prxSources_
int getPrimaryBandIdx() const
int eliminateOutliers(int bandIdx)
void eliminateOutliersSimpleMode(int bandIdx, int maxNumOfPasses, double threshold, double upperLimit)
const QString & getSchedulerName() const
const QList< NsScrPrx4Band * > bands
int getNumOfObservations() const
int getNumOfBands() const
const QList< NsScrPrx4Station * > & getStations()
int getNumOfStations() const
const QString & getPiAgencyName() const
QDateTime tLastProcessed
SgVlbiSession * session_
bool hasReferenceCoordinatesStation()
NsScrPrx4Source * lookUpSource(const QString &key)
bool getIsOk() const
const QList< NsScrPrx4VlbiObservation * > observations
const QString & getDescription() const
void setIsOk(bool is)
const QList< NsScrPrx4Baseline * > baselines
int getNumOfSources() const
void setNumOfClockPolynoms4Stations(int n)
QList< NsScrPrx4Band * > prxBands_
QList< NsScrPrx4Station * > prxStations_
double getB_iSig(int i) const
void setEstimateCoords(bool is)
bool getEstimateCoords() const
void setK_i(int i, double d)
void setX_i(int i, double d)
void setB_i(int i, double d)
void setApplySsm(bool is)
void setDn(double d)
bool getConstrainCoords() const
double getK_i(int i) const
void setIsValid(bool is)
bool getTestAttr() const
NsScrPrx4Source(SgVlbiSourceInfo &src, QObject *parent=0)
void setY_i(int i, double d)
SgVlbiSourceInfo * src()
bool getApplySsm() const
void setConstrainCoords(bool is)
double getRa() const
void setTestAttr(bool is)
const QString & getAprioriComments() const
bool isValid() const
double getK_iSig(int i) const
double getY_iSig(int i) const
double getY_i(int i) const
double getB_i(int i) const
double getDn() const
double getX_iSig(int i) const
void setRa(double d)
double getX_i(int i) const
void addSrcStructPoint(double k, double b, double x, double y, bool estK=false, bool estB=false, bool estR=false)
void setBadMeteo(bool is)
double getLongitude() const
bool getHasCccCdms() const
const SgVlbiStationInfo * stn() const
int getClocksModelOrder() const
NsScrPrx4TaskConfig::CableCalSource getFlybyCableCalSource() const
void setEstimateTroposphere(bool is)
NsScrPrx4TaskConfig::CableCalSource flybyCableCalSource
const QList< NsScrPrx4VlbiAuxObservation * > & getAuxObs() const
void setIsValid(bool is)
NsScrPrx4Station(SgVlbiStationInfo &stn, QObject *parent=0)
bool getHasCccFslg() const
SgVlbiStationInfo * stn()
void setClocksModelOrder(int m)
bool getEstimateTroposphere() const
void setRreferenceClocks(bool is)
void setConstrainCoords(bool is)
bool getBadMeteo() const
bool getEstimateCoords() const
const QList< NsScrPrx4VlbiAuxObservation * > auxObs
bool getConstrainCoords() const
void setEstimateCoords(bool is)
double getLatitude() const
int getNumOfScans() const
QList< NsScrPrx4VlbiAuxObservation * > prxAuxes_
QString getSid() const
bool isValid() const
bool setFlybyCableCalSource(NsScrPrx4TaskConfig::CableCalSource s)
bool getRreferenceClocks() const
bool getHasCccPcmt() const
void setUseCableCal(bool is)
bool getUseCableCal() const
double getCableCalSign() const
bool isAttr(uint a) const
Definition: SgAttribute.h:226
void assignAttr(uint a, bool b)
Definition: SgAttribute.h:100
QDateTime toQDateTime() const
Definition: SgMJD.cpp:152
double getSigma2add(DataType) const
Definition: SgObjectInfo.h:367
const QString & getKey() const
Definition: SgObjectInfo.h:319
int numProcessed(DataType dType) const
Definition: SgObjectInfo.h:351
const SgMJD & tFirst(DataType) const
Definition: SgObjectInfo.h:375
int numUsable(DataType) const
Definition: SgObjectInfo.h:359
void setSigma2add(DataType dType, double d)
Definition: SgObjectInfo.h:471
const SgMJD & tLast(DataType) const
Definition: SgObjectInfo.h:383
double dof(DataType) const
Definition: SgObjectInfo.h:575
double chi2(DataType) const
Definition: SgObjectInfo.h:415
double wrms(DataType) const
Definition: SgObjectInfo.h:567
int numTotal(DataType dType) const
Definition: SgObjectInfo.h:343
double reducedChi2(DataType) const
Definition: SgObjectInfo.h:423
int getInputFileVersion() const
Definition: SgVlbiBand.h:344
const SgMJD & getTCreation() const
Definition: SgVlbiBand.h:328
int getMaxNumOfChannels() const
Definition: SgVlbiBand.h:392
double typicalGrdAmbigSpacing() const
Definition: SgVlbiBand.h:159
double getFrequency() const
Definition: SgVlbiBand.h:320
const QString & getCorrelatorType() const
Definition: SgVlbiBand.h:352
@ Attr_ESTIMATE_CLOCKS
estimate baseline clocks;
@ Attr_NOT_VALID
omit the baseline;
double dClockSigma() const
double getLength() const
const QString & getCorrelatorType() const
const SgMJD & getTFinis() const
const QString & getName() const
const QString & getNetworkID() const
const SgMJD & getTStart() const
const QString & getSubmitterName() const
const QString & getUserFlag() const
const QString & getCorrelatorName() const
const QString & getOfficialName() const
const QString & getPiAgencyName() const
const QString & getDescription() const
const QString & getSchedulerName() const
const QString & getNetworkSuffix() const
const QString & getSessionCode() const
const SgMJD & getTMean() const
const SgMJD & getTCreation() const
int checkBandForClockBreaks(int, bool)
bool writeUserData2File(const QString &fileName)
QMap< QString, SgVlbiBand * > & bandByKey()
const SgMJD & getLastProcessed() const
void calculateIonoCorrections(const SgTaskConfig *)
int restoreOutliers(int bandIdx)
QMap< QString, SgVlbiStationInfo * > & stationsByName()
QList< SgVlbiObservation * > & observations()
void process(bool haveProcessAllBands, bool interactWithGui)
void scanBaselines4GrDelayAmbiguities(int bandIdx)
void resetAllEditings(bool have2resetConfig)
void eliminateLargeOutliers(int bandIdx, int maxNumOfPasses, double wrmsRatio)
SgTaskConfig * getConfig()
void zerofyIonoCorrections(const SgTaskConfig *)
double dUt1StdDev() const
QMap< QString, SgVlbiSourceInfo * > & sourcesByName()
double dUt1Value() const
int eliminateOutliers(int bandIdx)
void eliminateOutliersSimpleMode(int bandIdx, int maxNumOfPasses, double threshold, double=0.0)
void setReferenceClocksStation(const QString &stnKey)
QMap< QString, SgVlbiBaselineInfo * > & baselinesByName()
double dUt1Correction() const
const QString & getAprioriComments() const
void addSrcStructPoint(double k, double b, double x, double y, bool estK=false, bool estB=false, bool estR=false)
double getRA() const
QList< StructModelMp > & sModel()
void setDN(double dn)
void setRA(double ra)
double getDN() const
@ Attr_TEST
for testing purposes.
@ Attr_APPLY_SSM
apply the source structure model;
@ Attr_CONSTRAIN_COO
constrain source position in estimation;
@ Attr_NOT_VALID
omit the source;
@ Attr_ESTIMATE_COO
estimate source position;
double getLatitude() const
QMap< QString, SgVlbiAuxObservation * > * auxObservationByScanId()
double getLongitude() const
@ Attr_NOT_VALID
omit the station;
@ Attr_HAS_CCC_FSLG
a station has cable calibrations from FS log file
@ Attr_CONSTRAIN_COO
constrain station position in estimation;
@ Attr_REFERENCE_CLOCKS
the clocks are the reference ones;
@ Attr_DONT_ESTIMATE_TRPS
do not estimate parameters of troposphere delay for station;
@ Attr_IGNORE_CABLE_CAL
do not apply cable calibration;
@ Attr_ESTIMATE_COO
estimate station position;
@ Attr_BAD_METEO
indicates that the station has bad meteo parameters;
@ Attr_HAS_CCC_CDMS
a station has cable calibrations from CDMS
@ Attr_HAS_CCC_PCMT
a station has cable calibrations from PCMT
double getCableCalMultiplierDBCal() const
SgTaskConfig::CableCalSource getFlybyCableCalSource() const
void setClocksModelOrder(int n)
int getClocksModelOrder() const
const char * getSid() const