Browse Source

LayeredEarthEM mocked up and looking good.

master
T-bone 7 years ago
parent
commit
08046dd915
2 changed files with 10 additions and 7 deletions
  1. 4
    3
      include/LayeredEarthMR.h
  2. 6
    4
      src/LayeredEarthMR.cpp

+ 4
- 3
include/LayeredEarthMR.h View File

@@ -149,9 +149,10 @@ namespace Lemma {
149 149
         /** Initializes the model matrix */
150 150
         void InitModelMat();
151 151
 
152
-        VectorXr T2StarBins;
153
-        VectorXr T2StarBinEdges;  // Convenience for pcolor
154
-        MatrixXr ModelMat;
152
+        VectorXr Interfaces;      // Layer interfaces, for pcolor
153
+        VectorXr T2StarBins;      // the actual T2* values
154
+        VectorXr T2StarBinEdges;  // Convenience, for pcolor
155
+        MatrixXr ModelMat;        // The NMR model, in matrix form
155 156
 
156 157
     }; // -----  end of class  LayeredEarthMR  -----
157 158
 }  // -----  end of namespace Lemma ----

+ 6
- 4
src/LayeredEarthMR.cpp View File

@@ -45,7 +45,10 @@ namespace Lemma {
45 45
     // Description:  DeSerializing constructor (locked)
46 46
     //--------------------------------------------------------------------------------------
47 47
     LayeredEarthMR::LayeredEarthMR (const YAML::Node& node, const ctor_key&) : LayeredEarth(node) {
48
-
48
+        Interfaces = node["Interfaces"].as<VectorXr>();
49
+        T2StarBins = node["T2StarBins"].as<VectorXr>();
50
+        T2StarBinEdges = node["T2StarBinEdges"].as<VectorXr>();
51
+        ModelMat = node["ModelMat"].as<MatrixXr>();
49 52
     }  // -----  end of method LayeredEarthMR::LayeredEarthMR  (constructor)  -----
50 53
 
51 54
     //--------------------------------------------------------------------------------------
@@ -75,12 +78,10 @@ namespace Lemma {
75 78
         node.SetTag( GetName() );
76 79
         // FILL IN CLASS SPECIFICS HERE
77 80
         node["Merlin_VERSION"] = MERLIN_VERSION;
81
+        node["Interfaces"] = Interfaces;
78 82
         node["T2StarBins"] = T2StarBins;
79 83
         node["T2StarBinEdges"] = T2StarBinEdges;
80 84
         node["ModelMat"] = ModelMat;
81
-        node["Thingy"].push_back( "Hello" );
82
-        node["Thingy"].push_back( "Whirld" );
83
-
84 85
         return node;
85 86
     }		// -----  end of method LayeredEarthMR::Serialize  -----
86 87
 
@@ -112,6 +113,7 @@ namespace Lemma {
112 113
     void LayeredEarthMR::AlignWithKernel ( std::shared_ptr<KernelV0> Kern ) {
113 114
         int nlay = Kern->GetInterfaces().size()-1;
114 115
         SetNumberOfLayers( nlay );
116
+        Interfaces = Kern->GetInterfaces();
115 117
         LayerThickness = Kern->GetInterfaces().tail(nlay) - Kern->GetInterfaces().head(nlay) ;
116 118
         SetMagneticFieldComponents( Kern->GetSigmaModel()->GetMagneticField(), TESLA);
117 119
         return ;

Loading…
Cancel
Save