Lemma is an Electromagnetics API
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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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 M. Andy Kass
  8. @date 02/19/2011
  9. @version $Id: modelreadertem1dubc.h 87 2013-09-05 22:44:05Z tirons $
  10. **/
  11. #ifndef __MODELREADERTEM1DUBC_H
  12. #define __MODELREADERTEM1DUBC_H
  13. #include "modelreadertem1d.h"
  14. namespace Lemma {
  15. // ===================================================================
  16. // Class: ModelReaderTem1DUBC
  17. /// \brief Model reader class for forward modelling 1D TEM data
  18. /// \details Reads UBC 1D TEM forward model format
  19. // ===================================================================
  20. class ModelReaderTem1DUBC : public ModelReaderTem1D {
  21. friend std::ostream &operator<<(std::ostream &stream,
  22. const ModelReaderTem1DUBC &ob);
  23. public:
  24. // ==================== LIFECYCLE =======================
  25. static ModelReaderTem1DUBC* New();
  26. void Delete();
  27. // ==================== OPERATORS =======================
  28. // ==================== OPERATIONS =======================
  29. void ReadParameters(const std::string &params);
  30. // ==================== ACCESS =======================
  31. /// Attaches a LayeredEarthEM object
  32. void SetEMEarth1D(LayeredEarthEM* earth);
  33. /// Attaches a WireAntenna object
  34. void SetTransmitter(WireAntenna *antennae);
  35. /// Attaches a ReceiverPoints object
  36. void SetReceiver(ReceiverPoints* receiver);
  37. VectorXr GetTimes();
  38. // ==================== INQUIRY =======================
  39. protected:
  40. // ==================== LIFECYCLE =======================
  41. /// Default protected constructor.
  42. ModelReaderTem1DUBC (const std::string &name);
  43. /// Default protected constructor.
  44. ~ModelReaderTem1DUBC ();
  45. void Release();
  46. /// Read in the Earth Model file and attach
  47. void ReadModel();
  48. /// Read in the instrument parameters and attach
  49. void ReadInstrument();
  50. /// Read in the waveform file (future)
  51. void ReadWaveform();
  52. // ==================== DATA MEMBERS =========================
  53. std::string modelfile;
  54. std::string instrumentfile;
  55. std::string waveformfile;
  56. WireAntenna* Trans;
  57. ReceiverPoints* Receivers;
  58. LayeredEarthEM* EarthMod;
  59. /// Simulated noise flag
  60. bool addednoise;
  61. /// Simulated noise percentage
  62. Real noisepercent;
  63. /// Baseline threshold percentage
  64. Real noisethresh;
  65. /// Seed for random number generator
  66. Real noiseseed;
  67. VectorXr receivermoment;
  68. VectorXr modtimes;
  69. private:
  70. }; // ----- end of class ModelReaderTem1DUBC -----
  71. } // end of namespace lemma
  72. #endif // __MODELREADERTEM1DUBC_H