Main Lemma Repository
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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/29/2014 11:43:17 AM
  11. * @author Trevor Irons (ti)
  12. * @email Trevor.Irons@lemmasoftware.org
  13. * @copyright Copyright (c) 2014, Trevor Irons
  14. */
  15. #ifndef TEMTRANSMITTER_INC
  16. #define TEMTRANSMITTER_INC
  17. #include "PolygonalWireAntenna.h"
  18. namespace Lemma {
  19. /**
  20. \brief Describes a TEM transmitter
  21. \details Flexible class desribing a source used by TEM instrument.
  22. Can be used by Airborne or Ground instruments.
  23. */
  24. class TEMTransmitter : public PolygonalWireAntenna {
  25. friend std::ostream &operator<<(std::ostream &stream, const TEMTransmitter &ob);
  26. public:
  27. // ==================== LIFECYCLE =======================
  28. /** Default protected constructor, use New */
  29. explicit TEMTransmitter (const ctor_key& );
  30. /** Default protected constructor, use New */
  31. TEMTransmitter (const YAML::Node& node, const ctor_key& );
  32. /** Default protected destructor, use Delete */
  33. ~TEMTransmitter ();
  34. /**
  35. * @copybrief LemmaObject::New()
  36. * @copydetails LemmaObject::New()
  37. */
  38. static std::shared_ptr<TEMTransmitter> NewSP();
  39. /**
  40. * Performs a deep copy of this and returns pointer
  41. */
  42. std::shared_ptr<TEMTransmitter> Clone();
  43. YAML::Node Serialize() const;
  44. static std::shared_ptr<TEMTransmitter> DeSerialize(const YAML::Node& node);
  45. // ==================== OPERATORS =======================
  46. // ==================== OPERATIONS =======================
  47. // ==================== ACCESS =======================
  48. /** Sets the repetition frequency
  49. */
  50. void SetRepFrequency(const Real& fr, const FREQUENCYUNITS& units);
  51. void SetWaveform( const VectorXr& times, const VectorXr& amps, const TIMEUNITS& units );
  52. // ==================== INQUIRY =======================
  53. /**
  54. * @return the waveform times in seconds
  55. */
  56. VectorXr GetWfmTimes();
  57. /** @return the waveform current in amps
  58. */
  59. VectorXr GetWfmAmps();
  60. /** Returns the name of the underlying class, similiar to Python's type */
  61. virtual std::string GetName() const {
  62. return this->CName;
  63. }
  64. protected:
  65. // ==================== LIFECYCLE =======================
  66. private:
  67. static constexpr auto CName = "TEMTransmitter";
  68. // ==================== DATA MEMBERS =========================
  69. Real repFreq;
  70. FREQUENCYUNITS repFreqUnits;
  71. VectorXr wfmTimes;
  72. VectorXr wfmAmps;
  73. }; // ----- end of class TEMTransmitter -----
  74. } // namespace Lemma
  75. #endif // ----- #ifndef TEMTRANSMITTER_INC -----