Commit d7ead232 authored by Tristan Renon's avatar Tristan Renon
Browse files

Add HEI logo + text in box

parent 9fda9d9b
Management/Pictures/UI.gif

239 KB | W: | H:

Management/Pictures/UI.gif

1.22 MB | W: | H:

Management/Pictures/UI.gif
Management/Pictures/UI.gif
Management/Pictures/UI.gif
Management/Pictures/UI.gif
  • 2-up
  • Swipe
  • Onion skin
......@@ -26,7 +26,7 @@ def generateSin(n=3, phaseShiftReg=None, phaseAmplitude=None, phaseShiftMec=None
return tuple(ret), n, phaseShiftReg, phaseAmplitude, phaseShiftMec, xSin
def generateSin3(n=3, phaseShiftReg=None, phaseAmplitude=None, phaseShiftReg3=None, phaseAmplitude3=None, phaseShiftMec=None, nSamples=100):
def generateSin3(n=3, phaseShiftReg=None, phaseAmplitude=None, phaseShiftReg3=None, phaseAmplitude3=None, phaseShiftMec=None, nSamples=50):
# Generate things if user did not tell about them
if nSamples is None:
nSamples = 50
......@@ -85,7 +85,7 @@ def generateSquare(n=3, phaseShiftReg=None, phaseAmplitude=None, phaseShiftMec=N
return tuple(ret), n, phaseShiftReg, phaseAmplitude, phaseShiftMec, xSin
def generateSinPWM(n=3, phaseShiftReg=None, phaseAmplitude=None, phaseShiftMec=None, nSamples=100):
def generateSinPWM(n=3, phaseShiftReg=None, phaseAmplitude=None, phaseShiftMec=None, nSamples=50):
# Generate things if user did not tell about them
if nSamples is None:
nSamples = 50
......@@ -113,7 +113,7 @@ def generateSinPWM(n=3, phaseShiftReg=None, phaseAmplitude=None, phaseShiftMec=N
return tuple(ret), n, phaseShiftReg, phaseAmplitude, phaseShiftMec, xSin
def generateTriangle(n=3, phaseShiftReg=None, phaseAmplitude=None, phaseShiftMec=None, nSamples=100):
def generateTriangle(n=3, phaseShiftReg=None, phaseAmplitude=None, phaseShiftMec=None, nSamples=50):
# Generate things if user did not tell about them
if nSamples is None:
nSamples = 50
......@@ -137,7 +137,7 @@ def generateTriangle(n=3, phaseShiftReg=None, phaseAmplitude=None, phaseShiftMec
return tuple(ret), n, phaseShiftReg, phaseAmplitude, phaseShiftMec, xSin
def generateTrapeze(n=3, phaseShiftReg=None, phaseAmplitude=None, phaseShiftMec=None, nSamples=100):
def generateTrapeze(n=3, phaseShiftReg=None, phaseAmplitude=None, phaseShiftMec=None, nSamples=50):
# Generate things if user did not tell about them
if nSamples is None:
nSamples = 50
......@@ -173,6 +173,7 @@ def trapeze(dataX=None, thetaZ=None, thetaOmega=None, nSamples=50):
thetaOmega=thetaZ
trapeze = list()
for i in range(len(dataX)):
if dataX[i] <= dataX[-1]/2:
if dataX[i] <= thetaZ:
......
......@@ -9,9 +9,6 @@ import matplotlib.patches as mpatches
from tkinter import Frame, Label, Entry, Button
import generateSinLib as gsl
class Window(Frame):
def __init__(self, master=None):
Frame.__init__(self, master)
......@@ -321,17 +318,22 @@ class Window(Frame):
self.buttonClear.bind(lambda e: self.Clear)
tk.Label(self, text="Phasers Animation").grid(row=17, column=0)
tk.Label(self, text="HES-SO // Valais-Wallis").place(x=0, y=0)
tk.Label(self, text="Power & Drive").place(x=0, y=15)
tk.Label(self, text="Visualisation Tool V1.0").place(x=0, y=30)
tk.Label(self, text="Chevailler Samuel").place(x=0, y=60)
tk.Label(self, text="Renon Tristan").place(x=0, y=75)
tk.Label(self, text="HES-SO // Valais-Wallis").place(x=0, y=80)
tk.Label(self, text="Power & Drive").place(x=0, y=95)
tk.Label(self, text="Visualisation Tool V1.1").place(x=0, y=110)
tk.Label(self, text="Chevailler Samuel").place(x=0, y=140)
tk.Label(self, text="Renon Tristan").place(x=0, y=155)
canvas = tk.Canvas(root, width=300, height=80)
canvas.place(x=0, y=0)
self.img = tk.PhotoImage(file="logoHEI.ppm")
canvas.create_image(1, 1, anchor=tk.NW, image=self.img)
self.fig, (self.ax1, self.ax2, self.ax3) = plt.subplots(1, 3, figsize=(13, 4))
# Dictionary to create multiple buttons
self.radioVals = ['0', '1', '2', '3', '4', '5']
self.radioString = ['Sinus', 'Rectangle', 'Triangle', 'Trapezoidal', 'Sinus h3', 'Sinus PWM']
self.radioString = ['Sinus', 'Rectangle', 'Triangle', 'Trapezoidal', 'Sinus with harmonic 3', 'Sinus PWM']
self.radioValue = tk.IntVar()
for i in range(len(self.radioVals)):
......@@ -417,7 +419,7 @@ class Window(Frame):
self.canvas = FigureCanvasTkAgg(self.fig, master=self)
self.canvas.get_tk_widget().grid(row=18, column=0)
self.ani = animation.FuncAnimation(self.fig, self.animate, interval=1, frames=self.inputnSamples, blit=False, save_count=self.inputnSamples)
self.ani = animation.FuncAnimation(self.fig, self.animate, interval=1, frames=self.inputnSamples, blit=False)
root = tk.Tk()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment