|
@@ -43,7 +43,8 @@ PYBIND11_MODULE(FDEM1D, m) {
|
43
|
43
|
.def("__repr__", &Lemma::WireAntenna::Print)
|
44
|
44
|
|
45
|
45
|
// modifiers
|
46
|
|
- .def("SetNumberOfPoints", &Lemma::WireAntenna::SetNumberOfPoints, "Sets the number of points comprising the antenna")
|
|
46
|
+ .def("SetNumberOfPoints", &Lemma::WireAntenna::SetNumberOfPoints,
|
|
47
|
+ "Sets the number of points comprising the antenna")
|
47
|
48
|
.def("SetPoint", py::overload_cast<const int&, const Lemma::Real&, const Lemma::Real&, const Lemma::Real&>(&Lemma::WireAntenna::SetPoint),
|
48
|
49
|
"Sets a point in the antenna")
|
49
|
50
|
.def("SetPoint", py::overload_cast<const int&, const Lemma::Vector3r&>(&Lemma::WireAntenna::SetPoint),
|
|
@@ -131,12 +132,13 @@ PYBIND11_MODULE(FDEM1D, m) {
|
131
|
132
|
"Sets all frequencies, argument is numpy array of frequencies")
|
132
|
133
|
;
|
133
|
134
|
|
134
|
|
- py::class_<Lemma::LayeredEarthEM, std::shared_ptr<Lemma::LayeredEarthEM> > LayeredEarthEM(m, "LayeredEarthEM");
|
|
135
|
+ py::class_<Lemma::LayeredEarthEM, std::shared_ptr<Lemma::LayeredEarthEM> >
|
|
136
|
+ LayeredEarthEM(m, "LayeredEarthEM");
|
135
|
137
|
|
136
|
138
|
// lifecycle
|
137
|
139
|
LayeredEarthEM.def(py::init(&Lemma::LayeredEarthEM::NewSP))
|
138
|
|
- .def_static("DeSerialize", py::overload_cast<const std::string&>(&Lemma::LayeredEarthEM::DeSerialize),
|
139
|
|
- "Construct object from yaml representation")
|
|
140
|
+ .def_static("DeSerialize", py::overload_cast<const std::string&>
|
|
141
|
+ (&Lemma::LayeredEarthEM::DeSerialize),"Construct object from yaml representation")
|
140
|
142
|
|
141
|
143
|
// print
|
142
|
144
|
.def("Serialize", &Lemma::LayeredEarthEM::Print, "YAML representation of the class")
|
|
@@ -194,7 +196,8 @@ PYBIND11_MODULE(FDEM1D, m) {
|
194
|
196
|
|
195
|
197
|
|
196
|
198
|
// modifiers
|
197
|
|
- .def("SetNumberOfLayers", &Lemma::LayeredEarthEM::SetNumberOfLayers, "Sets the number of layers in the model")
|
|
199
|
+ .def("SetNumberOfLayers", &Lemma::LayeredEarthEM::SetNumberOfLayers,
|
|
200
|
+ "Sets the number of layers in the model")
|
198
|
201
|
.def("SetLayerConductivity", py::overload_cast< const Lemma::VectorXcr& >(&Lemma::LayeredEarthEM::SetLayerConductivity),
|
199
|
202
|
"Sets the conductivity of the layers, the input is a complex array of conductivity")
|
200
|
203
|
.def("SetLayerConductivity1", py::overload_cast< const int&, const Lemma::Complex& >(&Lemma::LayeredEarthEM::SetLayerConductivity),
|
|
@@ -220,10 +223,114 @@ PYBIND11_MODULE(FDEM1D, m) {
|
220
|
223
|
// methods
|
221
|
224
|
.def("EvaluateColeColeModel", &Lemma::LayeredEarthEM::EvaluateColeColeModel,
|
222
|
225
|
"Calculates complex resistivity based on cole-cole parameters")
|
|
226
|
+ ;
|
|
227
|
+
|
|
228
|
+ py::class_<Lemma::EMEarth1D, std::shared_ptr<Lemma::EMEarth1D> >
|
|
229
|
+ EMEarth1D(m, "EMEarth1D");
|
223
|
230
|
|
|
231
|
+ // lifecycle
|
|
232
|
+ EMEarth1D.def(py::init(&Lemma::EMEarth1D::NewSP))
|
|
233
|
+ //.def_static("DeSerialize", py::overload_cast<const std::string&>
|
|
234
|
+ // (&Lemma::EMEarth1D::DeSerialize),"Construct object from yaml representation")
|
|
235
|
+
|
|
236
|
+ // print
|
|
237
|
+ .def("Serialize", &Lemma::EMEarth1D::Print, "YAML representation of the class")
|
|
238
|
+ .def("__repr__", &Lemma::EMEarth1D::Print)
|
224
|
239
|
|
|
240
|
+ // accessors
|
|
241
|
+ .def("GetName", &Lemma::EMEarth1D::GetName, "Returns the name of the class")
|
|
242
|
+ .def("GetFieldPoints", &Lemma::EMEarth1D::GetFieldPoints, "Returns the FieldPoint class")
|
|
243
|
+
|
|
244
|
+ // modifiers
|
|
245
|
+ .def("AttachWireAntenna", &Lemma::EMEarth1D::AttachWireAntenna,
|
|
246
|
+ "Sets the wire antenna to use for calculations")
|
|
247
|
+ .def("AttachDipoleSOurce", &Lemma::EMEarth1D::AttachDipoleSource,
|
|
248
|
+ "Sets a DipoleSource to use for calculations")
|
|
249
|
+ .def("AttachFieldPoints", &Lemma::EMEarth1D::AttachFieldPoints,
|
|
250
|
+ "Sets the FieldPoints to use for calculations")
|
|
251
|
+ .def("AttachLayeredEarthEM", &Lemma::EMEarth1D::AttachLayeredEarthEM,
|
|
252
|
+ "Sets the LayeredEarthEM to use for calculations")
|
|
253
|
+
|
|
254
|
+ .def("SetFieldToCalculate", &Lemma::EMEarth1D::SetFieldsToCalculate,
|
|
255
|
+ "Sets which fields to calculate")
|
|
256
|
+ .def("SetHankelTransformMethod", &Lemma::EMEarth1D::SetHankelTransformMethod,
|
|
257
|
+ "Sets which Hankel transform to use")
|
|
258
|
+ .def("SetTxRxMode", &Lemma::EMEarth1D::SetTxRxMode,
|
|
259
|
+ "Sets the TxRx mode flag")
|
|
260
|
+
|
|
261
|
+ //methods
|
|
262
|
+#ifdef KIHALEE_EM1D
|
|
263
|
+ .def("MakeCalc", &Lemma::EMEarth1D::MakeCalc, "Calls KiHa Lee's EM1D FORTRAN77 code")
|
|
264
|
+#endif
|
|
265
|
+
|
|
266
|
+ .def("MakeCalc3", &Lemma::EMEarth1D::MakeCalc3, "Native Lemma EM calculation")
|
|
267
|
+ .def("CalculateWireAntennaFields", &Lemma::EMEarth1D::CalculateWireAntennaFields,
|
|
268
|
+ "Native Lemma calculation of a wire antenna")
|
225
|
269
|
;
|
226
|
270
|
|
|
271
|
+ py::class_<Lemma::FieldPoints, std::shared_ptr<Lemma::FieldPoints> >
|
|
272
|
+ FieldPoints(m, "FieldPoints");
|
|
273
|
+
|
|
274
|
+ // lifecycle
|
|
275
|
+ FieldPoints.def(py::init(&Lemma::FieldPoints::NewSP))
|
|
276
|
+ .def_static("DeSerialize", py::overload_cast<const std::string&>
|
|
277
|
+ (&Lemma::FieldPoints::DeSerialize),"Construct object from yaml representation")
|
|
278
|
+
|
|
279
|
+ // print
|
|
280
|
+ .def("Serialize", &Lemma::FieldPoints::Print, "YAML representation of the class")
|
|
281
|
+ .def("__repr__", &Lemma::FieldPoints::Print)
|
|
282
|
+
|
|
283
|
+ // modifiers
|
|
284
|
+ .def("SetNumberOfPoints", &Lemma::FieldPoints::SetNumberOfPoints,
|
|
285
|
+ "Sets the number of locations to make calculations on.")
|
|
286
|
+ .def("SetLocation", py::overload_cast< const int&, const Lemma::Vector3r& >
|
|
287
|
+ (&Lemma::FieldPoints::SetLocation), "Sets the location of the index-specified point." )
|
|
288
|
+ .def("SetLocation", py::overload_cast< const int&,
|
|
289
|
+ const Lemma::Real&, const Lemma::Real&, const Lemma::Real& >
|
|
290
|
+ (&Lemma::FieldPoints::SetLocation),
|
|
291
|
+ "Sets the location of the index-specified point with the three coordinates")
|
|
292
|
+
|
|
293
|
+ // accessors
|
|
294
|
+ .def("GetNumberOfPoints", &Lemma::FieldPoints::GetNumberOfPoints,
|
|
295
|
+ "Returns the number of locations to make calculations on.")
|
|
296
|
+ .def("GetLocations", &Lemma::FieldPoints::GetLocations,
|
|
297
|
+ "Returns the locations which calculations are made on.")
|
|
298
|
+ .def("GetLocationsMat", &Lemma::FieldPoints::GetLocationsMat,
|
|
299
|
+ "Returns a matrix of the locations which calculations are made on.")
|
|
300
|
+ .def("GetLocation", &Lemma::FieldPoints::GetLocation,
|
|
301
|
+ "Returns the location of the specified index.")
|
|
302
|
+ .def("GetLocationX", &Lemma::FieldPoints::GetLocationX,
|
|
303
|
+ "Returns the northing (x) location of the specified index.")
|
|
304
|
+ .def("GetLocationY", &Lemma::FieldPoints::GetLocationY,
|
|
305
|
+ "Returns the easting (y) location of the specified index.")
|
|
306
|
+ .def("GetLocationZ", &Lemma::FieldPoints::GetLocationZ,
|
|
307
|
+ "Returns the altitude/depth (z) location of the specified index.")
|
|
308
|
+ .def("GetEfield", py::overload_cast< > (&Lemma::FieldPoints::GetEfield),
|
|
309
|
+ "Returns the electric field for all frequencies.")
|
|
310
|
+ .def("GetEfield", py::overload_cast< const int& > (&Lemma::FieldPoints::GetEfield),
|
|
311
|
+ "Returns the electric field for the specified frequency index.")
|
|
312
|
+ .def("GetEfield", py::overload_cast< const int&, const int& > (&Lemma::FieldPoints::GetEfield),
|
|
313
|
+ "Returns the electric field for the specified frequency and location index.")
|
|
314
|
+ .def("GetEfieldMat", &Lemma::FieldPoints::GetEfieldMat,
|
|
315
|
+ "Returns the electric field for the specified frequency.")
|
|
316
|
+ .def("GetHfield", py::overload_cast< > (&Lemma::FieldPoints::GetHfield),
|
|
317
|
+ "Returns the H field for all frequencies.")
|
|
318
|
+ .def("GetHfield", py::overload_cast< const int& > (&Lemma::FieldPoints::GetHfield),
|
|
319
|
+ "Returns the H field for the specified frequency index.")
|
|
320
|
+ .def("GetHfield", py::overload_cast< const int&, const int& > (&Lemma::FieldPoints::GetHfield),
|
|
321
|
+ "Returns the H field for the specified frequency and location index.")
|
|
322
|
+ //.def("GetBfield", py::overload_cast< const int&, const int& > (&Lemma::FieldPoints::GetBfield),
|
|
323
|
+ // "Returns the magnetic (B) field for the specified frequency and location index.")
|
|
324
|
+ .def("GetHfieldMat", &Lemma::FieldPoints::GetHfieldMat,
|
|
325
|
+ "Returns the H field for the specified frequency.")
|
|
326
|
+ .def("GetMask", &Lemma::FieldPoints::MaskPoint, "Return the mask boolean value for the specified index")
|
|
327
|
+
|
|
328
|
+ // methods
|
|
329
|
+ .def("ClearFields", &Lemma::FieldPoints::ClearFields, "Clears calculated fields")
|
|
330
|
+ .def("MaskPoint", &Lemma::FieldPoints::MaskPoint, "Masks the index resulting in no calculation")
|
|
331
|
+ .def("UnMaskPoint", &Lemma::FieldPoints::UnMaskPoint, "Unmasks the index resulting in a calculation")
|
|
332
|
+
|
|
333
|
+ ;
|
227
|
334
|
}
|
228
|
335
|
|
229
|
336
|
|