Lemma is an Electromagnetics API
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

TEMSurveyLineRecord.h 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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 10/10/2014 12:15:03 PM
  11. * @version $Id$
  12. * @author Trevor Irons (ti)
  13. * @email Trevor.Irons@xri-geo.com
  14. * @copyright Copyright (c) 2014, XRI Geophysics, LLC
  15. * @copyright Copyright (c) 2014, Trevor Irons
  16. */
  17. #ifndef TEMSURVEYLINERECORD_INC
  18. #define TEMSURVEYLINERECORD_INC
  19. #include "LemmaObject.h"
  20. #include "TEMReceiver.h"
  21. #include "TEMTransmitter.h"
  22. #include "TEMSurveyLineRecordData.h"
  23. #include "instrumenttem.h"
  24. namespace Lemma {
  25. /**
  26. \brief Class holding everything necessary to create a TEM record.
  27. \details A TEM record represents the nexus of a transmitter with
  28. receiver(s) and pulse moment(s). Therefore a record can contain
  29. multiple sounding curves.
  30. */
  31. class TEMSurveyLineRecord : public LemmaObject {
  32. friend std::ostream &operator<<(std::ostream &stream,
  33. const TEMSurveyLineRecord &ob);
  34. friend class TEMSurveyLine;
  35. public:
  36. // ==================== LIFECYCLE =======================
  37. // ==================== OPERATORS =======================
  38. // ==================== OPERATIONS =======================
  39. /**
  40. * Perfoms forward modelling given model.
  41. * @param[in] model is the earth model responsible for the response
  42. * @param[in] additiveNoise is whether or not to add noise to the response, defaults to false
  43. * @return the modelled data.
  44. */
  45. TEMSurveyLineRecordData* ForwardModel(LayeredEarthEM* model, bool additiveNoise=false);
  46. /**
  47. * @param[in] nseq is the number of pulse sequences
  48. */
  49. void SetNumberOfPulseSequences( const int& nseq );
  50. /**
  51. * @return the number of pulse sequences
  52. */
  53. int GetNumberOfPulseSequences();
  54. /**
  55. * Sets the PulseSequence and Receiver pair used to model a *SINGLE* response curve.
  56. * @param[in] Seq is the Pulse Sequence
  57. * @param[in] Rx is the receiver for that pulse sequence
  58. */
  59. void SetTransmitterReceiverPair( const int& ii, TEMTransmitter* Seq, TEMReceiver* Rx );
  60. // ==================== ACCESS =======================
  61. /**
  62. * @return a pointer to the specified receiver
  63. */
  64. TEMReceiver* GetReceiver(const int& irec);
  65. // ==================== INQUIRY =======================
  66. #ifdef HAVE_YAMLCPP
  67. /**
  68. * Uses YAML to serialize this object.
  69. * @return a YAML::Node
  70. */
  71. YAML::Node Serialize() const;
  72. /**
  73. * Constructs an object from a YAML::Node.
  74. */
  75. static TEMSurveyLineRecord* DeSerialize(const YAML::Node& node);
  76. #endif
  77. protected:
  78. // ==================== LIFECYCLE =======================
  79. /** Default protected constructor, use New */
  80. TEMSurveyLineRecord (const std::string& name);
  81. #ifdef HAVE_YAMLCPP
  82. /** Protected DeDerializing constructor, use factory DeSerialize method*/
  83. TEMSurveyLineRecord (const YAML::Node& node);
  84. #endif
  85. /** Default protected destructor, use Delete */
  86. ~TEMSurveyLineRecord ();
  87. /**
  88. * @copybrief LemmaObject::Release()
  89. * @copydetails LemmaObject::Release()
  90. */
  91. void Release();
  92. private:
  93. /**
  94. * Delete is private, this class is managed through TEMSurvey
  95. */
  96. void Delete();
  97. // ==================== DATA MEMBERS =========================
  98. int numberOfPulseSequences;
  99. std::vector<TEMTransmitter*> Transmitters;
  100. std::vector<TEMReceiver*> Receivers;
  101. }; // ----- end of class TEMSurveyLineRecord -----
  102. } // ----- end of Lemma name -----
  103. #endif // ----- #ifndef TEMSURVEYLINERECORD_INC -----