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

corr Py line lengths

parent 8e5860b8
No related branches found
No related tags found
No related merge requests found
......@@ -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()
......
......@@ -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)
......
#!/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
......
......@@ -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)
......
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