GPLIB++
MTTensor.h
Go to the documentation of this file.
1 #ifndef CMTTENSOR_H_
2 #define CMTTENSOR_H_
3 #include <complex>
4 #include "NumUtil.h"
5 #include "miscfunc.h"
6 
7 namespace gplib
8  {
9  /** \addtogroup mttools MT data analysis, processing and inversion */
10  /* @{ */
11  //! Stores MT-Tensor components at a single frequency, calculates derived quantities
12  /*! This class stores the elements of the MT impedance tensor together with their
13  * error estimates and rotation angle. Impedances are stored in field units, i.e. km/s
14  * and the rotation angle in radian.
15  */
16  class MTTensor
17  {
18  private:
19  //the impedance elements
20  std::complex<double> Zxx;
21  std::complex<double> Zxy;
22  std::complex<double> Zyx;
23  std::complex<double> Zyy;
24  //and their errors
25  double dZxx;
26  double dZxy;
27  double dZyx;
28  double dZyy;
29  double frequency;
30  double rotangle;
31  //! Coherency for the x direction
32  double Rx;
33  //! Coherency for the y direction
34  double Ry;
35  //! Number of degrees of freedom
36  double Nu;
37  //! Calculate apparent resistivity
38  double CalcRho(const std::complex<double> &Z) const
39  {
40  return mu / (2 * PI * frequency) * (Z.real() * Z.real() + Z.imag()
41  * Z.imag()) * 1000000.0;
42  }
43  //! Calculate Phase
44  double CalcPhase(const std::complex<double> &Z) const
45  {
46  if (fcmp(Z.real(), 0.0, std::numeric_limits<double>::epsilon()) != 0) //if real part significantly different from 0.
47  return atan2(Z.imag(), Z.real()) / PI * 180;
48  else
49  return 0.0;
50  }
51  //! Calculate Phase restricted to 0 to 90 degree range
52  double CalcPhase90(const std::complex<double> &Z) const
53  {
54  if (fcmp(Z.real(), 0.0, std::numeric_limits<double>::epsilon()) != 0) //if real part significantly different from 0.
55  return atan(Z.imag() / Z.real()) / PI * 180; // here we use atan instead of atan2
56  else
57  return 0.0;
58  }
59  //! Calculate Apparent Resistivity Error
60  double CalcdRho(const std::complex<double> &Z, const double dZ) const
61  {
62  return mu / (PI * frequency) * std::abs(Z) * dZ * 1000000.0;
63  }
64  //! Calculate Phase Error
65  double CalcdPhase(const std::complex<double> &Z, const double dZ) const
66  {
67  if (fcmp(std::abs(Z), 0.0, std::numeric_limits<double>::epsilon()) != 0) //if Z significantly different from 0.
68  return dZ / std::abs(Z) / PI * 180;
69  else
70  return 0.0;
71  }
72  //! Calculate Schmucker's Z*
73  double CalcZStar(const std::complex<double> &Z) const
74  {
75  return std::abs((I / (2.0 * PI * frequency) * Z * 1000.0).real());
76  }
77  //! Calculate Schmucker's Rho*
78  double CalcRhoStar(const std::complex<double> &Z) const
79  {
80  double phase = CalcPhase(Z) / 180.0 * PI;
81  if (phase > 45.0)
82  return 2.0 * pow2(cos(phase)) * CalcRho(Z);
83  else
84  return 0.5 * 1. / pow2(sin(phase)) * CalcRho(Z);
85  }
86  public:
87  //! Function for Errors that cannot be calculated analytically when we don't want Jacknife errors
88  double GetdZero() const
89  {
90  return 0.0;
91  }
92  //! Set the errors for the impedance elements
93  void SetErrors(double dxx, double dxy, double dyx, double dyy)
94  {
95  dZxx = dxx;
96  dZxy = dxy;
97  dZyx = dyx;
98  dZyy = dyy;
99  }
100  //!Rotate by the given angle in radian
101  void Rotate(double angle);
102  ///!return the current angle in radian
103  double GetRotangle() const
104  {
105  return rotangle;
106  }
107  //! Set the rotation angle, without performing the corresponding rotation
108  double &SetRotangle()
109  {
110  return rotangle;
111  }
112  //! Get the frequency for the impedance
113  double GetFrequency() const
114  {
115  return frequency;
116  }
117  //! Return tensor elements
118  std::complex<double> GetZyy() const
119  {
120  return Zyy;
121  }
122  std::complex<double> GetZxx() const
123  {
124  return Zxx;
125  }
126  std::complex<double> GetZxy() const
127  {
128  return Zxy;
129  }
130  std::complex<double> GetZyx() const
131  {
132  return Zyx;
133  }
134  //! Write access to tensor elements
135  std::complex<double> &SetZyy()
136  {
137  return Zyy;
138  }
139  std::complex<double> &SetZxx()
140  {
141  return Zxx;
142  }
143  std::complex<double> &SetZxy()
144  {
145  return Zxy;
146  }
147  std::complex<double> &SetZyx()
148  {
149  return Zyx;
150  }
151  //! Return tensor element errors
152  double GetdZxx() const
153  {
154  return dZxx;
155  }
156  double GetdZxy() const
157  {
158  return dZxy;
159  }
160  double GetdZyx() const
161  {
162  return dZyx;
163  }
164  double GetdZyy() const
165  {
166  return dZyy;
167  }
168  //! Write access to errors
169  double &SetdZyy()
170  {
171  return dZyy;
172  }
173  double &SetdZxx()
174  {
175  return dZxx;
176  }
177  double &SetdZxy()
178  {
179  return dZxy;
180  }
181  double &SetdZyx()
182  {
183  return dZyx;
184  }
185  //! Return apparent resistivity
186  double GetRhoxx() const
187  {
188  return CalcRho(Zxx);
189  }
190  double GetRhoxy() const
191  {
192  return CalcRho(Zxy);
193  }
194  double GetRhoyx() const
195  {
196  return CalcRho(Zyx);
197  }
198  double GetRhoyy() const
199  {
200  return CalcRho(Zyy);
201  }
202  //! Return phase
203  double GetPhixx() const
204  {
205  return CalcPhase(Zxx);
206  }
207  double GetPhixy() const
208  {
209  return CalcPhase(Zxy);
210  }
211  double GetPhiyx() const
212  {
213  return CalcPhase(Zyx);
214  }
215  double GetPhiyy() const
216  {
217  return CalcPhase(Zyy);
218  }
219  //! Return phase restricted to 0 to 90 degree range
220  double GetPhi90xx() const
221  {
222  return CalcPhase90(Zxx);
223  }
224  double GetPhi90xy() const
225  {
226  return CalcPhase90(Zxy);
227  }
228  double GetPhi90yx() const
229  {
230  return CalcPhase90(Zyx);
231  }
232  double GetPhi90yy() const
233  {
234  return CalcPhase90(Zyy);
235  }
236  //! Return Rho Error for tensor elements
237  double GetdRhoxx() const
238  {
239  return CalcdRho(Zxx, dZxx);
240  }
241  double GetdRhoxy() const
242  {
243  return CalcdRho(Zxy, dZxy);
244  }
245  double GetdRhoyx() const
246  {
247  return CalcdRho(Zyx, dZyx);
248  }
249  double GetdRhoyy() const
250  {
251  return CalcdRho(Zyy, dZyy);
252  }
253  //! return phase error for tensor elements
254  double GetdPhixx() const
255  {
256  return CalcdPhase(Zxx, dZxx);
257  }
258  double GetdPhixy() const
259  {
260  return CalcdPhase(Zxy, dZxy);
261  }
262  double GetdPhiyx() const
263  {
264  return CalcdPhase(Zyx, dZyx);
265  }
266  double GetdPhiyy() const
267  {
268  return CalcdPhase(Zyy, dZyy);
269  }
270  //! Return Schmucker's rho* for tensor elements
271  double GetRhoxxStar() const
272  {
273  return CalcRhoStar(Zxx);
274  }
275  double GetRhoxyStar() const
276  {
277  return CalcRhoStar(Zxy);
278  }
279  double GetRhoyxStar() const
280  {
281  return CalcRhoStar(Zyx);
282  }
283  double GetRhoyyStar() const
284  {
285  return CalcRhoStar(Zyy);
286  }
287  //! Return Schmucker's z* for tensor elements
288  double GetZxxStar() const
289  {
290  return CalcZStar(Zxx);
291  }
292  double GetZxyStar() const
293  {
294  return CalcZStar(Zxy);
295  }
296  double GetZyxStar() const
297  {
298  return CalcZStar(Zyx);
299  }
300  double GetZyyStar() const
301  {
302  return CalcZStar(Zyy);
303  }
304  //! Some invariants and intermediate quantities for strike and skew calculation
305  std::complex<double> GetS1() const
306  {
307  return Zxx + Zyy;
308  }
309  std::complex<double> GetS2() const
310  {
311  return Zxy + Zyx;
312  }
313  std::complex<double> GetD1() const
314  {
315  return Zxx - Zyy;
316  }
317  std::complex<double> GetD2() const
318  {
319  return Zxy - Zyx;
320  }
321  //! The Berdichevskyi invariant
322  std::complex<double> GetBerd() const
323  {
324  return 0.5 * GetD2();
325  }
326  //! The error of the Berdichevskyi invariant
327  double GetdBerd() const
328  {
329  return 0.5 * sqrt(dZxy * dZxy + dZyx * dZyx);
330  }
331  double GetRhoBerd() const
332  {
333  return CalcRho(GetBerd());
334  }
335  double GetPhi90Berd() const
336  {
337  return CalcPhase90(GetBerd());
338  }
339  double GetdRhoBerd() const
340  {
341  return CalcdRho(GetBerd(), GetdBerd());
342  }
343  double GetdPhi90Berd() const
344  {
345  return CalcdPhase(GetBerd(), GetdBerd());
346  }
347  //! The determinant
348  std::complex<double> GetDet() const
349  {
350  return Zxx * Zyy - Zxy * Zyx;
351  }
352  //! The error of the determinant
353  double GetdDet() const
354  {
355  return sqrt(abs(Zyy * Zyy) * dZxx * dZxx + abs(Zxx * Zxx) * dZyy
356  * dZyy + abs(Zxy * Zxy) * dZyx * dZyx + abs(Zyx * Zyx) * dZxy
357  * dZxy);
358  }
359  //! The determinant of the real parts of Z
360  double GetDetreal() const
361  {
362  return Zxx.real() * Zyy.real() - Zxy.real() * Zyx.real();
363  }
364  //! Get the error of the determinant of the real part
365  double GetdDetreal() const
366  {
367  return sqrt(pow2(Zyy.real()) * pow2(dZxx) + pow2(Zxx.real()) * pow2(
368  dZyy) + pow2(Zxy.real()) * pow2(dZyx) + pow2(Zyx.real()) * pow2(
369  dZxy));
370  }
371  //! Rotationally invariant phase difference
372  double GetMu() const
373  {
374  return sqrt(std::abs(Commute(GetD1(), GetS2()) + Commute(GetS1(),
375  GetD2()))) / abs(GetD2());
376  }
377  //! Swift's skew
378  double GetKappa() const
379  {
380  return abs(GetS1()) / abs(GetD2());
381  }
382  double GetSigma() const
383  {
384  return (pow2(abs(GetD1())) + pow2(abs(GetS2()))) / pow2(abs(GetD2()));
385  }
386  //! Bahr's skew
387  double GetEta() const
388  {
389  return sqrt(std::abs(Commute(GetD1(), GetS2()) - Commute(GetS1(),
390  GetD2()))) / abs(GetD2());
391  }
392  //Bahr's phase sensitive strike angle
393  double GetAlpha() const
394  {
395  double denominator = Commute(GetS1(), GetD1()) - Commute(GetS2(),
396  GetD2());
397  if (fcmp(denominator, 0.0, std::numeric_limits<double>::epsilon())
398  != 0)
399  return 0.5 * atan((Commute(GetS1(), GetS2()) - Commute(GetD1(),
400  GetD2())) / (denominator));
401  else
402  return 0.0;
403  }
404  //! Calculate strike angle, so it points to high conductivity direction (Phixy > Phiyx)
405  double GetAlphaHigh() const
406  {
407  double regalpha = GetAlpha(); // calculate strike angle
408  MTTensor tmp(*this); //create local copy
409  tmp.Rotate(regalpha); //rotate to new coordinate system
410  if (tmp.GetPhiyx() > tmp.GetPhixy())
411  regalpha += PI / 2.0;
412  return regalpha;
413  }
414  //! Maximum phase difference
415  double GetMaxPhiDiff() const
416  {
417  MTTensor tmp(*this); //create local copy
418  tmp.Rotate(GetAlpha());
419  return std::abs(tmp.GetPhixy() - tmp.GetPhiyx());
420  }
421  //! All the following quantities are defined in Caldwell GJI 158, 457-469, the phase tensor elements
422  double GetPhi11() const
423  {
424  const double dr = GetDetreal();
425  if (fcmp(dr, 0.0, std::numeric_limits<double>::epsilon()) != 0)
426  return ((Zyy.real() * Zxx.imag() - Zxy.real() * Zyx.imag()) / dr);
427  else
428  return 0.0;
429  }
430  double GetPhi12() const
431  {
432  const double dr = GetDetreal();
433  if (fcmp(dr, 0.0, std::numeric_limits<double>::epsilon()) != 0)
434  return ((Zyy.real() * Zxy.imag() - Zxy.real() * Zyy.imag()) / dr);
435  else
436  return 0.0;
437  }
438  double GetPhi21() const
439  {
440  const double dr = GetDetreal();
441  if (fcmp(dr, 0.0, std::numeric_limits<double>::epsilon()) != 0)
442  return ((Zxx.real() * Zyx.imag() - Zyx.real() * Zxx.imag()) / dr);
443  else
444  return 0.0;
445  }
446  double GetPhi22() const
447  {
448  const double dr = GetDetreal();
449  if (fcmp(dr, 0.0, std::numeric_limits<double>::epsilon()) != 0)
450  return ((Zxx.real() * Zyy.imag() - Zyx.real() * Zxy.imag()) / dr);
451  else
452  return 0.0;
453  }
454  double GetAlpha_phi() const
455  {
456  const double diff = GetPhi11() - GetPhi22();
457  if (fcmp(diff, 0.0, std::numeric_limits<double>::epsilon()) != 0)
458  return 0.5 * atan2((GetPhi12() + GetPhi21()), diff);
459  else
460  return 0.0;
461  }
462  double GetBeta_phi() const
463  {
464  return 0.5 * atan2((GetPhi12() - GetPhi21()), (GetPhi11()
465  + GetPhi22()));
466  }
467  double GetPi1() const
468  {
469  return 0.5 * sqrt(std::pow(GetPhi11() - GetPhi22(), 2) + std::pow(
470  GetPhi12() + GetPhi21(), 2));
471  }
472  double GetPi2() const
473  {
474  return 0.5 * sqrt(std::pow(GetPhi11() + GetPhi22(), 2) + std::pow(
475  GetPhi12() - GetPhi21(), 2));
476  }
477  double GetPhiStrike() const
478  {
479  return GetAlpha_phi() - GetBeta_phi();
480  }
481  double GetPhiMax() const
482  {
483  return GetPi2() + GetPi1();
484  }
485  double GetPhiMin() const
486  {
487  return GetPi2() - GetPi1();
488  }
489  double GettrPhi() const
490  {
491  return GetPhi11() + GetPhi22();
492  }
493  double GetskPhi() const
494  {
495  return GetPhi12() - GetPhi21();
496  }
497  double GetdetPhi() const
498  {
499  return GetPhi11() * GetPhi22() - GetPhi12() * GetPhi21();
500  }
501  double GetPhi1() const
502  {
503  return GettrPhi() / 2.;
504  }
505  double GetPhi2() const
506  {
507  return sqrt(std::abs(GetdetPhi()));
508  }
509  double GetPhi2Sq() const
510  {
511  return GetdetPhi();
512  }
513  double GetPhi3() const
514  {
515  return GetskPhi() / 2.;
516  }
517  double GetPhiEllip() const
518  {
519  return (GetPhiMax() - GetPhiMin()) / (GetPhiMax() + GetPhiMin());
520  }
521  //Here start the Weaver et al. invariants, equations taken from Marti, GJI 2004
522  double GetXi1() const
523  {
524  return 0.5 * (Zxx.real() + Zyy.real());
525  }
526  double GetXi2() const
527  {
528  return 0.5 * (Zxy.real() + Zyx.real());
529  }
530  double GetXi3() const
531  {
532  return 0.5 * (Zxx.real() - Zyy.real());
533  }
534  double GetXi4() const
535  {
536  return 0.5 * (Zxy.real() - Zyx.real());
537  }
538  double GetEta1() const
539  {
540  return 0.5 * (Zxx.imag() + Zyy.imag());
541  }
542  double GetEta2() const
543  {
544  return 0.5 * (Zxy.imag() + Zyx.imag());
545  }
546  double GetEta3() const
547  {
548  return 0.5 * (Zxx.imag() - Zyy.imag());
549  }
550  double GetEta4() const
551  {
552  return 0.5 * (Zxy.imag() - Zyx.imag());
553  }
554  double GetI1() const
555  {
556  return sqrt(pow2(GetXi1()) + pow2(GetXi4()));
557  }
558  double GetI2() const
559  {
560  return sqrt(pow2(GetEta1()) + pow2(GetEta4()));
561  }
562  double GetI3() const
563  {
564  return sqrt(pow2(GetXi2()) + pow2(GetXi3())) / GetI1();
565  }
566  double GetI4() const
567  {
568  return sqrt(pow2(GetEta2()) + pow2(GetEta3())) / GetI2();
569  }
570  double GetI5() const
571  {
572  return (GetXi4() * GetEta1() + GetXi1() * GetEta4()) / (GetI1()
573  * GetI2());
574  }
575  double GetI6() const
576  {
577  return (GetXi4() * GetEta1() - GetXi1() * GetEta4()) / (GetI1()
578  * GetI2());
579  }
580  double Getd13() const
581  {
582  return (GetXi1() * GetEta3() - GetXi3() * GetEta1()) / (GetI1()
583  * GetI2());
584  }
585  double Getd12() const
586  {
587  return (GetXi1() * GetEta2() - GetXi2() * GetEta1()) / (GetI1()
588  * GetI2());
589  }
590  double Getd24() const
591  {
592  return (GetXi2() * GetEta4() - GetXi4() * GetEta2()) / (GetI1()
593  * GetI2());
594  }
595  double Getd34() const
596  {
597  return (GetXi3() * GetEta4() - GetXi4() * GetEta3()) / (GetI1()
598  * GetI2());
599  }
600  double Getd41() const
601  {
602  return (GetXi4() * GetEta1() - GetXi1() * GetEta4()) / (GetI1()
603  * GetI2());
604  }
605  double Getd23() const
606  {
607  return (GetXi2() * GetEta3() - GetXi3() * GetEta2()) / (GetI1()
608  * GetI2());
609  }
610  double GetQ() const
611  {
612  return sqrt(pow2(Getd12() - Getd34()) + pow2(Getd13() + Getd24()));
613  }
614  double GetI7() const
615  {
616  return (Getd41() + Getd23()) / GetQ();
617  }
618  double Geta() const
619  {
620  return pow2(GetI5() - GetI6());
621  }
622  double Getb() const
623  {
624  return 1.0 - GetI5() * GetI6() + sqrt(1.0 + pow2(GetI5()) * pow2(
625  GetI6()) - pow2(GetI5()) - pow2(GetI6()));
626  }
627  double Getr() const
628  {
629  return GetI2() / GetI1();
630  }
631  //const std::complex<double> GetThetaBar(){}
632  //const std::complex<double> GetdTheta(){}
633  //const std::complex<double> GetZs(){}
634  //const std::complex<double> GetZp(){}
635  //! Return coherency for the x-direction
636  double GetRx() const
637  {
638  return Rx;
639  }
640  //! Return coherency for the y-direction
641  double GetRy() const
642  {
643  return Ry;
644  }
645  //! The degrees of freedom used for transfer function estimation
646  double GetNu() const
647  {
648  return Nu;
649  }
650  friend class MTStation;
651  friend class C1DMTSynthData;
652  friend class JParser;
653  friend class EDIParser;
654  MTTensor();
655  MTTensor(const std::complex<double> &xx, const std::complex<double> &xy,
656  const std::complex<double> &yx, const std::complex<double> &yy,
657  const double freq = 1., const double angle = 0.0);
658  MTTensor& operator=(const MTTensor& source);
659  virtual ~MTTensor();
660  };
661  /* @} */
662  std::complex<double> inline RhoPhiToZ(const double freq, const double rho,
663  const double phi)
664  {
665  return sqrt(2 * PI * freq / mu) * 0.001 * sqrt(rho) * (cos(phi / 180
666  * PI) + I * sin(phi / 180 * PI));
667  }
668 
669  // This is some remnant code for parallel and serial transforms of the impedance tensor
670  // only kept so I remember how they are calculated
671  /* temp1 = gsl_complex_rect(D1.at(i).real(),D1.at(i).imag());
672  temp2 = gsl_complex_rect(S2.at(i).real(),S2.at(i).imag());
673  temp3= gsl_complex_mul_real(gsl_complex_arctan(gsl_complex_div(gsl_complex_mul_real(temp1,-1.),temp2)),0.5);
674  thetabar.at(i) = GSL_REAL(temp3);
675  thetabar.at(i) += I*GSL_IMAG(temp3);
676  temp1 = gsl_complex_rect(S1.at(i).real(),S1.at(i).imag());
677  temp2 = gsl_complex_rect(D2.at(i).real(),D2.at(i).imag());
678  temp3 = gsl_complex_arctan(gsl_complex_div(temp1,temp2));
679  dtheta.at(i) = GSL_REAL(temp3);
680  dtheta.at(i) += I*GSL_IMAG(temp3);
681  //dtheta.at(i) = atan(S1.at(i)/D2.at(i))
682  Zs.at(i) = sqrt((pow(DataXX.Z.at(i),2) + pow(DataXY.Z.at(i),2) + pow(DataYX.Z.at(i),2) + pow(DataYY.Z.at(i),2))/2.);
683  Zp.at(i) = (DataXY.Z.at(i)*DataYX.Z.at(i)-DataXX.Z.at(i)*DataYY.Z.at(i))/Zs.at(i);
684  rhos.at(i) = 1/(2 * PI * frequency.at(i)) * mu * (pow(Zs.at(i).real(),2)+pow(Zs.at(i).imag(),2)) * pow(1000.0,2);
685  rhop.at(i) = 1/(2 * PI * frequency.at(i)) * mu * (pow(Zp.at(i).real(),2)+pow(Zp.at(i).imag(),2)) * pow(1000.0,2);
686  phis.at(i) = atan(Zs.at(i).imag()/Zs.at(i).real());
687  phip.at(i) = atan(Zp.at(i).imag()/Zp.at(i).real());
688  dPhips.at(i) = phip.at(i) - phis.at(i);*/
689  }
690 
691 #endif /*CMTTENSOR_H_*/
double GetI3() const
Definition: MTTensor.h:562
double GetAlphaHigh() const
Calculate strike angle, so it points to high conductivity direction (Phixy > Phiyx) ...
Definition: MTTensor.h:405
double GetRhoyxStar() const
Definition: MTTensor.h:279
double GetXi1() const
Definition: MTTensor.h:522
double GetI6() const
Definition: MTTensor.h:575
double GetdZxx() const
Return tensor element errors.
Definition: MTTensor.h:152
double GetPhi11() const
All the following quantities are defined in Caldwell GJI 158, 457-469, the phase tensor elements...
Definition: MTTensor.h:422
double GetdBerd() const
The error of the Berdichevskyi invariant.
Definition: MTTensor.h:327
friend class JParser
Definition: MTTensor.h:652
std::complex< double > & SetZyx()
Definition: MTTensor.h:147
double GetPhi2() const
Definition: MTTensor.h:505
double Getr() const
Definition: MTTensor.h:627
double Getd13() const
Definition: MTTensor.h:580
double GetPhiEllip() const
Definition: MTTensor.h:517
double GetI4() const
Definition: MTTensor.h:566
double Getd12() const
Definition: MTTensor.h:585
std::complex< double > GetDet() const
The determinant.
Definition: MTTensor.h:348
double Getd24() const
Definition: MTTensor.h:590
double GetRhoyyStar() const
Definition: MTTensor.h:283
double GetPhi21() const
Definition: MTTensor.h:438
double GetXi4() const
Definition: MTTensor.h:534
double GetdZxy() const
Definition: MTTensor.h:156
double GetPi1() const
Definition: MTTensor.h:467
double GetPhixy() const
Definition: MTTensor.h:207
double GetI2() const
Definition: MTTensor.h:558
double GetPhi2Sq() const
Definition: MTTensor.h:509
double GetPhiyx() const
Definition: MTTensor.h:211
double GetPhi90Berd() const
Definition: MTTensor.h:335
double GetZxyStar() const
Definition: MTTensor.h:292
std::complex< double > & SetZyy()
Write access to tensor elements.
Definition: MTTensor.h:135
double GetRotangle() const
!return the current angle in radian
Definition: MTTensor.h:103
std::complex< double > GetS1() const
Some invariants and intermediate quantities for strike and skew calculation.
Definition: MTTensor.h:305
double GetFrequency() const
Get the frequency for the impedance.
Definition: MTTensor.h:113
double GetPhi12() const
Definition: MTTensor.h:430
double GetMaxPhiDiff() const
Maximum phase difference.
Definition: MTTensor.h:415
double GetEta4() const
Definition: MTTensor.h:550
double GetdRhoxx() const
Return Rho Error for tensor elements.
Definition: MTTensor.h:237
double & SetdZyx()
Definition: MTTensor.h:181
double GetRhoxyStar() const
Definition: MTTensor.h:275
double GetMu() const
Rotationally invariant phase difference.
Definition: MTTensor.h:372
std::complex< double > GetZyx() const
Definition: MTTensor.h:130
double Getb() const
Definition: MTTensor.h:622
std::complex< double > GetZxy() const
Definition: MTTensor.h:126
double GetdRhoxy() const
Definition: MTTensor.h:241
friend class EDIParser
Definition: MTTensor.h:653
double GetEta() const
Bahr's skew.
Definition: MTTensor.h:387
double GetI7() const
Definition: MTTensor.h:614
double GetI1() const
Definition: MTTensor.h:554
double GetPhiyy() const
Definition: MTTensor.h:215
void Rotate(double angle)
Rotate by the given angle in radian.
Definition: MTTensor.cpp:42
double GetNu() const
The degrees of freedom used for transfer function estimation.
Definition: MTTensor.h:646
double GetPhi3() const
Definition: MTTensor.h:513
double GetEta3() const
Definition: MTTensor.h:546
double GetRhoyy() const
Definition: MTTensor.h:198
double GetPhi22() const
Definition: MTTensor.h:446
double GetPi2() const
Definition: MTTensor.h:472
double GetPhiStrike() const
Definition: MTTensor.h:477
double GetAlpha_phi() const
Definition: MTTensor.h:454
The class MTStation is used to store the transfer functions and related information for a MT-site...
Definition: MTStation.h:17
double GetPhi90xx() const
Return phase restricted to 0 to 90 degree range.
Definition: MTTensor.h:220
double GetdetPhi() const
Definition: MTTensor.h:497
double GetAlpha() const
Definition: MTTensor.h:393
double & SetdZxx()
Definition: MTTensor.h:173
double GetZyxStar() const
Definition: MTTensor.h:296
double GetRhoxy() const
Definition: MTTensor.h:190
double GetRhoyx() const
Definition: MTTensor.h:194
double GetdPhixx() const
return phase error for tensor elements
Definition: MTTensor.h:254
double GetPhi1() const
Definition: MTTensor.h:501
std::complex< double > GetS2() const
Definition: MTTensor.h:309
double GetQ() const
Definition: MTTensor.h:610
double GetEta1() const
Definition: MTTensor.h:538
std::complex< double > GetBerd() const
The Berdichevskyi invariant.
Definition: MTTensor.h:322
double GetskPhi() const
Definition: MTTensor.h:493
double GetXi3() const
Definition: MTTensor.h:530
double & SetRotangle()
Set the rotation angle, without performing the corresponding rotation.
Definition: MTTensor.h:108
double GetRhoxxStar() const
Return Schmucker's rho* for tensor elements.
Definition: MTTensor.h:271
double GetXi2() const
Definition: MTTensor.h:526
double GetdRhoBerd() const
Definition: MTTensor.h:339
double Getd41() const
Definition: MTTensor.h:600
double GetdRhoyx() const
Definition: MTTensor.h:245
double Getd23() const
Definition: MTTensor.h:605
double GetdPhiyx() const
Definition: MTTensor.h:262
double GetEta2() const
Definition: MTTensor.h:542
double GetdZyx() const
Definition: MTTensor.h:160
double GetdDet() const
The error of the determinant.
Definition: MTTensor.h:353
std::complex< double > GetD1() const
Definition: MTTensor.h:313
double GetZxxStar() const
Return Schmucker's z* for tensor elements.
Definition: MTTensor.h:288
double GetZyyStar() const
Definition: MTTensor.h:300
double GetPhi90yy() const
Definition: MTTensor.h:232
double GetdZyy() const
Definition: MTTensor.h:164
std::complex< double > GetD2() const
Definition: MTTensor.h:317
double GetRhoxx() const
Return apparent resistivity.
Definition: MTTensor.h:186
std::complex< double > & SetZxx()
Definition: MTTensor.h:139
double & SetdZyy()
Write access to errors.
Definition: MTTensor.h:169
virtual ~MTTensor()
Definition: MTTensor.cpp:38
Calculate synthetic MT data for a 1D model using Cagniard's algorithm.
double GetdPhi90Berd() const
Definition: MTTensor.h:343
double Geta() const
Definition: MTTensor.h:618
Stores MT-Tensor components at a single frequency, calculates derived quantities. ...
Definition: MTTensor.h:16
double GetdDetreal() const
Get the error of the determinant of the real part.
Definition: MTTensor.h:365
double GetSigma() const
Definition: MTTensor.h:382
double GetRhoBerd() const
Definition: MTTensor.h:331
double GetRy() const
Return coherency for the y-direction.
Definition: MTTensor.h:641
std::complex< double > GetZxx() const
Definition: MTTensor.h:122
double Getd34() const
Definition: MTTensor.h:595
double GetPhi90xy() const
Definition: MTTensor.h:224
double GetdPhixy() const
Definition: MTTensor.h:258
double GetPhixx() const
Return phase.
Definition: MTTensor.h:203
std::complex< double > & SetZxy()
Definition: MTTensor.h:143
double GetPhi90yx() const
Definition: MTTensor.h:228
void SetErrors(double dxx, double dxy, double dyx, double dyy)
Set the errors for the impedance elements.
Definition: MTTensor.h:93
std::complex< double > GetZyy() const
Return tensor elements.
Definition: MTTensor.h:118
double GetBeta_phi() const
Definition: MTTensor.h:462
double GetdZero() const
Function for Errors that cannot be calculated analytically when we don't want Jacknife errors...
Definition: MTTensor.h:88
double GetPhiMin() const
Definition: MTTensor.h:485
double & SetdZxy()
Definition: MTTensor.h:177
double GetRx() const
Return coherency for the x-direction.
Definition: MTTensor.h:636
double GetPhiMax() const
Definition: MTTensor.h:481
double GetDetreal() const
The determinant of the real parts of Z.
Definition: MTTensor.h:360
std::complex< double > RhoPhiToZ(const double freq, const double rho, const double phi)
Definition: MTTensor.h:662
double GetI5() const
Definition: MTTensor.h:570
MTTensor & operator=(const MTTensor &source)
Definition: MTTensor.cpp:19
double GetdPhiyy() const
Definition: MTTensor.h:266
double GettrPhi() const
Definition: MTTensor.h:489
double GetdRhoyy() const
Definition: MTTensor.h:249
double GetKappa() const
Swift's skew.
Definition: MTTensor.h:378