Browse Source

kernel calc tweaks

master
Trevor Irons 6 years ago
parent
commit
120d2c141f
2 changed files with 19 additions and 18 deletions
  1. 18
    18
      examples/KernelV0-2.cpp
  2. 1
    0
      src/KernelV0.cpp

+ 18
- 18
examples/KernelV0-2.cpp View File

@@ -45,26 +45,26 @@ int main(int argc, char** argv) {
45 45
 
46 46
     // TODO fix python post-processing so this is not necessary
47 47
     // Save in simplified format for easy python plotting
48
-    std::ofstream dout = std::ofstream(std::string("Tx")+std::string(argv[2])+std::string("Rx-")+std::string(argv[3])+std::string(".dat"));
49
-    dout << "# Transmitters: ";
50
-    for (auto lp : tx) {
51
-        dout << lp << "\t";
52
-    }
53
-    dout << "\n# Receivers: ";
54
-    for (auto lp : rx) {
55
-        dout << lp << "\t";
56
-    }
57
-    dout << "\n# Tolerance: " << Kern->GetTolerance() << std::endl;
58
-        dout << Kern->GetInterfaces().transpose() << std::endl;
59
-        dout << Kern->GetPulseDuration()*Kern->GetPulseCurrent().transpose() << std::endl;
60
-        dout << "#real\n";
61
-        dout << Kern->GetKernel().real() << std::endl;
62
-        dout << "#imag\n";
63
-        dout << Kern->GetKernel().imag() << std::endl;
64
-        dout.close();
48
+//     std::ofstream dout = std::ofstream(std::string("Tx")+std::string(argv[2])+std::string("Rx-")+std::string(argv[3])+std::string(".dat"));
49
+//     dout << "# Transmitters: ";
50
+//     for (auto lp : tx) {
51
+//         dout << lp << "\t";
52
+//     }
53
+//     dout << "\n# Receivers: ";
54
+//     for (auto lp : rx) {
55
+//         dout << lp << "\t";
56
+//     }
57
+//     dout << "\n# Tolerance: " << Kern->GetTolerance() << std::endl;
58
+//         dout << Kern->GetInterfaces().transpose() << std::endl;
59
+//         dout << Kern->GetPulseDuration()*Kern->GetPulseCurrent().transpose() << std::endl;
60
+//         dout << "#real\n";
61
+//         dout << Kern->GetKernel().real() << std::endl;
62
+//         dout << "#imag\n";
63
+//         dout << Kern->GetKernel().imag() << std::endl;
64
+//         dout.close();
65 65
 
66 66
     // Save YAML kernel
67
-    std::ofstream out = std::ofstream(std::string("Tx")+std::string(argv[2])+std::string("Rx-")+std::string(argv[3])+std::string(".yaml"));
67
+    std::ofstream out = std::ofstream(std::string("Tx-")+std::string(argv[2])+std::string("_Rx-")+std::string(argv[3])+std::string(".yaml"));
68 68
     out << *Kern;
69 69
     out.close();
70 70
 

+ 1
- 0
src/KernelV0.cpp View File

@@ -47,6 +47,7 @@ namespace Lemma {
47 47
     // Description:  DeSerializing constructor (locked)
48 48
     //--------------------------------------------------------------------------------------
49 49
     KernelV0::KernelV0 (const YAML::Node& node, const ctor_key&) : LemmaObject(node) {
50
+        std::cout << "Deserializing Kernel" << std::endl;
50 51
         //node["PulseType"] = "FID";
51 52
         Larmor = node["Larmor"].as<Real>();
52 53
         Temperature = node["Temperature"].as<Real>();

Loading…
Cancel
Save