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 
58 class NsScrPrx4Session;
59 class NsScrPrx4Station;
60 class NsScrPrx4Baseline;
61 class NsScrPrx4Source;
62 
63 
64 /***===================================================================================================*/
70 class NsScrPrx4Object : public QObject
71 {
72  Q_OBJECT
73  Q_PROPERTY(QString key
74  READ getKey)
75  Q_PROPERTY(QString name
76  READ getName)
77  Q_PROPERTY(int numTotal
78  READ getNumTotal)
79  Q_PROPERTY(int numProcessed
80  READ getNumProcessed)
81  Q_PROPERTY(int numUsable
82  READ getNumUsable)
83  Q_PROPERTY(QDateTime tFirst
84  READ getTfirst)
85  Q_PROPERTY(QDateTime tLast
86  READ getTlast)
87  Q_PROPERTY(double sigma2add
88  READ getSigma2add WRITE setSigma2add)
89 // Q_PROPERTY(double normalizedResid
90 // READ getNormedResid)
91 // Q_PROPERTY(double dispersion
92 // READ getDispersion)
93  Q_PROPERTY(double wrms
94  READ getWrms)
95  Q_PROPERTY(double chi2
96  READ getChi2)
97  Q_PROPERTY(double reducedChi2
98  READ getReducedChi2)
99  Q_PROPERTY(double dof
100  READ getDof)
101 
102 
103 public:
104  inline NsScrPrx4Object(SgObjectInfo& obj, QObject *parent=0)
105  : QObject(parent) {obj_=&obj; setUpName();};
106  inline ~NsScrPrx4Object() {obj_=NULL;};
107 
108 public slots:
109  inline const QString& getKey() const {return obj_->getKey();};
110  inline QString getName() const {return name_;};
111  inline int getNumTotal() const {return obj_->numTotal(DT_DELAY);};
112  inline int getNumProcessed() const {return obj_->numProcessed(DT_DELAY);};
113  inline int getNumUsable() const {return obj_->numUsable(DT_DELAY);};
114  inline QDateTime getTfirst() const {return obj_->tFirst(DT_DELAY).toQDateTime();};
115  inline QDateTime getTlast() const {return obj_->tLast(DT_DELAY).toQDateTime();};
116  inline double getSigma2add() const {return obj_->getSigma2add(DT_DELAY);};
117  //inline double getNormedResid() const {return obj_->normedResid(DT_DELAY);};
118  //inline double getDispersion() const {return obj_->dispersion(DT_DELAY, false);};
119  inline double getWrms() const {return obj_->wrms(DT_DELAY);};
120  inline double getChi2() const {return obj_->chi2(DT_DELAY);};
121  inline double getReducedChi2() const {return obj_->reducedChi2(DT_DELAY);};
122  inline double getDof() const {return obj_->dof(DT_DELAY);};
123 
124  inline void setSigma2add(double d) {obj_->setSigma2add(DT_DELAY, d);};
125 
126 
127 protected:
129  QString name_;
130  inline void setUpName() {name_=obj_->getKey().simplified();};
131 };
132 /*=====================================================================================================*/
133 
134 
135 
136 
137 
138 /***===================================================================================================*/
145 {
146  Q_OBJECT
147  Q_PROPERTY(double refFreq
148  READ getRefFreq)
149  Q_PROPERTY(int numOfChannels
150  READ getNumOfChannels)
151  Q_PROPERTY(QDateTime tCreation
152  READ getTCreation)
153  Q_PROPERTY(int inputFileVersion
154  READ getInputFileVersion)
155  Q_PROPERTY(QString correlatorType
156  READ getCorrelatorType)
157  Q_PROPERTY(double groupDelaysAmbigSpacing
159  Q_PROPERTY(const QList<NsScrPrx4Station*>& stations
160  READ getStations)
161  Q_PROPERTY(const QList<NsScrPrx4Baseline*>& baselines
162  READ getBaselines)
163  Q_PROPERTY(const QList<NsScrPrx4Source*>& sources
164  READ getSources)
165 
166 public:
167  inline NsScrPrx4Band(SgVlbiBand& band, QObject *parent=0) : NsScrPrx4Object(band, parent),
169  inline ~NsScrPrx4Band() {};
170  void postLoad();
171 
172 public slots:
173  inline double getRefFreq() const {return bnd()->getFrequency();};
174  inline int getNumOfChannels() const {return bnd()->getMaxNumOfChannels();};
175  inline QDateTime getTCreation() const {return bnd()->getTCreation().toQDateTime();};
176  inline int getInputFileVersion() const {return bnd()->getInputFileVersion();};
177  inline const QString& getCorrelatorType() const {return bnd()->getCorrelatorType();};
178  inline double getGroupDelaysAmbigSpacing() const {return bnd()->typicalGrdAmbigSpacing();};
181  inline const QList<NsScrPrx4Source*>& getSources() {return prxSources_;};
182 
183 protected:
184  inline SgVlbiBand* bnd() {return (SgVlbiBand*)obj_;};
185  inline const SgVlbiBand* bnd() const {return (SgVlbiBand*)obj_;};
186 
187 private:
191 };
192 /*=====================================================================================================*/
193 
194 
195 
196 
197 /***===================================================================================================*/
204 {
205  Q_OBJECT
206 
207  Q_PROPERTY(int numOfClockPolynoms
209  Q_PROPERTY(double cableCalSign
210  READ getCableCalSign)
211  Q_PROPERTY(double latitude
212  READ getLatitude)
213  Q_PROPERTY(double longitude
214  READ getLongitude)
215  Q_PROPERTY(QString sId
216  READ getSid)
217 
218  // Attributes:
219  Q_PROPERTY(bool isValid
220  READ isValid WRITE setIsValid)
221  Q_PROPERTY(bool estimateCoords
223  Q_PROPERTY(bool constrainCoords
225  Q_PROPERTY(bool referenceClocks
227  Q_PROPERTY(bool useCableCal
228  READ getUseCableCal WRITE setUseCableCal)
229  Q_PROPERTY(bool estimateTroposphere
231  Q_PROPERTY(int numOfScans
232  READ getNumOfScans)
234  READ getAuxObs)
235 
236 
237 public:
239  NsScrPrx4Object(stn, parent), prxAuxes_() {};
240  inline ~NsScrPrx4Station() {prxAuxes_.clear();};
241 
242 public slots:
243  inline int getClocksModelOrder() const {return stn()->getClocksModelOrder();};
244  inline double getCableCalSign() const {return stn()->getCableCalMultiplierDBCal();};
245  inline bool isValid() const {return !stn()->isAttr(SgVlbiStationInfo::Attr_NOT_VALID);};
248  inline bool getRreferenceClocks() const
251  inline bool getEstimateTroposphere() const
253  inline int getNumOfScans() const {return stn()->auxObservationByScanId()->size();};
254  inline const QList<NsScrPrx4VlbiAuxObservation*>& getAuxObs() const {return prxAuxes_;};
255  inline double getLatitude() const {return stn()->getLatitude();};
256  inline double getLongitude() const {return stn()->getLongitude();};
257  inline QString getSid() const {return stn()->getSid();};
258 
259  inline void setClocksModelOrder(int m) {stn()->setClocksModelOrder(m);};
260  // inline void setCableCalMultiplier(double d) {stn()->setCableCalMultiplier(d);};
261  inline void setIsValid(bool is) {stn()->assignAttr(SgVlbiStationInfo::Attr_NOT_VALID, !is);};
262 
264  inline void setConstrainCoords(bool is)
266  inline void setRreferenceClocks(bool is)
268  inline void setUseCableCal(bool is)
270  inline void setEstimateTroposphere(bool is)
272 
273 
274 private:
277 
279  inline const SgVlbiStationInfo* stn() const {return (SgVlbiStationInfo*)obj_;};
280  friend class NsScrPrx4Session;
281 };
282 /*=====================================================================================================*/
283 
284 
285 
286 
287 
288 
289 
290 /***===================================================================================================*/
297 {
298  Q_OBJECT
299  Q_PROPERTY(double length
300  READ getLength)
301  // Attributes:
302  Q_PROPERTY(bool isValid
303  READ isValid WRITE setIsValid)
304  Q_PROPERTY(bool estimateClocks
306 
307 public:
309  NsScrPrx4Object(bln, parent) {setUpName();};
310  inline ~NsScrPrx4Baseline() {};
311 
312 public slots:
313  inline double getLength() const {return bln()->getLength();};
314  inline bool isValid() const {return !bln()->isAttr(SgVlbiBaselineInfo::Attr_NOT_VALID);};
315  inline bool getEstimateClocks() const
317 
319  inline void setEstimateClocks(bool is)
321 
322 private:
324  inline const SgVlbiBaselineInfo* bln() const {return (SgVlbiBaselineInfo*)obj_;};
325  inline void setUpName()
326  {name_=obj_->getKey().left(8).simplified() + ":" + obj_->getKey().right(8).simplified();};
327 };
328 /*=====================================================================================================*/
329 
330 
331 
332 
333 
334 
335 /***===================================================================================================*/
342 {
343  Q_OBJECT
344 
345 // Q_PROPERTY(int numOfTotalScans
346 // READ getNumOfTotalScans)
347 // Q_PROPERTY(int numOfProcdScans
348 // READ getNumOfProcdScans)
349  Q_PROPERTY(double rightAscension
350  READ getRa WRITE setRa)
351  Q_PROPERTY(double declination
352  READ getDn WRITE setDn)
353 //
354 /*
355  Q_PROPERTY(double K
356  READ getK WRITE setK)
357  Q_PROPERTY(double B
358  READ getB WRITE setB)
359  Q_PROPERTY(double X
360  READ getX WRITE setX)
361  Q_PROPERTY(double Y
362  READ getY WRITE setY)
363  Q_PROPERTY(double Ksig
364  READ getKsig)
365  Q_PROPERTY(double Bsig
366  READ getBsig)
367  Q_PROPERTY(double Xsig
368  READ getXsig)
369  Q_PROPERTY(double Ysig
370  READ getYsig)
371 
372 
373  Q_PROPERTY(double a0
374  READ getA0 WRITE setA0)
375  Q_PROPERTY(double b0
376  READ getB0 WRITE setB0)
377  Q_PROPERTY(double theta0
378  READ getTheta0 WRITE setTheta0)
379  Q_PROPERTY(double a1
380  READ getA1 WRITE setA1)
381  Q_PROPERTY(double b1
382  READ getB1 WRITE setB1)
383  Q_PROPERTY(double theta1
384  READ getTheta1 WRITE setTheta1)
385 
386  Q_PROPERTY(double a0sig
387  READ getA0sig)
388  Q_PROPERTY(double b0sig
389  READ getB0sig)
390  Q_PROPERTY(double theta0sig
391  READ getTheta0sig)
392  Q_PROPERTY(double a1sig
393  READ getA1sig)
394  Q_PROPERTY(double b1sig
395  READ getB1sig)
396  Q_PROPERTY(double theta1sig
397  READ getTheta1sig)
398 
399  Q_PROPERTY(bool estimateRatio
400  READ getEstimateRatio WRITE setEstimateRatio)
401  Q_PROPERTY(bool estimateSpIdx
402  READ getEstimateSpIdx WRITE setEstimateSpIdx)
403  Q_PROPERTY(bool estimatePosition
404  READ getEstimatePosition WRITE setEstimatePosition)
405 
406  Q_PROPERTY(bool estimateA0
407  READ getEstimateA0 WRITE setEstimateA0)
408  Q_PROPERTY(bool estimateB0
409  READ getEstimateB0 WRITE setEstimateB0)
410  Q_PROPERTY(bool estimateTheta0
411  READ getEstimateTheta0 WRITE setEstimateTheta0)
412  Q_PROPERTY(bool estimateA1
413  READ getEstimateA1 WRITE setEstimateA1)
414  Q_PROPERTY(bool estimateB1
415  READ getEstimateB1 WRITE setEstimateB1)
416  Q_PROPERTY(bool estimateTheta1
417  READ getEstimateTheta1 WRITE setEstimateTheta1)
418 
419  Q_PROPERTY(int smtModelType
420  READ getSmtType WRITE setSmtType)
421 */
422 
423  Q_PROPERTY(QString aprioriComments
424  READ getAprioriComments)
425  //
426  // Attributes:
427  Q_PROPERTY(bool isValid
428  READ isValid WRITE setIsValid)
429  Q_PROPERTY(bool estimateCoords
431  Q_PROPERTY(bool constrainCoords
433 //
434  Q_PROPERTY(bool applySsm
435  READ getApplySsm WRITE setApplySsm)
436  Q_PROPERTY(bool testAttr
437  READ getTestAttr WRITE setTestAttr)
438 
439 public:
440  inline NsScrPrx4Source(SgVlbiSourceInfo& src, QObject *parent=0) : NsScrPrx4Object(src, parent) {};
441  inline ~NsScrPrx4Source() {};
442 
443 public slots:
444  inline double getRa() const {return src()->getRA();};
445  inline double getDn() const {return src()->getDN();};
446 //
447 /*
448  inline double getK() const {return src()->getK();};
449  inline double getB() const {return src()->getB();};
450  inline double getX() const {return src()->getX();};
451  inline double getY() const {return src()->getY();};
452 
453  inline double getA0() const {return src()->getA0();};
454  inline double getB0() const {return src()->getB0();};
455  inline double getTheta0() const {return src()->getTheta0();};
456  inline double getA1() const {return src()->getA1();};
457  inline double getB1() const {return src()->getB1();};
458  inline double getTheta1() const {return src()->getTheta1();};
459 
460  inline double getKsig() const {return src()->getKsig();};
461  inline double getBsig() const {return src()->getBsig();};
462  inline double getXsig() const {return src()->getXsig();};
463  inline double getYsig() const {return src()->getYsig();};
464  inline double getA0sig() const {return src()->getA0Sig();};
465  inline double getB0sig() const {return src()->getB0Sig();};
466  inline double getTheta0sig() const {return src()->getTheta0Sig();};
467  inline double getA1sig() const {return src()->getA1Sig();};
468  inline double getB1sig() const {return src()->getB1Sig();};
469  inline double getTheta1sig() const {return src()->getTheta1Sig();};
470 
471  inline bool getEstimateRatio() const {return src()->getEstimateRatio();};
472  inline bool getEstimateSpIdx() const {return src()->getEstimateSpIdx();};
473  inline bool getEstimatePosition() const {return src()->getEstimatePosition();};
474  inline bool getEstimateA0() const {return src()->getEstimateA0();};
475  inline bool getEstimateB0() const {return src()->getEstimateB0();};
476  inline bool getEstimateTheta0() const {return src()->getEstimateT0();};
477  inline bool getEstimateA1() const {return src()->getEstimateA1();};
478  inline bool getEstimateB1() const {return src()->getEstimateB1();};
479  inline bool getEstimateTheta1() const {return src()->getEstimateT1();};
480  inline int getSmtType() const {return src()->getSmtType();};
481 */
482 //inline int getNumOfTotalScans() const {return src()->getTotalScanNum();};
483 //inline int getNumOfProcdScans() const {return src()->getProcdScanNum();};
484 
485  inline bool isValid() const {return !src()->isAttr(SgVlbiSourceInfo::Attr_NOT_VALID);};
488  inline bool getApplySsm() const {return src()->isAttr(SgVlbiSourceInfo::Attr_APPLY_SSM);};
489  inline bool getTestAttr() const {return src()->isAttr(SgVlbiSourceInfo::Attr_TEST);};
490 
491  inline const QString& getAprioriComments() const {return src()->getAprioriComments();};
492 
493  inline void setRa(double d) {src()->setRA(d);};
494  inline void setDn(double d) {src()->setDN(d);};
495 
496 /*
497  inline void setK(double d) {src()->setK(d);};
498  inline void setB(double d) {src()->setB(d);};
499  inline void setX(double d) {src()->setX(d);};
500  inline void setY(double d) {src()->setY(d);};
501  inline void setA0(double d) {src()->setA0(d);};
502  inline void setB0(double d) {src()->setB0(d);};
503  inline void setTheta0(double d) {src()->setTheta0(d);};
504  inline void setA1(double d) {src()->setA1(d);};
505  inline void setB1(double d) {src()->setB1(d);};
506  inline void setTheta1(double d) {src()->setTheta1(d);};
507 
508  inline void setEstimateRatio(bool e) {src()->setEstimateRatio(e);};
509  inline void setEstimateSpIdx(bool e) {src()->setEstimateSpIdx(e);};
510  inline void setEstimatePosition(bool e) {src()->setEstimatePosition(e);};
511  inline void setEstimateA0(bool e) {src()->setEstimateA0(e);};
512  inline void setEstimateB0(bool e) {src()->setEstimateB0(e);};
513  inline void setEstimateTheta0(bool e) {src()->setEstimateT0(e);};
514  inline void setEstimateA1(bool e) {src()->setEstimateA1(e);};
515  inline void setEstimateB1(bool e) {src()->setEstimateB1(e);};
516  inline void setEstimateTheta1(bool e) {src()->setEstimateT1(e);};
517 
518  inline void setSmtType(int t) {src()->setSmtType((SgVlbiSourceInfo::StructureModelType) t);};
519 */
520  //
521  //
522  inline void setIsValid(bool is) {src()->assignAttr(SgVlbiSourceInfo::Attr_NOT_VALID, !is);};
525  inline void setTestAttr(bool is) {src()->assignAttr(SgVlbiSourceInfo::Attr_TEST, is);};
527 
528  //
529  inline int numOfSrcStructPoints() {return src()->sModel().size();};
530  //
531  inline void addSrcStructPoint(double k, double b, double x, double y,
532  bool estK=false, bool estB=false, bool estR=false)
533  {src()->addSrcStructPoint(k, b, x, y, estK, estB, estR);};
534  //
536 
537  //
538  inline void setK_i(int i, double d) {if (0<=i && i<src()->sModel().size()) src()->sModel()[i].setK(d);};
539  inline void setB_i(int i, double d) {if (0<=i && i<src()->sModel().size()) src()->sModel()[i].setB(d);};
540  inline void setX_i(int i, double d) {if (0<=i && i<src()->sModel().size()) src()->sModel()[i].setX(d);};
541  inline void setY_i(int i, double d) {if (0<=i && i<src()->sModel().size()) src()->sModel()[i].setY(d);};
542 
543  inline double getK_i(int i) const
544  {return 0<=i && i<src()->sModel().size()?src()->sModel().at(i).getK():0.0;};
545  inline double getB_i(int i) const
546  {return 0<=i && i<src()->sModel().size()?src()->sModel().at(i).getB():0.0;};
547  inline double getX_i(int i) const
548  {return 0<=i && i<src()->sModel().size()?src()->sModel().at(i).getX():0.0;};
549  inline double getY_i(int i) const
550  {return 0<=i && i<src()->sModel().size()?src()->sModel().at(i).getY():0.0;};
551  inline double getK_iSig(int i) const
552  {return 0<=i && i<src()->sModel().size()?src()->sModel().at(i).getKsig():0.0;};
553  inline double getB_iSig(int i) const
554  {return 0<=i && i<src()->sModel().size()?src()->sModel().at(i).getBsig():0.0;};
555  inline double getX_iSig(int i) const
556  {return 0<=i && i<src()->sModel().size()?src()->sModel().at(i).getXsig():0.0;};
557  inline double getY_iSig(int i) const
558  {return 0<=i && i<src()->sModel().size()?src()->sModel().at(i).getYsig():0.0;};
559 
560 
561 private:
562  inline SgVlbiSourceInfo* src() {return (SgVlbiSourceInfo*)obj_;};
563  inline const SgVlbiSourceInfo* src() const {return (SgVlbiSourceInfo*)obj_;};
564 };
565 /*=====================================================================================================*/
566 
567 
568 
569 
570 
571 
572 
573 /***===================================================================================================*/
579 class NsScrPrx4Session : public QObject
580 {
581  Q_OBJECT
582 
583  Q_PROPERTY(QString name
584  READ getName)
585  Q_PROPERTY(bool isOk
586  READ getIsOk)
587  Q_PROPERTY(QString networkSuffix
588  READ getNetworkSuffix)
589  Q_PROPERTY(QString sessionCode
590  READ getSessionCode)
591  Q_PROPERTY(QString networkID
592  READ getNetworkID)
593  Q_PROPERTY(QString description
594  READ getDescription)
595  Q_PROPERTY(QString userFlag
596  READ getUserFlag)
597  Q_PROPERTY(QString officialName
598  READ getOfficialName)
599  Q_PROPERTY(QString correlatorName
600  READ getCorrelatorName)
601  Q_PROPERTY(QString correlatorType
602  READ getCorrelatorType)
603  Q_PROPERTY(QString submitterName
604  READ getSubmitterName)
605  Q_PROPERTY(QString schedulerName
606  READ getSchedulerName)
607  Q_PROPERTY(QString piAgencyName
608  READ getPiAgencyName)
609  Q_PROPERTY(int numOfBands
610  READ getNumOfBands)
611  Q_PROPERTY(int numOfStations
612  READ getNumOfStations)
613  Q_PROPERTY(int numOfBaselines
614  READ getNumOfBaselines)
615  Q_PROPERTY(int numOfSources
616  READ getNumOfSources)
617  Q_PROPERTY(int numOfObservations
619  Q_PROPERTY(QDateTime tCreation
620  READ getTCreation)
621  Q_PROPERTY(QDateTime tStart
622  READ getTStart)
623  Q_PROPERTY(QDateTime tFinis
624  READ getTFinis)
625  Q_PROPERTY(QDateTime tMean
626  READ getTMean)
627 
628  Q_PROPERTY(int primaryBandIdx
629  READ getPrimaryBandIdx)
630  Q_PROPERTY(const QList<NsScrPrx4Band*>& bands
631  READ getBands)
632  Q_PROPERTY(const QList<NsScrPrx4Station*>& stations
633  READ getStations)
634  Q_PROPERTY(const QList<NsScrPrx4Baseline*>& baselines
635  READ getBaselines)
636  Q_PROPERTY(const QList<NsScrPrx4Source*>& sources
637  READ getSources)
639  READ getObservations)
640 
641  Q_PROPERTY(bool hasReferenceClocksStation
643  Q_PROPERTY(bool hasReferenceCoordinatesStation
645 
646  Q_PROPERTY(double dUt1Value
647  READ dUt1Value)
648  Q_PROPERTY(double dUt1Correction
649  READ dUt1Correction)
650  Q_PROPERTY(double dUt1StdDev
651  READ dUt1StdDev)
652 
653 
654 
655 public:
656  inline NsScrPrx4Session(SgVlbiSession& session, QObject *parent=0)
659  {session_=&session; primaryBandIdx_=-1;};
660 
662  {session_=NULL;
663  prxBands_.clear(); prxStations_.clear(); prxBaselines_.clear(), prxSources_.clear();
664  prxObservations_.clear(); stationsByKey_.clear(); baselinesByKey_.clear(); sourcesByKey_.clear();};
665 
666  inline void setIsOk(bool is) {isOk_=is;};
667  void postLoad();
668 
669 
670 
671 public slots:
672  inline const QString& getName() const {return session_->getName();};
673  inline const QString& getNetworkSuffix() const {return session_->getNetworkSuffix();};
674  inline const QString& getSessionCode() const {return session_->getSessionCode();};
675  inline const QString& getNetworkID() const {return session_->getNetworkID();};
676  inline const QString& getDescription() const {return session_->getDescription();};
677  inline const QString& getUserFlag() const {return session_->getUserFlag();};
678  inline const QString& getOfficialName() const {return session_->getOfficialName();};
679  inline const QString& getCorrelatorName() const {return session_->getCorrelatorName();};
680  inline const QString& getCorrelatorType() const {return session_->getCorrelatorType();};
681  inline const QString& getSubmitterName() const {return session_->getSubmitterName();};
682  inline const QString& getSchedulerName() const {return session_->getSchedulerName();};
683  inline const QString& getPiAgencyName() const {return session_->getPiAgencyName();};
684  inline int getNumOfBands() const {return session_->bandByKey().size();};
685  inline int getNumOfStations() const {return session_->stationsByName().size();};
686  inline int getNumOfBaselines() const {return session_->baselinesByName().size();};
687  inline int getNumOfSources() const {return session_->sourcesByName().size();};
688  inline int getNumOfObservations() const {return session_->observations().size();};
689  inline QDateTime getTCreation() const {return session_->getTCreation().toQDateTime();};
690  inline QDateTime getTStart() const {return session_->getTStart().toQDateTime();};
691  inline QDateTime getTFinis() const {return session_->getTFinis().toQDateTime();};
692  inline QDateTime getTMean() const {return session_->getTMean().toQDateTime();};
693  inline bool getIsOk() const {return isOk_;};
694  //
695  inline int getPrimaryBandIdx() const {return primaryBandIdx_;};
696  inline const QList<NsScrPrx4Band*>& getBands() {return prxBands_;};
699  inline const QList<NsScrPrx4Source*>& getSources() {return prxSources_;};
701 
702 
703  inline double dUt1Value() const {return session_->dUt1Value();};
704  inline double dUt1Correction() const {return session_->dUt1Correction();};
705  inline double dUt1StdDev() const {return session_->dUt1StdDev();};
706 
707 
708  inline NsScrPrx4Station* lookUpStation(const QString& key)
709  {return stationsByKey_.contains(key)?stationsByKey_.value(key):NULL;};
710  inline NsScrPrx4Baseline* lookUpBaseline(const QString& key)
711  {return baselinesByKey_.contains(key)?baselinesByKey_.value(key):NULL;};
712  inline NsScrPrx4Source* lookUpSource(const QString& key)
713  {return sourcesByKey_.contains(key)?sourcesByKey_.value(key):NULL;};
714 
715 
718 
719  //
720  // functionality:
721  //
722  //
724  //
727  //
728  //
730  //
731  inline void clearAuxSigmas() {if (isOk_) session_->zerofySigma2add();};
732  //
734  //
735  //
737  //
740  //
742  //
743  inline void setReferenceClocksStation(const QString& stnKey)
744  {if (isOk_) session_->setReferenceClocksStation(stnKey);};
745  //
747 
748 
749  //
750  inline void process() {if (isOk_) session_->process(true, false);};
751  //
752  inline void calcIono(bool sbdOnly=false)
753  {if (isOk_) session_->calculateIonoCorrections(sbdOnly?NULL:session_->getConfig());};
754  //
756 
757  //
758  inline void checkClockBreaks(int bandIdx)
759  {if (isOk_) session_->checkBandForClockBreaks(bandIdx, true);};
760  //
761  inline int eliminateOutliers(int bandIdx) {return isOk_?session_->eliminateOutliers(bandIdx):0;};
762  //
763  inline int restoreOutliers(int bandIdx) {return isOk_?session_->restoreOutliers(bandIdx):0;};
764  //
765  inline int doReWeighting() {return isOk_?session_->doReWeighting():0;};
766 
767  //
768  inline void scanAmbiguityMultipliers(int bandIdx)
770 
771  inline void eliminateOutliersSimpleMode(int bandIdx, int maxNumOfPasses,
772  double threshold, double upperLimit)
773  {if (isOk_) session_->eliminateOutliersSimpleMode(bandIdx, maxNumOfPasses, threshold, upperLimit);};
774 
775  inline void eliminateLargeOutliers(int bandIdx, int maxNumOfPasses, double wrmsRatio)
776  {if (isOk_) session_->eliminateLargeOutliers(bandIdx, maxNumOfPasses, wrmsRatio);};
777 
778  inline bool writeUserData2File(const QString& fileName)
779  {if (isOk_) return session_->writeUserData2File(fileName); else return false;};
780 
781  // just a shortcut:
782  inline void doStdSetup()
785 
786 
787 private:
788  bool isOk_;
797  QMap<QString, NsScrPrx4Station*>
799  QMap<QString, NsScrPrx4Baseline*>
801  QMap<QString, NsScrPrx4Source*>
803 
804 };
805 /*=====================================================================================================*/
806 
807 
808 
809 
810 
811 #if 0 < HAVE_SCRIPTS
812 
813 Q_DECLARE_METATYPE(NsScrPrx4Band*);
814 Q_DECLARE_METATYPE(QList<NsScrPrx4Band*>);
815 
816 Q_DECLARE_METATYPE(NsScrPrx4Station*);
817 Q_DECLARE_METATYPE(QList<NsScrPrx4Station*>);
818 
819 Q_DECLARE_METATYPE(NsScrPrx4Baseline*);
820 Q_DECLARE_METATYPE(QList<NsScrPrx4Baseline*>);
821 
822 Q_DECLARE_METATYPE(NsScrPrx4Source*);
823 Q_DECLARE_METATYPE(QList<NsScrPrx4Source*>);
824 
825 #endif
826 
827 
828 
829 
830 
831 
832 
833 
834 
835 
836 
837 
838 
839 
840 
841 /*=====================================================================================================*/
842 //
843 // aux functions:
844 //
845 
846 #if 0 < HAVE_SCRIPTS
847 
848 
849 // band:
850 inline QScriptValue toScriptValue4Band(QScriptEngine *eng, NsScrPrx4Band* const &in)
851 {
852  return eng->newQObject(in);
853 };
854 //
855 inline void fromScriptValue4Band(const QScriptValue &obj, NsScrPrx4Band* &out)
856 {
857  out = qobject_cast<NsScrPrx4Band*>(obj.toQObject());
858 };
859 
860 
861 
862 // station:
863 inline QScriptValue toScriptValue4Stn(QScriptEngine *eng, NsScrPrx4Station* const &in)
864 {
865  return eng->newQObject(in);
866 };
867 //
868 inline void fromScriptValue4Stn(const QScriptValue &obj, NsScrPrx4Station* &out)
869 {
870  out = qobject_cast<NsScrPrx4Station*>(obj.toQObject());
871 };
872 
873 
874 
875 // baseline:
876 inline QScriptValue toScriptValue4Bln(QScriptEngine *eng, NsScrPrx4Baseline* const &in)
877 {
878  return eng->newQObject(in);
879 };
880 //
881 inline void fromScriptValue4Bln(const QScriptValue &obj, NsScrPrx4Baseline* &out)
882 {
883  out = qobject_cast<NsScrPrx4Baseline*>(obj.toQObject());
884 };
885 
886 
887 
888 
889 // source:
890 inline QScriptValue toScriptValue4Src(QScriptEngine *eng, NsScrPrx4Source* const &in)
891 {
892  return eng->newQObject(in);
893 };
894 //
895 inline void fromScriptValue4Src(const QScriptValue &obj, NsScrPrx4Source* &out)
896 {
897  out = qobject_cast<NsScrPrx4Source*>(obj.toQObject());
898 };
899 #endif // SCRIPT_SUPPORT
900 
901 
902 
903 /*=====================================================================================================*/
904 #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
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)
void setIsValid(bool is)
NsScrPrx4Baseline(SgVlbiBaselineInfo &bln, QObject *parent=0)
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
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
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
void checkClockBreaks(int bandIdx)
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)
double getLongitude() const
const SgVlbiStationInfo * stn() const
int getClocksModelOrder() const
void setEstimateTroposphere(bool is)
const QList< NsScrPrx4VlbiAuxObservation * > & getAuxObs() const
void setIsValid(bool is)
NsScrPrx4Station(SgVlbiStationInfo &stn, QObject *parent=0)
SgVlbiStationInfo * stn()
void setClocksModelOrder(int m)
bool getEstimateTroposphere() const
void setRreferenceClocks(bool is)
void setConstrainCoords(bool is)
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 getRreferenceClocks() 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:151
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 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
bool writeUserData2File(const QString &fileName)
QMap< QString, SgVlbiBand * > & bandByKey()
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 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)
void checkBandForClockBreaks(int, bool)
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_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;
double getCableCalMultiplierDBCal() const
void setClocksModelOrder(int n)
int getClocksModelOrder() const
const char * getSid() const