From 1efbc8baa0c6ee3d1018454443d37da61b959c9b Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de> Date: Thu, 10 Aug 2023 07:20:39 +0200 Subject: [PATCH] use new c'tor in export_galaxi.py (untested because broken elsewhere) --- rawEx/fit/scatter2d/expfit_galaxi.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/rawEx/fit/scatter2d/expfit_galaxi.py b/rawEx/fit/scatter2d/expfit_galaxi.py index a1291abdb7e..58d2ae91ff1 100755 --- a/rawEx/fit/scatter2d/expfit_galaxi.py +++ b/rawEx/fit/scatter2d/expfit_galaxi.py @@ -90,18 +90,18 @@ def get_sample(P): return sample -def create_detector(): +def create_detector(beam): """ A model of the GALAXY detector """ - u0 = beam_xpos*pilatus_pixel_size # in mm - v0 = beam_ypos*pilatus_pixel_size # in mm - detector = ba.FlatDetector(pilatus_npx, - pilatus_npx*pilatus_pixel_size, - pilatus_npy, - pilatus_npy*pilatus_pixel_size) - detector.setPerpendicularToDirectBeam(detector_distance, u0, v0) - return detector + n = pilatus_npx + s = pilatus_pixel_size + w = n*s + u0 = beam_xpos*s # in mm + v0 = beam_ypos*s # in mm + return ba.FlatDetector( + n, n, w, w, beam, ba.FlatDetector.T, detector_distance, + 0, 0, 0, u0 - w/2, v0 - w/2) def create_simulation(P): @@ -110,7 +110,7 @@ def create_simulation(P): """ beam = ba.Beam(1.2e7, wavelength, alpha_i) sample = get_sample(P) - detector = create_detector() + detector = create_detector(beam) simulation = ba.ScatteringSimulation(beam, sample, detector) simulation.setRegionOfInterest(85, 70, 120, 92.) -- GitLab