Skip to content
Snippets Groups Projects
Commit c4b61fc7 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

Honeycomb fit example works again (but opens an empty plot besides two valid ones)

parent 1204d989
No related branches found
No related tags found
1 merge request!907Core cleanup
...@@ -12,7 +12,7 @@ import numpy ...@@ -12,7 +12,7 @@ import numpy
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
from scipy.optimize import differential_evolution from scipy.optimize import differential_evolution
import bornagain as ba import bornagain as ba
from bornagain import angstrom from bornagain import angstrom, sample_tools as st
# number of points on which the computed result is plotted # number of points on which the computed result is plotted
scan_size = 1500 scan_size = 1500
...@@ -158,12 +158,12 @@ def plot_sld_profile(fitParams, filename): ...@@ -158,12 +158,12 @@ def plot_sld_profile(fitParams, filename):
plt.figure() plt.figure()
parameters = dict(fitParams, **fixedParams) parameters = dict(fitParams, **fixedParams)
z_300_p, sld_300_p = ba.materialProfile(get_sample(parameters, 1)) z_300_p, sld_300_p = st.materialProfile(get_sample(parameters, 1))
z_300_m, sld_300_m = ba.materialProfile(get_sample(parameters, -1)) z_300_m, sld_300_m = st.materialProfile(get_sample(parameters, -1))
z_150_p, sld_150_p = ba.materialProfile( z_150_p, sld_150_p = st.materialProfile(
get_sample(parameters, 1, ms150=parameters["ms150"])) get_sample(parameters, 1, ms150=parameters["ms150"]))
z_150_m, sld_150_m = ba.materialProfile( z_150_m, sld_150_m = st.materialProfile(
get_sample(parameters, -1, ms150=parameters["ms150"])) get_sample(parameters, -1, ms150=parameters["ms150"]))
plt.figure() plt.figure()
...@@ -179,7 +179,7 @@ def plot_sld_profile(fitParams, filename): ...@@ -179,7 +179,7 @@ def plot_sld_profile(fitParams, filename):
plt.legend() plt.legend()
plt.tight_layout() plt.tight_layout()
plt.savefig(filename) plt.savefig(filename)
plt.close() # plt.close()
#################################################################### ####################################################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment