-
Notifications
You must be signed in to change notification settings - Fork 1
/
Example2.py
67 lines (47 loc) · 1.68 KB
/
Example2.py
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#from DrawLevels import Scheme, Level, Transition
import DrawLevels as DL
# Set up level scheme ================================
# Scheme( GraphWidth , PixelDensity , NucleiName)
bing = DL.Scheme(1800, 1, "60Ni")
bing.SetFontSize(60)
bing.SetTitleFontSize(80)
# If only branches - no main levels
bing.BranchNo = 0
# Add Ground Level ===================================
L3 = DL.Level(0, [0,0,0], 10)
# Add branch =========================================
# Branch( OffsetXPos )
B0 = DL.Branch( 0 )
# Add levels and transitions to branch ===============
L1 = DL.Level((1173 + 1332), [0,0,0], 10)
B0.AddLevel(L1)
L2 = DL.Level(1332, [0,0,0], 10)
B0.AddLevel(L2)
T1 = DL.Transition((1173+1332), 1332, [0,0,1], 15, "1173 keV")
B0.AddTransition(T1)
T2 = DL.Transition(1332, 0, [1,0,0], 15, "1332 keV")
B0.AddTransition(T2)
# Add Branch to ground level =========================
L3.AddBranch(B0)
# Add branch =========================================
# Branch( OffsetXPos )
B1 = DL.Branch( 40 )
# Add levels and transitions to branch ===============
L4 = DL.Level(1000, [0,0,0], 10)
B1.AddLevel(L4)
L5 = DL.Level(1184, [0,0,0], 10)
B1.AddLevel(L5)
L6 = DL.Level(785, [0,0,0], 10)
B1.AddLevel(L6)
T4 = DL.Transition(1184, 0, [0,1,0], 15, "1184 keV")
B1.AddTransition(T4)
T5 = DL.Transition(1000, 785, [0,1,0], 15, "215 keV")
B1.AddTransition(T5)
T5 = DL.Transition(785, 0, [0,1,0], 20, "785 keV")
B1.AddTransition(T5)
# ===================================================
# Add Branch to ground level =========================
L3.AddBranch(B1)
bing.AddLevel(L3) # and level to the scheme (after adding branch)
# Draw Picture =======================================
bing.Draw("ExampleLevelScheme_2.png")