Main Lemma Repository
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. /* This file is part of Lemma, a geophysical modelling and inversion API */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. /**
  6. @file
  7. @author Trevor Irons
  8. @date 03/23/2010
  9. @version $Id: datatem.h 193 2014-11-10 23:51:41Z tirons $
  10. **/
  11. #ifndef DATATEM_INC
  12. #define DATATEM_INC
  13. #include "data.h"
  14. namespace Lemma {
  15. // ===================================================================
  16. // Class: DataTEM
  17. /// \brief Class for TEM data.
  18. /// \details A lot to do here. Just a placeholder.
  19. // ===================================================================
  20. class DataTEM : public Data {
  21. friend std::ostream &operator<<(std::ostream &stream,
  22. const DataTEM &ob);
  23. public:
  24. // ==================== LIFECYCLE =======================
  25. /** Returns pointer to new object
  26. */
  27. static DataTEM* New();
  28. /** @copybrief Data::Clone()
  29. * @copydetails Data::Clone()
  30. */
  31. DataTEM* Clone();
  32. /**
  33. * @copybrief LemmaObject::Delete()
  34. * @copydetails LemmaObject::Delete()
  35. */
  36. void Delete();
  37. // ==================== OPERATORS =======================
  38. // ==================== OPERATIONS =======================
  39. void Zero();
  40. /** Data2 needs to be compatible with DataTEM, that is
  41. * to say that it needs to be able to be cast into the
  42. * form of DataTEM. It also needs to be aligned with
  43. * the calling class.
  44. */
  45. Real Norm(Data* Data2);
  46. // ==================== ACCESS =======================
  47. /// Set data dimensions
  48. void SetSize(const int &nObs,const int &nGates);
  49. /// Input the data
  50. void SetData(const MatrixXr &inputdata);
  51. /// Input the positions
  52. void SetPositions(const Vector3Xr &positions);
  53. /// Return number of time gates
  54. int GetnGates();
  55. /// Return number of soundings
  56. int GetnObs();
  57. /// Return data matrix
  58. MatrixXr GetData();
  59. /// Return single data coefficient
  60. Real GetDataCoeff(const int &x,const int &y);
  61. /// Return time
  62. VectorXr GetTimes();
  63. /// Return positions
  64. Vector3Xr GetPositions();
  65. // ==================== INQUIRY =======================
  66. protected:
  67. // ==================== LIFECYCLE =======================
  68. /// Default protected constructor.
  69. DataTEM (const std::string &name);
  70. /// Default protected constructor.
  71. ~DataTEM ();
  72. /**
  73. * @copybrief LemmaObject::Release()
  74. * @copydetails LemmaObject::Release()
  75. */
  76. void Release();
  77. // ==================== DATA MEMBERS =========================
  78. MatrixXr TEMDataCube;
  79. VectorXr times;
  80. Vector3Xr locations;
  81. int nGates;
  82. int nObs;
  83. private:
  84. }; // ----- end of class DataTEM -----
  85. } // ----- end of Lemma name -----
  86. #endif // ----- #ifndef DATATEM_INC -----
  87. /* vim: set tabstop=4 expandtab: */
  88. /* vim: set filetype=cpp: */