|
@@ -77,6 +77,7 @@ namespace Lemma {
|
77
|
77
|
node["Merlin_VERSION"] = MERLIN_VERSION;
|
78
|
78
|
node["T2StarBins"] = T2StarBins;
|
79
|
79
|
node["T2StarBinEdges"] = T2StarBinEdges;
|
|
80
|
+ node["ModelMat"] = ModelMat;
|
80
|
81
|
return node;
|
81
|
82
|
} // ----- end of method LayeredEarthMR::Serialize -----
|
82
|
83
|
|
|
@@ -96,9 +97,22 @@ namespace Lemma {
|
96
|
97
|
// Method: SetNumberOfLayers
|
97
|
98
|
//--------------------------------------------------------------------------------------
|
98
|
99
|
void LayeredEarthMR::SetNumberOfLayers ( const int& nlay ) {
|
|
100
|
+ NumberOfLayers = nlay;
|
|
101
|
+ NumberOfInterfaces = nlay+1;
|
99
|
102
|
return ;
|
100
|
103
|
} // ----- end of method LayeredEarthMR::SetNumberOfLayers -----
|
101
|
104
|
|
|
105
|
+ //--------------------------------------------------------------------------------------
|
|
106
|
+ // Class: LayeredEarthMR
|
|
107
|
+ // Method: AlignWithKernel
|
|
108
|
+ //--------------------------------------------------------------------------------------
|
|
109
|
+ void LayeredEarthMR::AlignWithKernel ( std::shared_ptr<KernelV0> Kern ) {
|
|
110
|
+ int nlay = Kern->GetInterfaces().size()-1;
|
|
111
|
+ SetNumberOfLayers( nlay );
|
|
112
|
+ LayerThickness = Kern->GetInterfaces().tail(nlay) - Kern->GetInterfaces().head(nlay) ;
|
|
113
|
+ SetMagneticFieldComponents( Kern->GetSigmaModel()->GetMagneticField(), TESLA);
|
|
114
|
+ return ;
|
|
115
|
+ } // ----- end of method LayeredEarthMR::AlignWithKernel -----
|
102
|
116
|
|
103
|
117
|
//--------------------------------------------------------------------------------------
|
104
|
118
|
// Class: LayeredEarthMR
|
|
@@ -113,15 +127,21 @@ namespace Lemma {
|
113
|
127
|
T2StarBinEdges[i] = T2StarBinEdges[i-1]*quotient;
|
114
|
128
|
}
|
115
|
129
|
T2StarBins = (T2StarBinEdges.head(nT2) + T2StarBinEdges.tail(nT2)) / 2;
|
|
130
|
+ InitModelMat();
|
116
|
131
|
return;
|
117
|
132
|
} // ----- end of method LayeredEarthMR::SetNumberOfT2StarBins -----
|
118
|
133
|
|
119
|
134
|
|
120
|
|
-} // ---- end of namespace Lemma ----
|
121
|
|
-
|
122
|
|
-
|
123
|
|
-
|
|
135
|
+ //--------------------------------------------------------------------------------------
|
|
136
|
+ // Class: LayeredEarthMR
|
|
137
|
+ // Method: InitModelMat
|
|
138
|
+ //--------------------------------------------------------------------------------------
|
|
139
|
+ void LayeredEarthMR::InitModelMat ( ) {
|
|
140
|
+ ModelMat = MatrixXr::Zero( T2StarBins.size(), NumberOfLayers );
|
|
141
|
+ return ;
|
|
142
|
+ } // ----- end of method LayeredEarthMR::InitModelMat -----
|
124
|
143
|
|
|
144
|
+} // ---- end of namespace Lemma ----
|
125
|
145
|
|
126
|
146
|
/* vim: set tabstop=4 expandtab: */
|
127
|
147
|
/* vim: set filetype=cpp: */
|