-
Notifications
You must be signed in to change notification settings - Fork 5
/
mi.setDirectBeamROI
30 lines (30 loc) · 3.46 KB
/
mi.setDirectBeamROI
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
[0;31mSignature:[0m [0malignement_gisaxs[0m[0;34m([0m[0mangle[0m[0;34m=[0m[0;36m0.15[0m[0;34m)[0m[0;34m[0m[0;34m[0m[0m
[0;31mDocstring:[0m <no docstring>
[0;31mSource:[0m
[0;32mdef[0m [0malignement_gisaxs[0m[0;34m([0m[0mangle[0m[0;34m=[0m[0;36m0.15[0m[0;34m)[0m[0;34m:[0m [0;34m[0m
[0;34m[0m [0msample_id[0m[0;34m([0m[0muser_name[0m[0;34m=[0m[0;34m'test'[0m[0;34m,[0m [0msample_name[0m[0;34m=[0m[0;34m'test'[0m[0;34m)[0m[0;34m[0m
[0;34m[0m [0mdet_exposure_time[0m[0;34m([0m[0;36m0.3[0m[0;34m,[0m [0;36m0.3[0m[0;34m)[0m [0;34m[0m
[0;34m[0m [0msmi[0m [0;34m=[0m [0mSMI_Beamline[0m[0;34m([0m[0;34m)[0m[0;34m[0m
[0;34m[0m [0;32myield[0m [0;32mfrom[0m [0msmi[0m[0;34m.[0m[0mmodeAlignment[0m[0;34m([0m[0mtechnique[0m[0;34m=[0m[0;34m'gisaxs'[0m[0;34m)[0m [0;34m[0m
[0;34m[0m [0;31m# Set direct beam ROI[0m[0;34m[0m
[0;34m[0m [0;32myield[0m [0;32mfrom[0m [0msmi[0m[0;34m.[0m[0msetDirectBeamROI[0m[0;34m([0m[0;34m)[0m[0;34m[0m
[0;34m[0m [0;31m# Scan theta and height[0m[0;34m[0m
[0;34m[0m [0;32myield[0m [0;32mfrom[0m [0malign_gisaxs_height[0m[0;34m([0m[0;36m500[0m[0;34m,[0m [0;36m21[0m[0;34m,[0m [0mder[0m[0;34m=[0m[0;32mTrue[0m[0;34m)[0m[0;34m[0m
[0;34m[0m [0;32myield[0m [0;32mfrom[0m [0malign_gisaxs_th[0m[0;34m([0m[0;36m1.5[0m[0;34m,[0m [0;36m27[0m[0;34m)[0m[0;34m[0m
[0;34m[0m [0;31m#yield from align_gisaxs_height(300, 11, der=True)[0m[0;34m[0m
[0;34m[0m [0;31m#yield from align_gisaxs_th(0.5, 16) [0m[0;34m[0m
[0;34m[0m [0;31m# move to theta 0 + value[0m[0;34m[0m
[0;34m[0m [0;32myield[0m [0;32mfrom[0m [0mbps[0m[0;34m.[0m[0mmv[0m[0;34m([0m[0mpiezo[0m[0;34m.[0m[0mth[0m[0;34m,[0m [0mps[0m[0;34m.[0m[0mpeak[0m [0;34m+[0m [0mangle[0m[0;34m)[0m[0;34m[0m
[0;34m[0m [0;31m# Set reflected ROI[0m[0;34m[0m
[0;34m[0m [0;32myield[0m [0;32mfrom[0m [0msmi[0m[0;34m.[0m[0msetReflectedBeamROI[0m[0;34m([0m[0mtotal_angle[0m[0;34m=[0m[0mangle[0m[0;34m,[0m [0mtechnique[0m[0;34m=[0m[0;34m'gisaxs'[0m[0;34m)[0m [0;34m[0m
[0;34m[0m [0;31m# Scan theta and height[0m[0;34m[0m
[0;34m[0m [0;32myield[0m [0;32mfrom[0m [0malign_gisaxs_th[0m[0;34m([0m[0;36m0.2[0m[0;34m,[0m [0;36m31[0m[0;34m)[0m[0;34m[0m
[0;34m[0m [0;32myield[0m [0;32mfrom[0m [0malign_gisaxs_height[0m[0;34m([0m[0;36m150[0m[0;34m,[0m [0;36m21[0m[0;34m)[0m[0;34m[0m
[0;34m[0m [0;32myield[0m [0;32mfrom[0m [0malign_gisaxs_th[0m[0;34m([0m[0;36m0.025[0m[0;34m,[0m [0;36m21[0m[0;34m)[0m [0;34m[0m
[0;34m[0m [0;31m# Close all the matplotlib windows[0m[0;34m[0m
[0;34m[0m [0mplt[0m[0;34m.[0m[0mclose[0m[0;34m([0m[0;34m'all'[0m[0;34m)[0m [0;34m[0m
[0;34m[0m [0;31m# Return angle[0m[0;34m[0m
[0;34m[0m [0;32myield[0m [0;32mfrom[0m [0mbps[0m[0;34m.[0m[0mmv[0m[0;34m([0m[0mpiezo[0m[0;34m.[0m[0mth[0m[0;34m,[0m [0mps[0m[0;34m.[0m[0mcen[0m [0;34m-[0m [0mangle[0m[0;34m)[0m[0;34m[0m
[0;34m[0m [0;32myield[0m [0;32mfrom[0m [0msmi[0m[0;34m.[0m[0mmodeMeasurement[0m[0;34m([0m[0;34m)[0m[0;34m[0m[0;34m[0m[0m
[0;31mFile:[0m /nsls2/data1/smi/shared/config/bluesky/profile_collection/startup/users/YZhang_SMI_Base.py
[0;31mType:[0m function