Skip to content
Snippets Groups Projects

Fix outer zone width calculation

Merged Loïc Le Guyader requested to merge dr into master
1 file
+ 9
5
Compare changes
  • Side-by-side
  • Inline
+ 9
5
@@ -17,7 +17,7 @@ from ipywidgets import HBox, VBox, Layout
@@ -17,7 +17,7 @@ from ipywidgets import HBox, VBox, Layout
from IPython.display import display
from IPython.display import display
# zone plate focal length
# zone plate focal length
F = 250*1e-3 # [m]
F0 = 250*1e-3 # [m]
# Z position of the zone plate optic from the first interaction point (sample Z stage at 0 mm)
# Z position of the zone plate optic from the first interaction point (sample Z stage at 0 mm)
Z0 = 230*1e-3 # [m]
Z0 = 230*1e-3 # [m]
@@ -25,7 +25,7 @@ Z0 = 230*1e-3 # [m]
@@ -25,7 +25,7 @@ Z0 = 230*1e-3 # [m]
# zone plate nominal focal sorthened by the KBS focusing
# zone plate nominal focal sorthened by the KBS focusing
d = 3.3 - Z0 # distance between HFM and TZPG
d = 3.3 - Z0 # distance between HFM and TZPG
f1 = 7.3 # HFM focus 2 m behind second interaction point
f1 = 7.3 # HFM focus 2 m behind second interaction point
F = F*(d-f1)/(d-f1-F)
F = F0*(d-f1)/(d-f1-F0)
KBS_F = f1 - d # KBS focus distance from TZPG
KBS_F = f1 - d # KBS focus distance from TZPG
# number of membrane to show
# number of membrane to show
@@ -363,14 +363,18 @@ class TZPGcalc():
@@ -363,14 +363,18 @@ class TZPGcalc():
self.d_label.value = f'Grating Pitch:{int(np.round(d_nominal*1e9))} nm'
self.d_label.value = f'Grating Pitch:{int(np.round(d_nominal*1e9))} nm'
rn = TZPGwV + TZPGo
rn = TZPGwV + TZPGo
dr_nominal = wl * F / (2*rn)
dr_nominal = wl * F0 / (2*np.sqrt(rn**2 + (TZPGwV/2)**2))
self.dr_label.value = f'Outer Zone Plate width dr:{int(np.round(dr_nominal*1e9))} nm'
self.dr_label.value = f'Outer Zone Plate width dr:{int(np.round(dr_nominal*1e9))} nm'
# configuration for the low energy and high energy photon
# configuration for the low energy and high energy photon
confL = {'F':(2*rn)*dr_nominal/wlL,
F0_temp = (2*np.sqrt(rn**2 + (TZPGwV/2)**2))*dr_nominal/wlL
 
F_temp = F0_temp*(d-f1)/(d-f1-F0_temp)
 
confL = {'F':F_temp,
'theta_grating':np.arcsin(wlL/d_nominal),
'theta_grating':np.arcsin(wlL/d_nominal),
'TZPGwH':TZPGwH, 'TZPGwV':TZPGwV, 'TZPGo':TZPGo}
'TZPGwH':TZPGwH, 'TZPGwV':TZPGwV, 'TZPGo':TZPGo}
confH = {'F':(2*rn)*dr_nominal/wlH,
F0_temp = (2*np.sqrt(rn**2 + (TZPGwV/2)**2))*dr_nominal/wlH
 
F_temp = F0_temp*(d-f1)/(d-f1-F0_temp)
 
confH = {'F':F_temp,
'theta_grating':np.arcsin(wlH/d_nominal),
'theta_grating':np.arcsin(wlH/d_nominal),
'TZPGwH':TZPGwH, 'TZPGwV':TZPGwV, 'TZPGo':TZPGo}
'TZPGwH':TZPGwH, 'TZPGwV':TZPGwV, 'TZPGo':TZPGo}
Loading