Skip to content
Snippets Groups Projects
Unverified Commit c8b127ec authored by Yurov, Dmitry's avatar Yurov, Dmitry Committed by GitHub
Browse files

Merge pull request #648 from gpospelov/release-1.13.0

Minor changes in Python scripts
parents 52e72574 3f4b04d3
Branches
Tags
No related merge requests found
...@@ -86,7 +86,6 @@ class PlotObserver(): ...@@ -86,7 +86,6 @@ class PlotObserver():
def __init__(self): def __init__(self):
self.fig = plt.figure(figsize=(10.25, 7.69)) self.fig = plt.figure(figsize=(10.25, 7.69))
self.fig.canvas.draw() self.fig.canvas.draw()
plt.ion()
def plot_real_data(self, data, nplot): def plot_real_data(self, data, nplot):
plt.subplot(2, 2, nplot) plt.subplot(2, 2, nplot)
......
...@@ -90,7 +90,6 @@ class PlotObserver(): ...@@ -90,7 +90,6 @@ class PlotObserver():
def __init__(self, draw_every_nth=10): def __init__(self, draw_every_nth=10):
self.fig = plt.figure(figsize=(12.8, 10.24)) self.fig = plt.figure(figsize=(12.8, 10.24))
self.fig.canvas.draw() self.fig.canvas.draw()
plt.ion()
def plot_datasets(self, fit_objective, canvas): def plot_datasets(self, fit_objective, canvas):
for i_dataset in range(0, fit_objective.fitObjectCount()): for i_dataset in range(0, fit_objective.fitObjectCount()):
......
...@@ -64,16 +64,16 @@ def run_simulation(): ...@@ -64,16 +64,16 @@ def run_simulation():
# conditions to define cylinders scale factor and integration flag # conditions to define cylinders scale factor and integration flag
conditions = [ conditions = [
{'title': "Small cylinders, analytical calculations", {'title': "Small cylinders, analytical calculations",
'scale': 1, 'integration': False}, 'scale': 1, 'integration': False, 'zmin': 1e-5, 'zmax': 1e2},
{'title': "Small cylinders, Monte-Carlo integration", {'title': "Small cylinders, Monte-Carlo integration",
'scale': 1, 'integration': True}, 'scale': 1, 'integration': True, 'zmin': 1e-5, 'zmax': 1e2},
{'title': "Large cylinders, analytical calculations", {'title': "Large cylinders, analytical calculations",
'scale': 100, 'integration': False}, 'scale': 100, 'integration': False, 'zmin': 1e-5, 'zmax': 1e10},
{'title': "Large cylinders, Monte-Carlo integration", {'title': "Large cylinders, Monte-Carlo integration",
'scale': 100, 'integration': True} 'scale': 100, 'integration': True, 'zmin': 1e-5, 'zmax': 1e10}
] ]
# run simulation 4 times and plot results # run simulation 4 times and plot results
...@@ -92,7 +92,9 @@ def run_simulation(): ...@@ -92,7 +92,9 @@ def run_simulation():
plt.subplot(2, 2, i_plot+1) plt.subplot(2, 2, i_plot+1)
plt.subplots_adjust(wspace=0.3, hspace=0.3) plt.subplots_adjust(wspace=0.3, hspace=0.3)
ba.plot_colormap(result, zmin=1e-2) zmin = condition['zmin']
zmax = condition['zmax']
ba.plot_colormap(result, zmin=zmin, zmax=zmax)
plt.text(0.0, 2.1, conditions[i_plot]['title'], plt.text(0.0, 2.1, conditions[i_plot]['title'],
horizontalalignment='center', verticalalignment='center', horizontalalignment='center', verticalalignment='center',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment