Konstantin Ladutenko 5 years ago
parent
commit
dd7693d8fb
2 changed files with 4 additions and 4 deletions
  1. 1 1
      src/nmie-pybind11.cc
  2. 3 3
      web/index.html

+ 1 - 1
src/nmie-pybind11.cc

@@ -156,7 +156,7 @@ py::tuple py_fieldnlay(const py::array_t<double, py::array::c_style | py::array:
   for (auto& f : E) f.resize(3);
   for (auto& f : H) f.resize(3);
   int L = py_x.size(), terms;
-  terms = nmie::nField(L, pl, c_x, c_m, nmax, ncoord, c_Xp, c_Yp, c_Zp, E, H);
+  terms = nmie::nField(L, pl, c_x, c_m, nmax, nmie::Modes::kAll, nmie::Modes::kAll, ncoord, c_Xp, c_Yp, c_Zp, E, H);
   auto py_E = VectorVector2Py<std::complex<double> >(E);
   auto py_H = VectorVector2Py<std::complex<double> >(H);
   return py::make_tuple(terms, py_E, py_H);

+ 3 - 3
web/index.html

@@ -15,7 +15,7 @@ R: <input type="number" id="R" step="any" value="100">
 Re(n): <input type="number" id="reN" step="any" value="4">
 Im(n): <input type="number" id="imN" step="any" value="0"><br>
 
-<button id="Evaluate">Run Mie!</button> <div id="time"></div>
+<button id="Evaluate" autofocus>Run Mie!</button> <span id="time"></span>
 <div id="PlotQsca" style="width:640px;height:580px;" ></div>
   <script src="/nmie.js"></script>
   <script>
@@ -88,9 +88,9 @@ Im(n): <input type="number" id="imN" step="any" value="0"><br>
             }
           }
         };
-        Plotly.newPlot('PlotQsca', data, layout, {showSendToCloud: true});
+        Plotly.newPlot('PlotQsca', data, layout, {showSendToCloud: true, displaylogo: false});
         var t1 = performance.now();
-        document.getElementById("time").innerHTML = "It took " + ((t1 - t0)/1000).toFixed(2) + " seconds.";
+        document.getElementById("time").innerHTML = "It took " + ((t1 - t0)/1000).toFixed(2) + " s.";
       };
     })
   </script>