|
@@ -35,7 +35,8 @@ PYBIND11_MODULE(FDEM1D, m) {
|
35
|
35
|
|
36
|
36
|
// lifecycle
|
37
|
37
|
WireAntenna.def(py::init(&Lemma::WireAntenna::NewSP))
|
38
|
|
- .def_static("DeSerialize", py::overload_cast<const std::string&>(&Lemma::WireAntenna::DeSerialize), "Construct object from yaml representation")
|
|
38
|
+ .def_static("DeSerialize", py::overload_cast<const std::string&>(&Lemma::WireAntenna::DeSerialize),
|
|
39
|
+ "Construct object from yaml representation")
|
39
|
40
|
|
40
|
41
|
// print
|
41
|
42
|
.def("Serialize", &Lemma::WireAntenna::Print, "YAML representation of the class")
|
|
@@ -43,7 +44,8 @@ PYBIND11_MODULE(FDEM1D, m) {
|
43
|
44
|
|
44
|
45
|
// modifiers
|
45
|
46
|
.def("SetNumberOfPoints", &Lemma::WireAntenna::SetNumberOfPoints, "Sets the number of points comprising the antenna")
|
46
|
|
- .def("SetPoint", py::overload_cast<const int&, const Lemma::Real&, const Lemma::Real&, const Lemma::Real&>(&Lemma::WireAntenna::SetPoint), "Sets a point in the antenna")
|
|
47
|
+ .def("SetPoint", py::overload_cast<const int&, const Lemma::Real&, const Lemma::Real&, const Lemma::Real&>(&Lemma::WireAntenna::SetPoint),
|
|
48
|
+ "Sets a point in the antenna")
|
47
|
49
|
.def("SetPoint", py::overload_cast<const int&, const Lemma::Vector3r&>(&Lemma::WireAntenna::SetPoint),
|
48
|
50
|
"Sets a point in the antenna")
|
49
|
51
|
.def("SetNumberOfTurns", &Lemma::WireAntenna::SetNumberOfTurns, "Sets the number of turns of the antenna")
|
|
@@ -127,26 +129,37 @@ PYBIND11_MODULE(FDEM1D, m) {
|
127
|
129
|
.def("SetFrequencies", &Lemma::DipoleSource::SetFrequencies,
|
128
|
130
|
"Sets all frequencies, argument is numpy array of frequencies")
|
129
|
131
|
;
|
130
|
|
-}
|
131
|
|
-
|
132
|
132
|
|
133
|
|
-/*
|
134
|
|
-BOOST_PYTHON_MODULE(pyLemmaCore)
|
135
|
|
-{
|
136
|
|
- Py_Initialize();
|
137
|
|
- np::initialize();
|
|
133
|
+ py::class_<Lemma::LayeredEarthEM, std::shared_ptr<Lemma::LayeredEarthEM> > LayeredEarthEM(m, "LayeredEarthEM");
|
138
|
134
|
|
139
|
|
- bp::class_<Lemma::PolygonalWireAntenna, boost::noncopyable> ("PolygonalWireAntenna", boost::python::no_init)
|
|
135
|
+ // lifecycle
|
|
136
|
+ LayeredEarthEM.def(py::init(&Lemma::LayeredEarthEM::NewSP))
|
|
137
|
+ .def_static("DeSerialize", py::overload_cast<const std::string&>(&Lemma::LayeredEarthEM::DeSerialize),
|
|
138
|
+ "Construct object from yaml representation")
|
140
|
139
|
|
141
|
140
|
// print
|
142
|
|
- .def(boost::python::self_ns::str(bp::self))
|
|
141
|
+ .def("Serialize", &Lemma::LayeredEarthEM::Print, "YAML representation of the class")
|
|
142
|
+ .def("__repr__", &Lemma::LayeredEarthEM::Print)
|
143
|
143
|
|
144
|
|
- // Lifecycle
|
145
|
|
- .def("__init__", boost::python::make_constructor(&Lemma::PolygonalWireAntenna::NewSP))
|
146
|
|
- //.def("Serialize", &Lemma::PolygonalWireAntenna::Serialize)
|
147
|
|
- //.def("DeSerialize", &Lemma::PolygonalWireAntenna::DeSerialize)
|
|
144
|
+ // accessors
|
|
145
|
+ .def("GetName", &Lemma::LayeredEarthEM::GetName, "Returns the name of the class")
|
|
146
|
+
|
|
147
|
+ // modifiers
|
|
148
|
+ .def("SetNumberOfLayers", &Lemma::LayeredEarthEM::SetNumberOfLayers, "Sets the number of layers in the model")
|
|
149
|
+ .def("SetLayerConductivity", py::overload_cast< const Lemma::VectorXcr& >(&Lemma::LayeredEarthEM::SetLayerConductivity),
|
|
150
|
+ "Sets the conductivity of the layers, the input is a complex array of conductivity")
|
|
151
|
+ .def("SetLayerConductivity1", py::overload_cast< const int&, const Lemma::Complex& >(&Lemma::LayeredEarthEM::SetLayerConductivity),
|
|
152
|
+ "Sets the conductivity of a single layer, the first input is the layer index, and the secondinput is a complex conductivity")
|
|
153
|
+ .def("SetLayerThickness", &Lemma::LayeredEarthEM::SetLayerThickness,
|
|
154
|
+ "Sets the thickness of layers, excluding the air and bottom which are infinite")
|
|
155
|
+
|
|
156
|
+ // methods
|
|
157
|
+ .def("EvaluateColeColeModel", &Lemma::LayeredEarthEM::EvaluateColeColeModel,
|
|
158
|
+ "Calculates complex resistivity based on cole-cole parameters")
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+ ;
|
148
|
162
|
|
149
|
|
- // Accessors
|
150
|
|
- ;
|
151
|
163
|
}
|
152
|
|
-*/
|
|
164
|
+
|
|
165
|
+
|