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
No related branches found
No related tags found
1 merge request!1859FlatDetector: long c'tor instead of setter fcts
......@@ -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.)
......
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