Commit 1d0254c1 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

s/plot_heatmap/plot_simres/g

parent 8592ae57
......@@ -107,21 +107,21 @@ class PlotObserver():
zmax = real_data.data().maxVal()
plt.subplot(canvas[i_dataset*3])
bp.plot_heatmap(real_data,
bp.plot_simres(real_data,
title="\"Real\" data - #" +
str(i_dataset + 1),
intensity_min=1,
intensity_max=zmax,
zlabel="")
plt.subplot(canvas[1 + i_dataset*3])
bp.plot_heatmap(simul_data,
bp.plot_simres(simul_data,
title="Simulated data - #" +
str(i_dataset + 1),
intensity_min=1,
intensity_max=zmax,
zlabel="")
plt.subplot(canvas[2 + i_dataset*3])
bp.plot_heatmap(chi2_map,
bp.plot_simres(chi2_map,
title="Chi2 map - #" + str(i_dataset + 1),
intensity_min=0.001,
intensity_max=10,
......
......@@ -39,7 +39,7 @@ def plot(result):
plt.subplot(2, 2, 1)
# default units for rectangular detector are millimeters
bp.plot_heatmap(result,
bp.plot_simres(result,
xlabel=r'$x \;({\rm mm})$',
ylabel=r'$y \;({\rm mm})$',
zlabel=None,
......@@ -47,7 +47,7 @@ def plot(result):
plt.title("Default: real-space detector coordinates", loc='left')
plt.subplot(2, 2, 2)
bp.plot_heatmap(result,
bp.plot_simres(result,
units=ba.Coords_NBINS,
xlabel=r'$X_{\rm bin}$',
ylabel=r'$Y_{\rm bin}$',
......@@ -56,7 +56,7 @@ def plot(result):
plt.title("Bin indices", loc='left')
plt.subplot(2, 2, 3)
bp.plot_heatmap(result,
bp.plot_simres(result,
units=ba.Coords_DEGREES,
xlabel=r'$\varphi_{\rm f} \;(^{\circ})$',
ylabel=r'$\alpha_{\rm f} \;(^{\circ})$',
......@@ -65,7 +65,7 @@ def plot(result):
plt.title("Deflection angles", loc='left')
plt.subplot(2, 2, 4)
bp.plot_heatmap(result,
bp.plot_simres(result,
units=ba.Coords_QSPACE,
xlabel=r'$Q_{y} \;(1/{\rm nm})$',
ylabel=r'$Q_{z} \;(1/{\rm nm})$',
......
......@@ -56,7 +56,7 @@ def run_one(hasVariance, xi, nPlot, title):
plt.subplot(3, 2, nPlot)
return bp.plot_heatmap(result,
return bp.plot_simres(result,
title=title,
intensity_max=3e7,
intensity_min=3e0,
......
......@@ -90,7 +90,7 @@ class PlotterGISAS(Plotter):
zmax = np.amax(arr) if self._zmax is None else self._zmax
zmin = zmax * 1e-6 if self._zmin is None else self._zmin
bp.plot_heatmap(real_data,
bp.plot_simres(real_data,
title="Experimental data",
intensity_min=zmin,
intensity_max=zmax,
......@@ -101,7 +101,7 @@ class PlotterGISAS(Plotter):
aspect=self._aspect)
self.make_subplot(2)
bp.plot_heatmap(sim_data,
bp.plot_simres(sim_data,
title="Simulated data",
intensity_min=zmin,
intensity_max=zmax,
......@@ -112,7 +112,7 @@ class PlotterGISAS(Plotter):
aspect=self._aspect)
self.make_subplot(3)
bp.plot_heatmap(diff,
bp.plot_simres(diff,
title="Difference",
intensity_min=zmin,
intensity_max=zmax,
......
......@@ -187,7 +187,7 @@ def plot_array(array, axes_limits=None, **kwargs):
def plot_histogram(hist, **kwargs):
"""
Plots intensity data as heat map
:param hist: Histogram2D object obtained from ScatteringSimulation
:param hist: Histogram2D or two-dimensional Powerfield
"""
if 'xlabel' not in kwargs:
......@@ -201,7 +201,7 @@ def plot_histogram(hist, **kwargs):
plot_array(hist.npArray(), axes_limits=axes_limits, **kwargs)
def plot_heatmap(result, **kwargs):
def plot_simres(result, **kwargs):
"""
Plots intensity data as heat map
:param result: SimulationResult from GISAS/OffspecSimulation
......@@ -422,7 +422,7 @@ def plot_simulation_result(result):
# 1D data => assume specular simulation
plot_specular_curve(result, **plotargs)
else:
plot_heatmap(result, **plotargs)
plot_simres(result, **plotargs)
plt.tight_layout()
show_or_export()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment