Main Lemma Repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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:06:42 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,2018 Trevor Irons
  16. */
  17. #ifndef AEMSURVEY_INC
  18. #define AEMSURVEY_INC
  19. #include "LemmaObject.h"
  20. #include "DipoleSource.h"
  21. namespace Lemma {
  22. /**
  23. \brief Contains pertinant information about an AEM survey
  24. \details All important details about an AEM survey are stored here, but
  25. nothing about the underlying earth model.
  26. */
  27. class AEMSurvey : public LemmaObject {
  28. friend std::ostream &operator<<(std::ostream &stream,
  29. const AEMSurvey &ob);
  30. /// AEMSurveyReader currently provides the only concrete way to use this class.
  31. /// @todo consider making this an abstract class, that can only then exist through
  32. /// the reader. That is if you will not allow users to build their own.
  33. friend class AEMSurveyReader;
  34. public:
  35. // ==================== LIFECYCLE =======================
  36. /**
  37. * @copybrief LemmaObject::New()
  38. * @copydetails LemmaObject::New()
  39. */
  40. static std::shared_ptr<AEMSurvey> NewSP();
  41. /** Default protected constructor, use New */
  42. AEMSurvey (const ctor_key&);
  43. /** Default protected destructor, use Delete */
  44. ~AEMSurvey ();
  45. // ==================== OPERATORS =======================
  46. // ==================== OPERATIONS =======================
  47. // ==================== ACCESS =======================
  48. /** Returns a particular EM source. For now only dipole sources are supported,
  49. * general loops int the new future.
  50. * @param[in] isource is the source fiducial to return
  51. */
  52. std::shared_ptr<DipoleSource> GetSource(const int& isource);
  53. /** @return the total number of sources
  54. */
  55. int GetNumberOfSources();
  56. /** Returns vector of all frequencies used in the survey
  57. * @return a vector of the unique frequencies
  58. */
  59. VectorXr GetFrequencies();
  60. // ==================== INQUIRY =======================
  61. /** Returns the name of the underlying class, similiar to Python's type */
  62. virtual std::string GetName() const {
  63. return this->CName;
  64. }
  65. protected:
  66. // ==================== LIFECYCLE =======================
  67. private:
  68. // ==================== DATA MEMBERS =========================
  69. std::vector< std::shared_ptr<DipoleSource> > Sources;
  70. VectorXr Freqs;
  71. static constexpr auto CName = "AEMSurvey";
  72. }; // ----- end of class AEMSurvey -----
  73. } // ----- end of Lemma name -----
  74. #endif // ----- #ifndef AEMSURVEY_INC -----