Main Lemma Repository
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

AEMSurveyReader.h 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. /* This file is part of Lemma, a geophysical modelling and inversion API.
  2. * More information is available at http://lemmasoftware.org
  3. */
  4. /* This Source Code Form is subject to the terms of the Mozilla Public
  5. * License, v. 2.0. If a copy of the MPL was not distributed with this
  6. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  7. */
  8. /**
  9. * @file
  10. * @date 09/24/2013 04:29:27 PM
  11. * @version $Id$
  12. * @author Trevor Irons (ti)
  13. * @email Trevor.Irons@lemmasoftware.org
  14. * @copyright Copyright (c) 2013, XRI Geophysics, LLC
  15. * @copyright Copyright (c) 2013, Trevor Irons
  16. */
  17. #ifndef AEMSURVEYREADER_INC
  18. #define AEMSURVEYREADER_INC
  19. #include "LemmaObject.h"
  20. #include "AEMSurvey.h"
  21. #include "ASCIIParser.h"
  22. namespace Lemma {
  23. /**
  24. \brief Reads an ASCII description of an AEM survey
  25. \details The file format is described as follows.
  26. */
  27. class AEMSurveyReader : public LemmaObject {
  28. friend std::ostream &operator<<(std::ostream &stream,
  29. const AEMSurveyReader &ob);
  30. public:
  31. // ==================== LIFECYCLE =======================
  32. /**
  33. * @copybrief LemmaObject::NewSP()
  34. * @copydetails LemmaObject::NewSP()
  35. */
  36. static std::shared_ptr<AEMSurveyReader> NewSP();
  37. /** Default protected constructor, use New */
  38. AEMSurveyReader (const ctor_key&);
  39. /** Default protected destructor, use Delete */
  40. ~AEMSurveyReader ();
  41. // ==================== OPERATORS =======================
  42. // ==================== OPERATIONS =======================
  43. /**
  44. *
  45. @code
  46. // AEM Survey Specification file
  47. 5 // N sources
  48. 400 // Source 1 frequency Hz
  49. MD // Source 1 type
  50. -7 0 -10 // Source 1 relative position front/back, left/right, up/down
  51. 1 // Source 1 moment
  52. 1800 // Source 2 frequency Hz
  53. VMD // Source 2 type
  54. -7 0 -10 // Source 2 relative position
  55. 1 // Source 2 moment
  56. 8200 // Source 3 freqeuncy Hz
  57. MD // Source 3 type
  58. -7 0 -10 // Source 3 relative position
  59. 1 // Source 3 moment
  60. 40000 // Source 4 frequency Hz
  61. MD // Source 4 type
  62. -7 0 -10 // Source 4 relative position
  63. 1 // Source 4 moment
  64. 140000 // Source 5 frequency Hz
  65. MD // Source 5 type
  66. -7 0 -10 // Source 5 relative position
  67. 1 // Source 5 moment
  68. // Flight Plan (in same coordinates as grid)
  69. 2 // Number of points
  70. // location in x, y, z, polarisation [x,y,z]
  71. -200 -200 -30 0 0 1
  72. -190 -200 -30 0 0 1
  73. @endcode
  74. */
  75. void ReadASCIIAEMFile( const std::string& name );
  76. // ==================== ACCESS =======================
  77. /**
  78. * @return the AEMSurvey based on the file read
  79. */
  80. std::shared_ptr<AEMSurvey> GetSurvey();
  81. // ==================== INQUIRY =======================
  82. /** Returns the name of the underlying class, similiar to Python's type */
  83. virtual std::string GetName() const {
  84. return this->CName;
  85. }
  86. protected:
  87. // ==================== LIFECYCLE =======================
  88. private:
  89. // ==================== DATA MEMBERS =========================
  90. std::shared_ptr<AEMSurvey> Survey;
  91. static constexpr auto CName = "AEMSurveyReader";
  92. }; // ----- end of class AEMSurveyReader -----
  93. } // ----- end of Lemma name -----
  94. #endif // ----- #ifndef AEMSURVEYREADER_INC -----