diff --git a/Examples/Python/fit54_ExternalMinimizer/lmfit_with_plotting.py b/Examples/Python/fit54_ExternalMinimizer/lmfit_with_plotting.py index b08c02e7d5a65a70b76372507a7c3e113b9aec40..fc9514b085ea35b899a796d52848023f89f36223 100644 --- a/Examples/Python/fit54_ExternalMinimizer/lmfit_with_plotting.py +++ b/Examples/Python/fit54_ExternalMinimizer/lmfit_with_plotting.py @@ -103,7 +103,8 @@ def run_fitting(): params.add('length', value=10*nm, min=8*nm, max=14*nm) plotter = Plotter(fit_objective) - result = lmfit.minimize(fit_objective.evaluate_residuals, params, iter_cb=plotter) + result = lmfit.minimize( + fit_objective.evaluate_residuals, params, iter_cb=plotter) fit_objective.finalize(result) result.params.pretty_print() diff --git a/Examples/Python/fit61_Galaxi/fit_galaxi_data.py b/Examples/Python/fit61_Galaxi/fit_galaxi_data.py index a60048f30cbc7fe34d23ddd7f37c3dbd769c6263..f02b85a638485e91e4887371c57feb71990ab2ee 100644 --- a/Examples/Python/fit61_Galaxi/fit_galaxi_data.py +++ b/Examples/Python/fit61_Galaxi/fit_galaxi_data.py @@ -37,7 +37,7 @@ def create_simulation(params): simulation.setBeamParameters(wavelength, alpha_i, 0.0) simulation.setBeamIntensity(1.2e7) simulation.setRegionOfInterest(85.0, 70.0, 120.0, 92.) - simulation.addMask(ba.Rectangle(101.9, 82.1, 103.7, 85.2), True) # mask on reflected beam + simulation.addMask(ba.Rectangle(101.9, 82.1, 103.7, 85.2), True) # beamstop sample_builder = SampleBuilder() sample = sample_builder.create_sample(params) diff --git a/Examples/Python/utils/plot_intensity_data_diff.py b/Examples/Python/utils/plot_intensity_data_diff.py index 0ed169f832d62a9e343350d8ebb1d62fa037f6d8..d79dd4ce5c13b5c329df0cd6e21f18f305585175 100755 --- a/Examples/Python/utils/plot_intensity_data_diff.py +++ b/Examples/Python/utils/plot_intensity_data_diff.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 ''' Plots intensity data difference stored in BornAgain "*.int" or "*.int.gz" format -Usage: python plot_intensity_data_diff.py intensity_reference.int.gz intensity_other.int.gz +Usage: python plot_intensity_data_diff.py reference.int.gz new.int.gz ''' import numpy as np @@ -20,8 +20,10 @@ def plot_intensity_data_diff(filename1, filename2): rank = intensity_ref.rank() if rank == 2: pid.plot_raw_data_2d(data, - [intensity_ref.getXmin() / ba.deg, intensity_ref.getXmax() / ba.deg, - intensity_ref.getYmin() / ba.deg, intensity_ref.getYmax() / ba.deg], + [intensity_ref.getXmin() / ba.deg, + intensity_ref.getXmax() / ba.deg, + intensity_ref.getYmin() / ba.deg, + intensity_ref.getYmax() / ba.deg], data.max()) elif rank == 1: axis_values = np.asarray(intensity_ref.xAxis().binCenters()) / ba.deg diff --git a/Examples/Python/utils/show2d.py b/Examples/Python/utils/show2d.py index 3ff7cc9370759eb0012909317c01245828695279..73a3d4ec22bcb2ba7dd54af37ec4b1384981565d 100755 --- a/Examples/Python/utils/show2d.py +++ b/Examples/Python/utils/show2d.py @@ -27,7 +27,7 @@ def PlotNumpyArray(a, zmin = 1, zmax = None): plt.xlabel(r'$\phi_f$', fontsize=20) plt.ylabel(r'$\alpha_f$', fontsize=20) # Use one of the predefined colormaps or the above defined 'blue_cmap': - im=plt.imshow(dataarray, norm=LogNorm(), vmax=zmax, cmap=cm.jet) #, interpolation='none') + im=plt.imshow(dataarray, norm=LogNorm(), vmax=zmax, cmap=cm.jet) plt.gca().axes.get_xaxis().set_ticks([]) plt.gca().axes.get_yaxis().set_ticks([]) plt.colorbar(im)