Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mlz
BornAgain
Commits
1d0254c1
Commit
1d0254c1
authored
Jun 01, 2022
by
Wuttke, Joachim
Browse files
s/plot_heatmap/plot_simres/g
parent
8592ae57
Changes
5
Hide whitespace changes
Inline
Side-by-side
Examples/fit/scatter2d/multiple_datasets.py
View file @
1d0254c1
...
...
@@ -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
,
...
...
Examples/scatter2d/AxesInDifferentUnits.py
View file @
1d0254c1
...
...
@@ -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})$'
,
...
...
Examples/scatter2d/PositionVariance.py
View file @
1d0254c1
...
...
@@ -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
,
...
...
Wrap/Python/ba_fitmonitor.py
View file @
1d0254c1
...
...
@@ -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
,
...
...
Wrap/Python/ba_plot.py
View file @
1d0254c1
...
...
@@ -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 o
bject obtained from ScatteringSimulation
:param hist: Histogram2D o
r 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
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment