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

repair resolution ex

parent 0a70543e
No related branches found
No related tags found
1 merge request!2088Replace FlatDetector and SphericalDetector by Detector2D
...@@ -30,8 +30,7 @@ if __name__ == '__main__': ...@@ -30,8 +30,7 @@ if __name__ == '__main__':
# Detector # Detector
nx = 142 nx = 142
ny = 200 ny = 200
detector = ba.FlatDetector(nx, ny, 107, 140, beam, ba.FlatDetector.X, detector = ba.Detector2D(nx, -1.5*deg, 1.5*deg, ny, 0, 3*deg)
2000, 0, -140/2)
results = [] results = []
...@@ -41,17 +40,17 @@ if __name__ == '__main__': ...@@ -41,17 +40,17 @@ if __name__ == '__main__':
results.append(result) results.append(result)
detector.setResolutionFunction( detector.setResolutionFunction(
ba.ResolutionFunction2DGaussian(5, 1)) ba.ResolutionFunction2DGaussian(0.2*deg, 0.01*deg))
simulation = ba.ScatteringSimulation(beam, sample, detector) simulation = ba.ScatteringSimulation(beam, sample, detector)
result = simulation.simulate() result = simulation.simulate()
result.setTitle("resolution 5, 1") result.setTitle("resolution 0.2deg, 0.01deg")
results.append(result) results.append(result)
detector.setResolutionFunction( detector.setResolutionFunction(
ba.ResolutionFunction2DGaussian(5, 5)) ba.ResolutionFunction2DGaussian(0.2*deg, 0.2*deg))
simulation = ba.ScatteringSimulation(beam, sample, detector) simulation = ba.ScatteringSimulation(beam, sample, detector)
result = simulation.simulate() result = simulation.simulate()
result.setTitle("resolution 5, 5") result.setTitle("resolution 0.2deg, 0.2deg")
results.append(result) results.append(result)
bp.make_plot_row(results) bp.make_plot_row(results)
......
...@@ -30,8 +30,7 @@ if __name__ == '__main__': ...@@ -30,8 +30,7 @@ if __name__ == '__main__':
# Detector # Detector
nx = 7 nx = 7
ny = 11 ny = 11
detector = ba.FlatDetector(nx, ny, 107, 140, beam, ba.FlatDetector.X, detector = ba.Detector2D(nx, -1.5*deg, 1.5*deg, ny, 0, 3*deg)
2000, 0, -140/2)
results = [] results = []
...@@ -41,17 +40,17 @@ if __name__ == '__main__': ...@@ -41,17 +40,17 @@ if __name__ == '__main__':
results.append(result) results.append(result)
detector.setResolutionFunction( detector.setResolutionFunction(
ba.ResolutionFunction2DGaussian(5, 1)) ba.ResolutionFunction2DGaussian(0.2*deg, 0.01*deg))
simulation = ba.ScatteringSimulation(beam, sample, detector) simulation = ba.ScatteringSimulation(beam, sample, detector)
result = simulation.simulate() result = simulation.simulate()
result.setTitle("resolution 5, 1") result.setTitle("resolution 0.2deg, 0.01deg")
results.append(result) results.append(result)
detector.setResolutionFunction( detector.setResolutionFunction(
ba.ResolutionFunction2DGaussian(5, 5)) ba.ResolutionFunction2DGaussian(0.2*deg, 0.2*deg))
simulation = ba.ScatteringSimulation(beam, sample, detector) simulation = ba.ScatteringSimulation(beam, sample, detector)
result = simulation.simulate() result = simulation.simulate()
result.setTitle("resolution 5, 5") result.setTitle("resolution 0.2deg, 0.2deg")
results.append(result) results.append(result)
bp.make_plot_row(results) bp.make_plot_row(results)
......
...@@ -30,8 +30,7 @@ if __name__ == '__main__': ...@@ -30,8 +30,7 @@ if __name__ == '__main__':
# Detector # Detector
nx = <%= sm ? 7 : 142 %> nx = <%= sm ? 7 : 142 %>
ny = <%= sm ? 11 : 200 %> ny = <%= sm ? 11 : 200 %>
detector = ba.FlatDetector(nx, ny, 107, 140, beam, ba.FlatDetector.X, detector = ba.Detector2D(nx, -1.5*deg, 1.5*deg, ny, 0, 3*deg)
2000, 0, -140/2)
results = [] results = []
...@@ -41,17 +40,17 @@ if __name__ == '__main__': ...@@ -41,17 +40,17 @@ if __name__ == '__main__':
results.append(result) results.append(result)
detector.setResolutionFunction( detector.setResolutionFunction(
ba.ResolutionFunction2DGaussian(5, 1)) ba.ResolutionFunction2DGaussian(0.2*deg, 0.01*deg))
simulation = ba.ScatteringSimulation(beam, sample, detector) simulation = ba.ScatteringSimulation(beam, sample, detector)
result = simulation.simulate() result = simulation.simulate()
result.setTitle("resolution 5, 1") result.setTitle("resolution 0.2deg, 0.01deg")
results.append(result) results.append(result)
detector.setResolutionFunction( detector.setResolutionFunction(
ba.ResolutionFunction2DGaussian(5, 5)) ba.ResolutionFunction2DGaussian(0.2*deg, 0.2*deg))
simulation = ba.ScatteringSimulation(beam, sample, detector) simulation = ba.ScatteringSimulation(beam, sample, detector)
result = simulation.simulate() result = simulation.simulate()
result.setTitle("resolution 5, 5") result.setTitle("resolution 0.2deg, 0.2deg")
results.append(result) results.append(result)
bp.make_plot_row(results) bp.make_plot_row(results)
......
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