Skip to content
Snippets Groups Projects
Commit 1837c6a9 authored by AlQuemist's avatar AlQuemist
Browse files

fx Wrap/Python/src/bornagain/ba_fitmonitor.py

parent feee844e
No related branches found
No related tags found
1 merge request!2718Introduce a new Numpy interface (Major change)
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
import bornagain as ba import bornagain as ba
from bornagain import ba_plot as bp from bornagain import ba_plot as bp
from bornagain.numpyutil import Arrayf64Converter as dac
try: # workaround for build servers try: # workaround for build servers
import numpy as np import numpy as np
from matplotlib import pyplot as plt from matplotlib import pyplot as plt
...@@ -80,7 +82,7 @@ class PlotterGISAS(Plotter): ...@@ -80,7 +82,7 @@ class PlotterGISAS(Plotter):
self.make_subplot(1) self.make_subplot(1)
# same limits for both plots # same limits for both plots
arr = data.npArray() arr = dac.asNpArray(data.dataArray())
zmax = np.amax(arr) if self._zmax is None else self._zmax zmax = np.amax(arr) if self._zmax is None else self._zmax
zmin = zmax*1e-6 if self._zmin is None else self._zmin zmin = zmax*1e-6 if self._zmin is None else self._zmin
...@@ -154,9 +156,9 @@ class PlotterSpecular: ...@@ -154,9 +156,9 @@ class PlotterSpecular:
sim_data = fit_objective.simulationResult().plottableField() sim_data = fit_objective.simulationResult().plottableField()
# data values # data values
sim_values = sim_data.npArray() sim_values = dac.asNpArray(sim_data.dataArray())
exp_values = exp_data.npArray() exp_values = dac.asNpArray(exp_data.dataArray())
unc_values = exp_data.npErrors() unc_values = dac.asNpArray(exp_data.errors())
# default font properties dictionary to use # default font properties dictionary to use
font = { 'size': 16 } font = { 'size': 16 }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment