|
@@ -24,7 +24,10 @@ std::shared_ptr<PolygonalWireAntenna> CircularLoop ( int nd, Real radius, Real O
|
24
|
24
|
|
25
|
25
|
int main(int argc, char** argv) {
|
26
|
26
|
|
27
|
|
- Real offset = atof(argv[1]);
|
|
27
|
+ if (argc < 6) { // 1 2 3 4 5
|
|
28
|
+ std::cout << "./KernelV0 TxCoil.yaml RxCoil.yaml EMEarthModel.yaml AkvoDataSet.yaml Output.yaml \n";
|
|
29
|
+ exit(EXIT_SUCCESS);
|
|
30
|
+ }
|
28
|
31
|
|
29
|
32
|
auto earth = LayeredEarthEM::NewSP();
|
30
|
33
|
earth->SetNumberOfLayers(3);
|
|
@@ -34,10 +37,19 @@ int main(int argc, char** argv) {
|
34
|
37
|
// From NOAA, Laramie WY, June 9 2016, aligned with mag. north
|
35
|
38
|
earth->SetMagneticFieldIncDecMag( 67, 9, 52750, NANOTESLA );
|
36
|
39
|
|
37
|
|
- // Transmitter loops
|
38
|
|
- auto Tx1 = CircularLoop(21, 15, 100, 100);
|
39
|
|
- auto Tx2 = CircularLoop(21, 15, 100, 100 + offset); // 100, 115, 124.8, 130
|
40
|
|
- //auto Tx1 = CircularLoop(60, 15, 0, 0); // was 60
|
|
40
|
+ auto Tx1 = PolygonalWireAntenna::DeSerialize( YAML::LoadFile(argv[1]) );
|
|
41
|
+ auto Tx2 = PolygonalWireAntenna::DeSerialize( YAML::LoadFile(argv[2]) );
|
|
42
|
+
|
|
43
|
+ ////////////////////////////////////// _
|
|
44
|
+ Tx1->SetCurrent(1.); // |
|
|
45
|
+ Tx1->SetNumberOfTurns(1); // Set these from Akvo input!
|
|
46
|
+ Tx1->SetNumberOfFrequencies(1); // |
|
|
47
|
+ Tx1->SetFrequency(0,2246); // |
|
|
48
|
+ Tx2->SetCurrent(1.); // |
|
|
49
|
+ Tx2->SetNumberOfTurns(1); // \ | /
|
|
50
|
+ Tx2->SetNumberOfFrequencies(1); // \ | /
|
|
51
|
+ Tx2->SetFrequency(0,2246); // \ | /
|
|
52
|
+ ////////////////////////////////////// _
|
41
|
53
|
|
42
|
54
|
auto Kern = KernelV0::NewSP();
|
43
|
55
|
Kern->PushCoil( "Coil 1", Tx1 );
|
|
@@ -46,24 +58,15 @@ int main(int argc, char** argv) {
|
46
|
58
|
|
47
|
59
|
Kern->SetIntegrationSize( (Vector3r() << 200,200,200).finished() );
|
48
|
60
|
Kern->SetIntegrationOrigin( (Vector3r() << 0,0,0).finished() );
|
49
|
|
- Kern->SetTolerance( 1e-12 ); // 1e-12
|
|
61
|
+ Kern->SetTolerance( 1e-9 ); // 1e-12
|
50
|
62
|
|
51
|
|
- Kern->AlignWithAkvoDataset( YAML::LoadFile(argv[2]) );
|
|
63
|
+ auto AkvoDataNode = YAML::LoadFile(argv[4]);
|
|
64
|
+ Kern->AlignWithAkvoDataset( AkvoDataNode );
|
52
|
65
|
|
53
|
|
- Kern->SetPulseDuration(0.020);
|
54
|
|
- VectorXr I(36);
|
|
66
|
+ // These should to into AlignWithAkvoDataSet...
|
|
67
|
+ Kern->SetPulseDuration( AkvoDataNode["pulseLength"][0].as<Real>() );
|
|
68
|
+ Kern->SetPulseCurrent( AkvoDataNode["Pulses"]["Pulse 1"]["current"].as<VectorXr>() ); // nbins, low, high
|
55
|
69
|
|
56
|
|
- // off from VC by 1.075926340216996
|
57
|
|
- // Pulses from Wyoming Red Buttes exp 0
|
58
|
|
- I << 397.4208916184016, 352.364477036168, 313.0112765842783, 278.37896394065376, 247.81424224324982,
|
59
|
|
- 220.77925043190442, 196.76493264105017, 175.31662279234038, 156.0044839325404, 138.73983004230124,
|
60
|
|
- 123.42064612625474, 109.82713394836259, 97.76534468972267, 87.06061858367781, 77.56000002944572, 69.1280780096311,
|
61
|
|
- 61.64250263640252, 54.99473044877554, 49.091182970515476, 43.84634004556388, 39.184136917167976, 35.03619319797924,
|
62
|
|
- 31.347205894128976, 28.06346770557137, 25.139117042424758, 22.53420773366429, 20.214205433283347,
|
63
|
|
- 18.144318026099942, 16.299965972298878, 14.652633628829891, 13.184271405688083, 11.870540177313893,
|
64
|
|
- 10.697057141915716, 9.64778948429609, 8.709338689612677, 7.871268012862094;
|
65
|
|
- //Kern->SetPulseCurrent( VectorXr::LinSpaced( 1, 10, 200 ) ); // nbins, low, high
|
66
|
|
- Kern->SetPulseCurrent( I ); // nbins, low, high
|
67
|
70
|
|
68
|
71
|
//VectorXr interfaces = VectorXr::LinSpaced( 41, .5, 45.5 ); // nlay, low, high
|
69
|
72
|
VectorXr interfaces = VectorXr::LinSpaced( 51, .5, 45.5 ); // nlay, low, high
|
|
@@ -76,10 +79,12 @@ int main(int argc, char** argv) {
|
76
|
79
|
|
77
|
80
|
// We could, I suppose, take the earth model in here? For non-linear that
|
78
|
81
|
// may be more natural to work with?
|
79
|
|
- std::vector<std::string> tx = {std::string("Coil 1"), std::string("Coil 2") };
|
|
82
|
+ //std::vector<std::string> tx = {std::string("Coil 1"), std::string("Coil 2") };
|
|
83
|
+ std::vector<std::string> tx = {std::string("Coil 1")}; //, std::string("Coil 2") };
|
80
|
84
|
std::vector<std::string> rx = {std::string("Coil 2")};
|
81
|
85
|
Kern->CalculateK0( tx, rx, false );
|
82
|
86
|
|
|
87
|
+/*
|
83
|
88
|
std::ofstream dout = std::ofstream(std::string("k-Tx2coil-Rx1coil-offset-")+ std::string(argv[1])+ std::string(".dat"));
|
84
|
89
|
//std::ofstream dout = std::ofstream(std::string("k-coincident.dat"));
|
85
|
90
|
dout << interfaces.transpose() << std::endl;
|
|
@@ -89,8 +94,10 @@ int main(int argc, char** argv) {
|
89
|
94
|
dout << "#imag\n";
|
90
|
95
|
dout << Kern->GetKernel().imag() << std::endl;
|
91
|
96
|
dout.close();
|
|
97
|
+*/
|
92
|
98
|
|
93
|
|
- std::ofstream out = std::ofstream(std::string("k-Tx2coil-Rx1coil-offset-")+std::string(argv[1])+std::string(".yaml"));
|
|
99
|
+ //std::ofstream out = std::ofstream(std::string("k-Tx2coil-Rx1coil-offset-")+std::string(argv[1])+std::string(".yaml"));
|
|
100
|
+ std::ofstream out = std::ofstream(std::string(argv[5]));
|
94
|
101
|
//std::ofstream out = std::ofstream(std::string("k-coincident.yaml"));
|
95
|
102
|
out << *Kern;
|
96
|
103
|
out.close();
|