Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BOZcalc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SCS
BOZcalc
Commits
db8eb661
Commit
db8eb661
authored
4 years ago
by
Loïc Le Guyader
Browse files
Options
Downloads
Patches
Plain Diff
Fix outer zone width calculation
parent
730e7c6a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
TZPGcalc.py
+9
-5
9 additions, 5 deletions
TZPGcalc.py
with
9 additions
and
5 deletions
TZPGcalc.py
+
9
−
5
View file @
db8eb661
...
...
@@ -17,7 +17,7 @@ from ipywidgets import HBox, VBox, Layout
from
IPython.display
import
display
# zone plate focal length
F
=
250
*
1e-3
# [m]
F
0
=
250
*
1e-3
# [m]
# Z position of the zone plate optic from the first interaction point (sample Z stage at 0 mm)
Z0
=
230
*
1e-3
# [m]
...
...
@@ -25,7 +25,7 @@ Z0 = 230*1e-3 # [m]
# zone plate nominal focal sorthened by the KBS focusing
d
=
3.3
-
Z0
# distance between HFM and TZPG
f1
=
7.3
# HFM focus 2 m behind second interaction point
F
=
F
*
(
d
-
f1
)
/
(
d
-
f1
-
F
)
F
=
F
0
*
(
d
-
f1
)
/
(
d
-
f1
-
F
0
)
KBS_F
=
f1
-
d
# KBS focus distance from TZPG
# number of membrane to show
...
...
@@ -363,14 +363,18 @@ class TZPGcalc():
self
.
d_label
.
value
=
f
'
Grating Pitch:
{
int
(
np
.
round
(
d_nominal
*
1e9
))
}
nm
'
rn
=
TZPGwV
+
TZPGo
dr_nominal
=
wl
*
F
/
(
2
*
r
n
)
dr_nominal
=
wl
*
F
0
/
(
2
*
n
p
.
sqrt
(
rn
**
2
+
(
TZPGwV
/
2
)
**
2
)
)
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
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
),
'
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
),
'
TZPGwH
'
:
TZPGwH
,
'
TZPGwV
'
:
TZPGwV
,
'
TZPGo
'
:
TZPGo
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment