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

use new c'tor in export_galaxi.py (untested because broken elsewhere)

parent ee23c2c5
Branches
Tags
1 merge request!1859FlatDetector: long c'tor instead of setter fcts
...@@ -90,18 +90,18 @@ def get_sample(P): ...@@ -90,18 +90,18 @@ def get_sample(P):
return sample return sample
def create_detector(): def create_detector(beam):
""" """
A model of the GALAXY detector A model of the GALAXY detector
""" """
u0 = beam_xpos*pilatus_pixel_size # in mm n = pilatus_npx
v0 = beam_ypos*pilatus_pixel_size # in mm s = pilatus_pixel_size
detector = ba.FlatDetector(pilatus_npx, w = n*s
pilatus_npx*pilatus_pixel_size, u0 = beam_xpos*s # in mm
pilatus_npy, v0 = beam_ypos*s # in mm
pilatus_npy*pilatus_pixel_size) return ba.FlatDetector(
detector.setPerpendicularToDirectBeam(detector_distance, u0, v0) n, n, w, w, beam, ba.FlatDetector.T, detector_distance,
return detector 0, 0, 0, u0 - w/2, v0 - w/2)
def create_simulation(P): def create_simulation(P):
...@@ -110,7 +110,7 @@ def create_simulation(P): ...@@ -110,7 +110,7 @@ def create_simulation(P):
""" """
beam = ba.Beam(1.2e7, wavelength, alpha_i) beam = ba.Beam(1.2e7, wavelength, alpha_i)
sample = get_sample(P) sample = get_sample(P)
detector = create_detector() detector = create_detector(beam)
simulation = ba.ScatteringSimulation(beam, sample, detector) simulation = ba.ScatteringSimulation(beam, sample, detector)
simulation.setRegionOfInterest(85, 70, 120, 92.) simulation.setRegionOfInterest(85, 70, 120, 92.)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment