Skip to content

Commit 76436f8

Browse files
committed
Added phase base entry, and moved activate button for further work on #79
1 parent e5eb831 commit 76436f8

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

BNC.py

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,7 @@ def send_command(self, command, waiting_time=0.1):
233233
STATE, WIDTH, DELAY, SYNC, POL, AMP, MODE, BC, PC, OC, WC, GATE =\
234234
tuple(COMMAND_DICT)
235235

236-
LABEL, dPHASE = "LABEL", "dPHASE"
237-
236+
LABEL, dPHASE, PHASE_BASE = "LABEL", "dPHASE", "PHASE_BASE"
238237

239238
class Pulse():
240239
"""Useful class to manage BNC's channels."""
@@ -412,15 +411,15 @@ def drawSimple(self, master):
412411
textvariable=self.experimentTuple[LABEL]).grid(row=0,
413412
column=0)
414413

415-
tk.Label(master_frame, text="Activate : ").grid(row=1, column=0,
416-
sticky=tk.W)
414+
# tk.Label(master_frame, text="Activate : ").grid(row=1, column=0,
415+
# sticky=tk.W)
417416
if self.experimentTuple[STATE] is None:
418417
self.experimentTuple[STATE] = tk.StringVar()
419418
self.experimentTuple[STATE].set(int(self[STATE]))
420419
tk.Checkbutton(master_frame,
421-
variable=self.experimentTuple[STATE]).grid(row=1,
420+
variable=self.experimentTuple[STATE]).grid(row=0,
422421
column=1,
423-
sticky=tk.W)
422+
sticky=tk.E)
424423

425424
tk.Label(master_frame, text="Width (in s) : ").grid(row=2, column=0,
426425
sticky=tk.W)
@@ -453,6 +452,21 @@ def drawSimple(self, master):
453452
column=1,
454453
sticky=tk.W)
455454

455+
tk.Label(master_frame,
456+
text="Phase Variation (in s) : ").grid(row=4, column=0,
457+
sticky=tk.W)
458+
if self.experimentTuple[PHASE_BASE] is None:
459+
self.experimentTuple[PHASE_BASE] = tk.StringVar()
460+
self.experimentTuple[PHASE_BASE].set("0")
461+
tk.Entry(
462+
master_frame,
463+
textvariable=self.experimentTuple[PHASE_BASE]
464+
).grid(
465+
row=5,
466+
column=1,
467+
sticky=tk.W
468+
)
469+
456470
return master_frame
457471

458472
# Loading and saving

0 commit comments

Comments
 (0)