General Purpose Geodetic Library
SgVlbiObservable.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_OBSERVABLE_H
24 #define SG_VLBI_OBSERVABLE_H
25 
26 
27 #ifdef HAVE_CONFIG_H
28 # include <config.h>
29 #endif
30 
31 
32 #include <math.h>
33 
34 #include <QtCore/QList>
35 #include <QtCore/QString>
36 
37 class QDataStream;
38 
39 
40 #include <SgVlbiMeasurement.h>
41 
42 
43 class SgMatrix;
44 class SgTaskConfig;
45 class SgVector;
46 class SgVlbiBand;
47 class SgVlbiBaselineInfo;
48 class SgVlbiObservation;
49 class SgVlbiStationInfo;
50 class SgVlbiSourceInfo;
51 
52 
53 /***===================================================================================================*/
60 {
61 public:
62  //
64  {
68  PCCI_OFFSET = 3
69  };
71  {
72  NUR_LOW_QF = 1<<0,
78  NUR_UNMATED = 1<<6,
82  };
83  //
84  // constructors/destructors:
85  //
90 
92 
94 
98  inline ~SgVlbiObservable();
99 
100 
101 
102  //
103  // Interfaces:
104  //
105  // gets:
108  inline const QString& getBandKey() const;
109 
112  inline int getMediaIdx() const;
113 
116  inline SgVlbiObservation* owner();
117 
120  inline SgVlbiBand* band();
121 
124  inline SgVlbiBaselineInfo* &baseline();
125 
128  inline SgVlbiStationInfo* &stn_1();
129 
132  inline SgVlbiStationInfo* &stn_2();
133 
136  inline SgVlbiSourceInfo* &src();
137 
140  inline SgVlbiBaselineInfo* getBaseline() const;
141 
144  inline SgVlbiStationInfo* getStn_1() const;
145 
148  inline SgVlbiStationInfo* getStn_2() const;
149 
152  inline SgVlbiSourceInfo* getSrc() const;
153 
156  inline SgVlbiMeasurement& sbDelay();
157 
160  inline SgVlbiMeasurement& grDelay();
161 
164  inline SgVlbiMeasurement& phDelay();
165 
168  inline SgVlbiMeasurement& phDRate();
169 
172  inline const QString& getErrorCode() const;
173 
176  inline int getQualityFactor() const;
177 
180  inline double getReferenceFrequency() const;
181 
184  inline double getTotalPhase() const;
185 
188  inline double getCorrCoeff() const;
189 
192  inline double getSnr() const;
193 
196  inline int getNumOfChannels() const;
197 
202  inline SgVector* refFreqByChan() {return refFreqByChan_;};
205  inline QVector<char>* polarization_1ByChan() {return polarization_1ByChan_;};
206  inline QVector<char>* polarization_2ByChan() {return polarization_2ByChan_;};
209  inline int getPhaseCalModes() const {return phaseCalModes_;};
210  inline SgVector* vDlys() {return vDlys_;};
211  inline SgVector* vAuxData() {return vAuxData_;};
212  inline QVector<int>* corelIndexNumUSB() {return corelIndexNumUSB_;};
213  inline QVector<int>* corelIndexNumLSB() {return corelIndexNumLSB_;};
214 
215  inline QVector<char>* chanIdByChan() {return chanIdByChan_;};
218  inline QVector<int>* bbcIdxByChan_1() {return bbcIdxByChan_1_;};
219  inline QVector<int>* bbcIdxByChan_2() {return bbcIdxByChan_2_;};
220 
223  inline const SgVector* numOfSamplesByChan_USB() const {return numOfSamplesByChan_USB_;};
224  inline const SgVector* numOfSamplesByChan_LSB() const {return numOfSamplesByChan_LSB_;};
225  inline const SgVector* refFreqByChan() const {return refFreqByChan_;};
226  inline const SgVector* fringeAmplitudeByChan() const {return fringeAmplitudeByChan_;};
227  inline const SgVector* fringePhaseByChan() const {return fringePhaseByChan_;};
228  inline const QVector<char>* polarization_1ByChan() const {return polarization_1ByChan_;};
229  inline const QVector<char>* polarization_2ByChan() const {return polarization_2ByChan_;};
230  inline const SgMatrix* phaseCalData_1ByChan() const {return phaseCalData_1ByChan_;};
231  inline const SgMatrix* phaseCalData_2ByChan() const {return phaseCalData_2ByChan_;};
232  inline const SgVector* vDlys() const {return vDlys_;};
233  inline const SgVector* vAuxData() const {return vAuxData_;};
234  inline const QVector<int>* corelIndexNumUSB() const {return corelIndexNumUSB_;};
235  inline const QVector<int>* corelIndexNumLSB() const {return corelIndexNumLSB_;};
236 
237  inline const QVector<char>* chanIdByChan() const {return chanIdByChan_;};
238  inline const SgVector* loFreqByChan_1() const {return loFreqByChan_1_;};
239  inline const SgVector* loFreqByChan_2() const {return loFreqByChan_2_;};
240  inline const QVector<int>* bbcIdxByChan_1() const {return bbcIdxByChan_1_;};
241  inline const QVector<int>* bbcIdxByChan_2() const {return bbcIdxByChan_2_;};
242 
243  inline double getPhaseCalGrDelays(int i) const {return phaseCalGrDelays_[-1<i&&i<2?i:0];};
244  inline double getPhaseCalPhDelays(int i) const {return phaseCalPhDelays_[-1<i&&i<2?i:0];};
245  inline double getPhaseCalGrAmbigSpacings(int i) const
246  {return phaseCalGrAmbigSpacings_[-1<i&&i<2?i:0];};
247  inline double getPhaseCalPhAmbigSpacings(int i) const
248  {return phaseCalPhAmbigSpacings_[-1<i&&i<2?i:0];};
249  inline int getPhaseCalGrAmbigMultipliers(int i) const
250  {return phaseCalGrAmbigMultipliers_[-1<i&&i<2?i:0];};
251  inline int getPhaseCalPhAmbigMultipliers(int i) const
252  {return phaseCalPhAmbigMultipliers_[-1<i&&i<2?i:0];};
253  inline double getPhaseCalRates(int i) const {return phaseCalRates_[-1<i&&i<2?i:0];};
254  inline double getUvFrPerAsec(int i) const {return uvFrPerAsec_[-1<i&&i<2?i:0];};
255  inline double getUrVr(int i) const {return uRvR_[-1<i&&i<2?i:0];};
256  inline double getCorrClocks(int i, int j) const {return corrClocks_[-1<i&&i<2?i:0][-1<j&&j<2?j:0];};
257  inline double getInstrDelay(int i) const {return instrDelay_[-1<i&&i<2?i:0];};
258  inline int getNlags() const {return nLags_;};
259  inline double getFourfitSearchParameters(int i) const {return fourfitSearchParameters_[-1<i&&i<6?i:0];};
260  inline int getHopsRevisionNumber() const {return hopsRevisionNumber_;};
261 
262 
263 
266  inline const QString& getFourfitOutputFName() const;
267  inline int getFourfitVersion(int idx) const {return fourfitVersion_[-1<idx&&idx<2?idx:0];};
268  inline const QString& getFourfitControlFile() const {return fourfitControlFile_;};
269  inline const QString& getFourfitCommandOverride() const {return fourfitCommandOverride_;};
270 
271  inline const SgMJD& getEpochOfCorrelation() const;
272  inline const SgMJD& getEpochOfFourfitting() const;
273  inline const SgMJD& getEpochOfScan() const;
274  inline const SgMJD& getEpochCentral() const;
275  inline const QString& getTapeQualityCode() const {return tapeQualityCode_;};
276  inline const SgMJD& getTstart() const {return tStart_;};
277  inline const SgMJD& getTstop() const {return tStop_;};
278 
279  inline int getStartOffset() const {return startOffset_;};
280  inline int getStopOffset() const {return stopOffset_;};
281  inline double getCentrOffset() const {return centrOffset_;};
282  inline double getSampleRate() const {return sampleRate_;};
283  inline int getBitsPerSample() const {return bitsPerSample_;};
284  inline double getEffIntegrationTime() const {return effIntegrationTime_;};
285  inline double getAcceptedRatio() const {return acceptedRatio_;};
286  inline double getDiscardRatio() const {return discardRatio_;};
287  inline double getIncohChanAddAmp() const {return incohChanAddAmp_;};
288  inline double getIncohSegmAddAmp() const {return incohSegmAddAmp_;};
289  inline double getProbabOfFalseDetection() const {return probabOfFalseDetection_;};
290  inline double getGeocenterTotalPhase() const {return geocenterTotalPhase_;};
291  inline double getGeocenterResidPhase() const {return geocenterResidPhase_ ;};
292  inline double getAprioriDra(int i) const {return aPrioriDra_[-1<i&&i<3?i:0];};
293  inline double getCalcFeedCorrDelay() const {return calcFeedCorrDelay_;};
294  inline double getCalcFeedCorrRate () const {return calcFeedCorrRate_;};
295 
296  inline double getCorrelStarElev_1() const {return correlStarElev_1_;};
297  inline double getCorrelStarElev_2() const {return correlStarElev_2_;};
298  inline double getCorrelZdelay_1 () const {return correlZdelay_1_;};
299  inline double getCorrelZdelay_2 () const {return correlZdelay_2_;};
300 
301 
302 
303  inline SgVlbiMeasurement* activeDelay(); // can be NULL
304  inline SgVlbiMeasurement* activeRate(); // can be NULL
305 
306 
307  // temporary/tests:
308  inline double getSbdDiffBand() const;
309  inline double getGrdDiffBand() const;
310  inline double getPhrDiffBand() const;
311  inline double getSbdQ() const;
312  inline double getGrdQ() const;
313  inline double getPhrQ() const;
314 
315  inline double getTauS() const {return dTauS_;};
316  inline double getTest() const {return dTest_;};
317  inline double getTest2() const {return dTest2_;};
318 
319  // sets:
322  inline void setBandKey(const QString&);
323 
326  inline void setMediaIdx(int);
327 
330  inline void setErrorCode(const QString&);
331 
334  inline void setQualityFactor(int);
335 
338  inline void setReferenceFrequency(double);
339 
342  inline void setTotalPhase(double);
343 
346  inline void setCorrCoeff(double);
347 
350  inline void setSnr(double);
351 
354  inline void setNumOfChannels(int);
355 
358  inline void setFourfitOutputFName(const QString&);
359  inline void setFourfitVersion(int idx, int ver) {fourfitVersion_[-1<idx&&idx<2?idx:0]=ver;};
360  inline void setFourfitControlFile(const QString& cf) {fourfitControlFile_=cf;};
361  inline void setFourfitCommandOverride(const QString& co) {fourfitCommandOverride_=co;};
362 
363  inline void setEpochOfCorrelation(const SgMJD&);
364  inline void setEpochOfFourfitting(const SgMJD&);
365  inline void setEpochOfScan(const SgMJD&);
366  inline void setEpochCentral(const SgMJD&);
367  inline void setTapeQualityCode(const QString& code) {tapeQualityCode_ = code;};
368 
369  inline void setTstart(const SgMJD& t) {tStart_=t;};
370  inline void setTstop(const SgMJD& t) {tStop_=t;};
371 
372  inline void setStartOffset(int offset) {startOffset_=offset;};
373  inline void setStopOffset(int offset) {stopOffset_=offset;};
374  inline void setCentrOffset(double offset) {centrOffset_=offset;};
375  inline void setSampleRate(double sr) {sampleRate_=sr;};
376  inline void setBitsPerSample(int bps) {bitsPerSample_=bps;};
377  inline void setEffIntegrationTime(double d) {effIntegrationTime_=d;};
378  inline void setAcceptedRatio(double d) {acceptedRatio_=d;};
379  inline void setDiscardRatio(double d) {discardRatio_=d;};
380  inline void setIncohChanAddAmp(double d) {incohChanAddAmp_=d;};
381  inline void setIncohSegmAddAmp(double d) {incohSegmAddAmp_=d;};
383  inline void setGeocenterTotalPhase(double d) {geocenterTotalPhase_=d;};
384  inline void setGeocenterResidPhase(double d) {geocenterResidPhase_=d;};
385  inline void setAprioriDra(int i, double d) {aPrioriDra_[-1<i&&i<3?i:0]=d;};
386  inline void setCalcFeedCorrDelay(double v) {calcFeedCorrDelay_ = v;};
387  inline void setCalcFeedCorrRate (double v) {calcFeedCorrRate_ = v;};
388  inline void setCorrelStarElev_1(double v) {correlStarElev_1_ = v;};
389  inline void setCorrelStarElev_2(double v) {correlStarElev_2_ = v;};
390  inline void setCorrelZdelay_1 (double v) {correlZdelay_1_ = v;};
391  inline void setCorrelZdelay_2 (double v) {correlZdelay_2_ = v;};
392 
393 
394  inline void setPhaseCalGrDelays(int i, double d) {phaseCalGrDelays_[-1<i&&i<2?i:0]=d;};
395  inline void setPhaseCalPhDelays(int i, double d) {phaseCalPhDelays_[-1<i&&i<2?i:0]=d;};
396  inline void setPhaseCalGrAmbigSpacings(int i, double d) {phaseCalGrAmbigSpacings_[-1<i&&i<2?i:0]=d;};
397  inline void setPhaseCalPhAmbigSpacings(int i, double d) {phaseCalPhAmbigSpacings_[-1<i&&i<2?i:0]=d;};
398  inline void setPhaseCalGrAmbigMultipliers(int i, int n)
399  {phaseCalGrAmbigMultipliers_[-1<i&&i<2?i:0]=n;};
400  inline void setPhaseCalPhAmbigMultipliers(int i, int n)
401  {phaseCalPhAmbigMultipliers_[-1<i&&i<2?i:0]=n;};
402 
403  inline void setPhaseCalRates(int i, double d) {phaseCalRates_[-1<i&&i<2?i:0]=d;};
404  inline void setUvFrPerAsec(int i, double d) {uvFrPerAsec_[-1<i&&i<2?i:0]=d;};
405  inline void setUrVr(int i, double d) {uRvR_[-1<i&&i<2?i:0]=d;};
406  inline void setCorrClocks(int i, int j, double d) {corrClocks_[-1<i&&i<2?i:0][-1<j&&j<2?j:0]=d;};
407  inline void setInstrDelay(int i, double d) {instrDelay_[-1<i&&i<2?i:0]=d;};
408  inline void setNlags(int n) {nLags_=n;};
409  inline void setFourfitSearchParameters(int i, double d) {fourfitSearchParameters_[-1<i&&i<6?i:0]=d;};
410  inline void setHopsRevisionNumber(int num) {hopsRevisionNumber_=num;};
411 
412  // temporary/tests:
413  inline void setSbdDiffBand(double);
414  inline void setGrdDiffBand(double);
415  inline void setPhrDiffBand(double);
416  inline void setSbdQ(double);
417  inline void setGrdQ(double);
418  inline void setPhrQ(double);
419  inline void setTauS(double d) {dTauS_ = d;};
420  inline void setTest(double d) {dTest_ = d;};
421  inline void setTest2(double d) {dTest2_ = d;};
422 
423  inline void setPhaseCalModes(int modes) {phaseCalModes_=modes;};
424 
425 
426  //
427  // Functions:
428  //
429  //
432  static const QString className();
433 
434 
435  inline bool isUsable() const {return isUsable_;};
436 // inline NonUsableReason nonUsableReason() const {return nonUsableReason_;};
437  inline const SgAttribute& nonUsableReason() const {return nonUsableReason_;};
438 
439  inline void zerofy();
440 
441  inline void zerofyIono();
442 
444 
445  const SgMJD& epoch() const;
446 
447  //SgVlbiMeasurement* measurement(const SgTaskConfig*);
448 
449 
450  int errorCode2Int() const;
451 
452  //int qualityFactor() const;
453 
454  void resetAllEditings();
455 
456  QString strId() const;
457 
458  void calcPhaseDelay();
459  void calcPhaseCalDelay();
460 
461  void allocateChannelsSetupStorages(int numOfChans);
463 
464  bool isRestorable_old(const SgTaskConfig*);
465 
466  void checkUsability(const SgTaskConfig*);
467 
468  // I/O:
469  //
471 
473  //
474 
475 private:
476  //
477  // band id:
478  QString bandKey_;
479  int mediaIdx_; // DBH idx
486  //
487  // measurements:
492  // characteristics of the observable:
493  QString errorCode_;
497  double totalPhase_;
498  double corrCoeff_;
499  double snr_;
501  bool isUsable_;
503  // about data origin
512  //
513  int startOffset_; // type_200.h: "Nom. bline start rel. to scantime (s)"
514  int stopOffset_; // type_200.h: "Nom. bline stop rel. to scantime (s)"
515  double centrOffset_; // type_205.h: "Offset of FRT from scan ctr sec "
516  SgMJD tStart_; // type_205.h: "Start of requested data span"
517  SgMJD tStop_; // type_205.h: "End of requested data span"
518  double sampleRate_;
520  double effIntegrationTime_;// type_206.h: "Effective integration time (sec)"
521  double acceptedRatio_; // type_206.h: "% ratio min/max data accepted"
522  double discardRatio_; // type_206.h: "% data discarded"
528  double aPrioriDra_[3]; // a priori delay, rate and acceleration, from FRNG
535  //
536  //
537  // For I/O purposes:
538  // channels set up:
546  //
547  QVector<char> *chanIdByChan_;
550  //
551  double phaseCalGrDelays_[2]; // for reference and remote stations
552  double phaseCalPhDelays_[2]; // for reference and remote stations
553  double phaseCalGrAmbigSpacings_[2]; // for reference and remote stations
554  double phaseCalPhAmbigSpacings_[2]; // for reference and remote stations
555  int phaseCalGrAmbigMultipliers_[2]; // for reference and remote stations
556  int phaseCalPhAmbigMultipliers_[2]; // for reference and remote stations
557  double phaseCalRates_[2]; //
558  double uvFrPerAsec_[2];
559  double uRvR_[2];
560  double corrClocks_[2][2];
561  double instrDelay_[2];
562  int nLags_;
565  //
566  // arrays for phase calibrations:
567  // phase cal data: amplitude, phase, freq, offset and error rate:
568  SgMatrix *phaseCalData_1ByChan_; // data for the station #1
569  SgMatrix *phaseCalData_2ByChan_; // the same for the station #2
571  // 4 KOMB-type files:
572  SgVector *vDlys_; // array of 3: phaseDelay@{t-1sec, t, t+1sec,}
573  SgVector *vAuxData_; // array of 5: a storage for APCLOFST, DELTAEPO, TOTPCENT,
574  // RATOBSVM and DELOBSVM LCODEs
575 
576  // end of I/O stuff
577 
578  //
581 
582 
583  //
584  // temporary/testing:
585  double sbdDiffBand_;
586  double grdDiffBand_;
587  double phrDiffBand_;
588  double sbdQ_;
589  double grdQ_;
590  double phrQ_;
591  double dTauS_;
592  //
593  double dTest_;
594  double dTest2_;
595 };
596 /*=====================================================================================================*/
597 
598 
599 
600 
601 /*=====================================================================================================*/
602 /* */
603 /* SgVlbiMbandObservation inline members: */
604 /* */
605 /*=====================================================================================================*/
606 //
607 //
608 
609 
610 
611 
612 // A destructor:
614 {
615  owner_ = NULL;
616  band_ = NULL;
617  baseline_ = NULL;
618  stn_1_ = NULL;
619  stn_2_ = NULL;
620  src_ = NULL;
621  activeDelay_ = NULL;
622  activeRate_ = NULL;
624 };
625 
626 
627 
628 //
629 // INTERFACES:
630 //
631 //
632 // Gets:
633 //
634 inline const QString& SgVlbiObservable::getBandKey() const
635 {
636  return bandKey_;
637 };
638 
639 
640 
641 //
643 {
644  return mediaIdx_;
645 };
646 
647 
648 
649 //
651 {
652  return owner_;
653 };
654 
655 
656 
657 //
659 {
660  return band_;
661 };
662 
663 
664 
665 //
667 {
668  return baseline_;
669 };
670 
671 
672 
673 //
675 {
676  return stn_1_;
677 };
678 
679 
680 
681 //
683 {
684  return stn_2_;
685 };
686 
687 
688 
689 //
691 {
692  return src_;
693 };
694 
695 
696 
697 //
699 {
700  return baseline_;
701 };
702 
703 
704 
705 //
707 {
708  return stn_1_;
709 };
710 
711 
712 
713 //
715 {
716  return stn_2_;
717 };
718 
719 
720 
721 //
723 {
724  return src_;
725 };
726 
727 
728 
729 //
731 {
732  return sbDelay_;
733 };
734 
735 
736 
737 //
739 {
740  return grDelay_;
741 };
742 
743 
744 
745 //
747 {
748  return phDelay_;
749 };
750 
751 
752 
753 //
755 {
756  return phDRate_;
757 };
758 
759 
760 
761 //
762 inline const QString& SgVlbiObservable::getErrorCode() const
763 {
764  return errorCode_;
765 };
766 
767 
768 
769 //
771 {
772  return qualityFactor_;
773 };
774 
775 
776 
777 //
779 {
780  return referenceFrequency_;
781 };
782 
783 
784 
785 //
786 inline double SgVlbiObservable::getTotalPhase() const
787 {
788  return totalPhase_;
789 };
790 
791 
792 
793 //
794 inline double SgVlbiObservable::getCorrCoeff() const
795 {
796  return corrCoeff_;
797 };
798 
799 
800 
801 //
802 inline double SgVlbiObservable::getSnr() const
803 {
804  return snr_;
805 };
806 
807 
808 
809 //
811 {
812  return numOfChannels_;
813 };
814 
815 
816 
817 //
818 inline const QString& SgVlbiObservable::getFourfitOutputFName() const
819 {
820  return fourfitOutputFName_;
821 };
822 
823 
824 
825 //
827 {
828  return epochOfCorrelation_;
829 };
830 
831 
832 
833 //
835 {
836  return epochOfFourfitting_;
837 };
838 
839 
840 
841 //
843 {
844  return epochOfScan_;
845 };
846 
847 
848 
849 //
851 {
852  return epochCentral_;
853 };
854 
855 
856 
857 //
859 {
860  return activeDelay_;
861 };
862 
863 
864 
865 //
867 {
868  return activeRate_;
869 };
870 
871 
872 
873 // temporary/tests:
874 inline double SgVlbiObservable::getSbdDiffBand() const
875 {
876  return sbdDiffBand_;
877 };
878 inline double SgVlbiObservable::getGrdDiffBand() const
879 {
880  return grdDiffBand_;
881 };
882 inline double SgVlbiObservable::getPhrDiffBand() const
883 {
884  return phrDiffBand_;
885 };
886 inline void SgVlbiObservable::setSbdDiffBand(double s)
887 {
888  sbdDiffBand_ = s;
889 };
890 inline void SgVlbiObservable::setGrdDiffBand(double s)
891 {
892  grdDiffBand_ = s;
893 };
894 inline void SgVlbiObservable::setPhrDiffBand(double s)
895 {
896  phrDiffBand_ = s;
897 };
898 
899 inline double SgVlbiObservable::getSbdQ() const
900 {
901  return sbdQ_;
902 };
903 inline double SgVlbiObservable::getGrdQ() const
904 {
905  return grdQ_;
906 };
907 inline double SgVlbiObservable::getPhrQ() const
908 {
909  return phrQ_;
910 };
911 inline void SgVlbiObservable::setSbdQ(double s)
912 {
913  sbdQ_ = s;
914 };
915 inline void SgVlbiObservable::setGrdQ(double s)
916 {
917  grdQ_ = s;
918 };
919 inline void SgVlbiObservable::setPhrQ(double s)
920 {
921  phrQ_ = s;
922 };
923 
924 
925 //
926 // Sets:
927 //
928 inline void SgVlbiObservable::setBandKey(const QString& k)
929 {
930  bandKey_ = k;
931 };
932 
933 
934 
935 //
936 inline void SgVlbiObservable::setMediaIdx(int idx)
937 {
938  mediaIdx_ = idx;
939 };
940 
941 
942 
943 //
944 inline void SgVlbiObservable::setErrorCode(const QString& q)
945 {
946  errorCode_ = q;
947 };
948 
949 
950 
951 //
953 {
954  qualityFactor_ = q;
955 };
956 
957 
958 
959 //
961 {
963 };
964 
965 
966 
967 //
968 inline void SgVlbiObservable::setTotalPhase(double p)
969 {
970  totalPhase_ = p;
971 };
972 
973 
974 
975 //
976 inline void SgVlbiObservable::setCorrCoeff(double c)
977 {
978  corrCoeff_ = c;
979 };
980 
981 
982 
983 //
984 inline void SgVlbiObservable::setSnr(double r)
985 {
986  snr_ = r;
987 };
988 
989 
990 
991 //
993 {
994  numOfChannels_ = n;
995 };
996 
997 
998 
999 //
1000 inline void SgVlbiObservable::setFourfitOutputFName(const QString& name)
1001 {
1002  fourfitOutputFName_ = name;
1003 };
1004 
1005 
1006 
1007 //
1009 {
1010  epochOfCorrelation_ = date;
1011 };
1012 
1013 
1014 
1015 //
1017 {
1018  epochOfFourfitting_ = date;
1019 };
1020 
1021 
1022 
1023 //
1024 inline void SgVlbiObservable::setEpochOfScan(const SgMJD& date)
1025 {
1026  epochOfScan_ = date;
1027 };
1028 
1029 
1030 
1031 //
1033 {
1034  epochCentral_ = date;
1035 };
1036 
1037 
1038 
1039 //
1040 // FUNCTIONS:
1041 //
1042 //
1044 {
1045  sbDelay_.zerofy();
1046  grDelay_.zerofy();
1047  phDelay_.zerofy();
1048  phDRate_.zerofy();
1049  errorCode_ = "";
1050  qualityFactor_ = 0;
1051  fourfitOutputFName_ = "";
1052  fourfitVersion_[0] = 0;
1053  fourfitVersion_[1] = 0;
1054  fourfitControlFile_ = "";
1056  referenceFrequency_ = 0.0;
1057  totalPhase_ = 0.0;
1058  corrCoeff_ = 0.0;
1059  snr_ = 0.0;
1060 };
1061 
1062 
1063 
1064 //
1066 {
1067  sbDelay_.zerofyIono();
1068  grDelay_.zerofyIono();
1069  phDelay_.zerofyIono();
1070  phDRate_.zerofyIono();
1071  //
1072  setSbdDiffBand(0.0);
1073  setGrdDiffBand(0.0);
1074  setPhrDiffBand(0.0);
1075  setSbdQ(0.0);
1076  setGrdQ(0.0);
1077  setPhrQ(0.0);
1078 };
1079 /*=====================================================================================================*/
1080 
1081 
1082 
1083 
1084 /*=====================================================================================================*/
1085 #endif // SG_VLBI_OBSERVABLE_H
Definition: SgMJD.h:59
const SgVector * vAuxData() const
const QVector< int > * corelIndexNumUSB() const
SgVlbiSourceInfo * src_
bool saveIntermediateResults(QDataStream &) const
void releaseChannelsSetupStorages()
QVector< int > * corelIndexNumLSB()
QVector< int > * bbcIdxByChan_2_
void setEpochOfCorrelation(const SgMJD &)
const QString & getFourfitOutputFName() const
double getPhaseCalPhDelays(int i) const
bool isUsable() const
void setNumOfChannels(int)
void setEpochCentral(const SgMJD &)
double getUvFrPerAsec(int i) const
bool isRestorable_old(const SgTaskConfig *)
void setTest(double d)
double getPhaseCalGrDelays(int i) const
void setBitsPerSample(int bps)
const SgMJD & epoch() const
int getPhaseCalGrAmbigMultipliers(int i) const
double getSbdQ() const
SgMatrix * phaseCalData_1ByChan_
const QVector< char > * chanIdByChan() const
int getQualityFactor() const
SgVlbiMeasurement * activeRate()
void setGrdQ(double)
int phaseCalGrAmbigMultipliers_[2]
SgVlbiStationInfo *& stn_2()
double getGrdQ() const
void setTstart(const SgMJD &t)
void setCorrClocks(int i, int j, double d)
void setTotalPhase(double)
void setHopsRevisionNumber(int num)
QVector< char > * chanIdByChan_
void setGrdDiffBand(double)
void setPhaseCalGrAmbigSpacings(int i, double d)
const SgMJD & getEpochOfCorrelation() const
int getPhaseCalPhAmbigMultipliers(int i) const
SgVlbiMeasurement phDelay_
const QVector< char > * polarization_2ByChan() const
SgVlbiStationInfo * getStn_1() const
void setPhaseCalGrDelays(int i, double d)
double getSampleRate() const
QVector< char > * polarization_1ByChan()
double getInstrDelay(int i) const
SgVector * loFreqByChan_1()
const QVector< char > * polarization_1ByChan() const
QVector< char > * chanIdByChan()
void setIncohSegmAddAmp(double d)
QVector< int > * corelIndexNumUSB()
double getFourfitSearchParameters(int i) const
SgVlbiStationInfo *& stn_1()
double getTauS() const
int getNumOfChannels() const
void setupActiveMeasurements(const SgTaskConfig *)
SgVector * loFreqByChan_2_
const QString & getTapeQualityCode() const
const SgVector * fringePhaseByChan() const
void setPhaseCalModes(int modes)
SgMatrix * phaseCalData_2ByChan()
void setAcceptedRatio(double d)
const QString & getErrorCode() const
SgVlbiBand * band()
const SgMJD & getEpochOfScan() const
SgVector * fringeAmplitudeByChan_
const SgVector * numOfAccPeriodsByChan_LSB() const
void setTstop(const SgMJD &t)
void setTauS(double d)
double getSbdDiffBand() const
int getPhaseCalModes() const
double getIncohChanAddAmp() const
void setEpochOfFourfitting(const SgMJD &)
QVector< int > * bbcIdxByChan_1_
QVector< int > * corelIndexNumLSB_
const SgMatrix * phaseCalData_2ByChan() const
SgVlbiObservation * owner()
double probabOfFalseDetection_
SgVlbiMeasurement sbDelay_
const SgVector * loFreqByChan_2() const
void setPhaseCalPhDelays(int i, double d)
SgVector * numOfSamplesByChan_USB_
void setPhrQ(double)
SgVector * numOfAccPeriodsByChan_LSB()
double getAcceptedRatio() const
void setIncohChanAddAmp(double d)
const SgMJD & getEpochOfFourfitting() const
double getCalcFeedCorrDelay() const
SgVlbiObservable(SgVlbiObservation *)
double getTest2() const
SgVector * numOfSamplesByChan_LSB_
void setCentrOffset(double offset)
double getProbabOfFalseDetection() const
void setPhaseCalPhAmbigSpacings(int i, double d)
double getPhrDiffBand() const
void setEffIntegrationTime(double d)
void setFourfitOutputFName(const QString &)
QString fourfitCommandOverride_
QVector< char > * polarization_2ByChan()
SgVector * numOfAccPeriodsByChan_USB()
QVector< int > * bbcIdxByChan_1()
static const QString className()
SgVlbiStationInfo * getStn_2() const
SgVlbiSourceInfo * getSrc() const
double phaseCalPhDelays_[2]
void setFourfitControlFile(const QString &cf)
void setPhaseCalGrAmbigMultipliers(int i, int n)
SgVlbiMeasurement & phDRate()
void setGeocenterResidPhase(double d)
double getPhaseCalPhAmbigSpacings(int i) const
void setCorrelStarElev_2(double v)
double getGrdDiffBand() const
void setSnr(double)
void setProbabOfFalseDetection(double d)
void setQualityFactor(int)
double phaseCalRates_[2]
const SgVector * numOfAccPeriodsByChan_USB() const
QString strId() const
int phaseCalPhAmbigMultipliers_[2]
double getCorrelZdelay_1() const
double getGeocenterTotalPhase() const
void setNlags(int n)
void setGeocenterTotalPhase(double d)
double getEffIntegrationTime() const
const SgMJD & getTstop() const
const SgVector * refFreqByChan() const
SgMatrix * phaseCalData_2ByChan_
void setDiscardRatio(double d)
double getCorrClocks(int i, int j) const
const SgVector * vDlys() const
double phaseCalGrAmbigSpacings_[2]
SgVector * fringeAmplitudeByChan()
void setCorrCoeff(double)
SgVector * vAuxData()
double phaseCalGrDelays_[2]
void setEpochOfScan(const SgMJD &)
SgVlbiBaselineInfo * baseline_
void setUrVr(int i, double d)
double getPhaseCalGrAmbigSpacings(int i) const
void setCorrelZdelay_1(double v)
const QVector< int > * bbcIdxByChan_2() const
void setPhaseCalPhAmbigMultipliers(int i, int n)
int getStartOffset() const
QVector< char > * polarization_1ByChan_
SgVector * fringePhaseByChan_
SgVector * refFreqByChan_
void checkUsability(const SgTaskConfig *)
double getUrVr(int i) const
double getCentrOffset() const
int errorCode2Int() const
SgVector * numOfSamplesByChan_LSB()
QVector< int > * corelIndexNumUSB_
SgVlbiSourceInfo *& src()
void setPhrDiffBand(double)
double getAprioriDra(int i) const
void setAprioriDra(int i, double d)
void setInstrDelay(int i, double d)
double getCorrelStarElev_2() const
double getDiscardRatio() const
void setPhaseCalRates(int i, double d)
int getNlags() const
const QVector< int > * corelIndexNumLSB() const
double getTotalPhase() const
void setStopOffset(int offset)
SgVector * vDlys()
SgVlbiStationInfo * stn_2_
int getHopsRevisionNumber() const
int getFourfitVersion(int idx) const
const QString & getFourfitControlFile() const
double getIncohSegmAddAmp() const
const SgVector * numOfSamplesByChan_LSB() const
int getStopOffset() const
void setUvFrPerAsec(int i, double d)
void setErrorCode(const QString &)
double getSnr() const
QVector< char > * polarization_2ByChan_
SgVector * numOfAccPeriodsByChan_LSB_
SgMatrix * phaseCalData_1ByChan()
const QString & getBandKey() const
const SgAttribute & nonUsableReason() const
SgVector * numOfSamplesByChan_USB()
SgVlbiBaselineInfo * getBaseline() const
void setFourfitCommandOverride(const QString &co)
const QString & getFourfitCommandOverride() const
void setReferenceFrequency(double)
double getPhaseCalRates(int i) const
void setCorrelZdelay_2(double v)
SgVlbiBaselineInfo *& baseline()
double getCalcFeedCorrRate() const
double getReferenceFrequency() const
void allocateChannelsSetupStorages(int numOfChans)
double getTest() const
const SgVector * numOfSamplesByChan_USB() const
SgVlbiMeasurement & phDelay()
void setBandKey(const QString &)
const SgVector * fringeAmplitudeByChan() const
SgVlbiMeasurement * activeRate_
void setTapeQualityCode(const QString &code)
double getCorrelStarElev_1() const
bool loadIntermediateResults(QDataStream &)
SgVlbiMeasurement * activeDelay_
SgVlbiMeasurement * activeDelay()
int getBitsPerSample() const
void setTest2(double d)
SgVlbiBand * band_
void setCalcFeedCorrDelay(double v)
const SgMJD & getEpochCentral() const
const SgVector * loFreqByChan_1() const
double getCorrCoeff() const
SgVlbiMeasurement phDRate_
double fourfitSearchParameters_[6]
SgVector * loFreqByChan_2()
double phaseCalPhAmbigSpacings_[2]
SgVector * numOfAccPeriodsByChan_USB_
SgVlbiMeasurement & grDelay()
const QVector< int > * bbcIdxByChan_1() const
double corrClocks_[2][2]
void setStartOffset(int offset)
double getPhrQ() const
void setSbdDiffBand(double)
SgVlbiMeasurement & sbDelay()
SgAttribute nonUsableReason_
SgVector * fringePhaseByChan()
double getGeocenterResidPhase() const
void setSbdQ(double)
const SgMatrix * phaseCalData_1ByChan() const
SgVector * refFreqByChan()
void setFourfitSearchParameters(int i, double d)
SgVector * loFreqByChan_1_
void setSampleRate(double sr)
SgVlbiObservation * owner_
int getMediaIdx() const
void setCorrelStarElev_1(double v)
void setCalcFeedCorrRate(double v)
QVector< int > * bbcIdxByChan_2()
SgVlbiStationInfo * stn_1_
const SgMJD & getTstart() const
double getCorrelZdelay_2() const
SgVlbiMeasurement grDelay_
void setFourfitVersion(int idx, int ver)