Commit 4898fc00 authored by Matheus Müller's avatar Matheus Müller

PTE completa, propriedades dos elementos em Ewindow, gráfico da amostra em pontos

parent 6658267c
from numpy import *
SLOT = dict(e0 = dict(name = "New", symbol = "Hf", mass = 178.00, Z = 72., dist = [0.]*60 + [1./3.]*400 + [0.]*3600, control = 1),
e1 = dict(name = "New", symbol = "O", mass = 16.00, Z = 8., dist = [0.]*60 + [2./3.]*400 + [0.]*3600, control = 1),
e2 = dict(name = "New", symbol = "Si", mass = 28.00, Z = 14., dist = [0.]*460 + [1.]*3600, control = 1))
import Tkinter as tk
from Edict import *
from PTE import *
from Eprop import *
def elemw(elewindow, window):
####################################################
# Button building on received frame
co1 = lambda: PTable(SLOT['ELEa'], bu1)
co1a = lambda: atomsubmenu(SLOT['ELEa'], bu1, window)
bu1 = tk.Menubutton(elewindow, text=SLOT['ELEa']['symbol'], width=3, height=1, relief='raised')
m1 = tk.Menu(bu1)
bu1.config(menu=m1)
m1.add_command(label='Choose by PTE', command=co1)
m1.add_command(label='Properties', command=co1a)
co2 = lambda: PTable(SLOT['ELEb'], bu2)
co2a = lambda: atomsubmenu(SLOT['ELEb'], bu2)
bu2 = tk.Menubutton(elewindow, text=SLOT['ELEb']['symbol'], width=3, height=1, relief='raised')
m2 = tk.Menu(bu2)
bu2.config(menu=m2)
m2.add_command(label='Choose by PTE', command=co2)
m2.add_command(label='Properties', command=co2a)
co3 = lambda: PTable(SLOT['ELEc'], bu3)
co3a = lambda: atomsubmenu(SLOT['ELEc'], bu3)
bu3 = tk.Menubutton(elewindow, text=SLOT['ELEc']['symbol'], width=3, height=1, relief='raised')
m3 = tk.Menu(bu3)
bu3.config(menu=m3)
m3.add_command(label='Choose by PTE', command=co3)
m3.add_command(label='Properties', command=co3a)
co4 = lambda: PTable(SLOT['ELEd'], bu4)
co4a = lambda: atomsubmenu(SLOT['ELEd'], bu4)
bu4 = tk.Menubutton(elewindow, text=SLOT['ELEd']['symbol'], width=3, height=1, relief='raised')
m4 = tk.Menu(bu4)
bu4.config(menu=m4)
m4.add_command(label='Choose by PTE', command=co4)
m4.add_command(label='Properties', command=co4a)
co5 = lambda: PTable(SLOT['ELEe'], bu5)
co5a = lambda: atomsubmenu(SLOT['ELEe'], bu5)
bu5 = tk.Menubutton(elewindow, text=SLOT['ELEe']['symbol'], width=3, height=1, relief='raised')
m5 = tk.Menu(bu5)
bu5.config(menu=m5)
m5.add_command(label='Choose by PTE', command=co5)
m5.add_command(label='Properties', command=co5a)
co6 = lambda: PTable(SLOT['ELEf'], bu6)
co6a = lambda: atomsubmenu(SLOT['ELEf'], bu6)
bu6 = tk.Menubutton(elewindow, text=SLOT['ELEf']['symbol'], width=3, height=1, relief='raised')
m6 = tk.Menu(bu6)
bu6.config(menu=m6)
m6.add_command(label='Choose by PTE', command=co6)
m6.add_command(label='Properties', command=co6a)
co7 = lambda: PTable(SLOT['ELEg'], bu7)
co7a = lambda: atomsubmenu(SLOT['ELEg'], bu7)
bu7 = tk.Menubutton(elewindow, text=SLOT['ELEg']['symbol'], width=3, height=1, relief='raised')
m7 = tk.Menu(bu7)
bu7.config(menu=m7)
m7.add_command(label='Choose by PTE', command=co7)
m7.add_command(label='Properties', command=co7a)
co8 = lambda: PTable(SLOT['ELEh'], bu8)
co8a = lambda: atomsubmenu(SLOT['ELEh'], bu8)
bu8 = tk.Menubutton(elewindow, text=SLOT['ELEh']['symbol'], width=3, height=1, relief='raised')
m8 = tk.Menu(bu8)
bu8.config(menu=m8)
m8.add_command(label='Choose by PTE', command=co8)
m8.add_command(label='Properties', command=co8a)
co9 = lambda: PTable(SLOT['ELEi'], bu9)
co9a = lambda: atomsubmenu(SLOT['ELEi'], bu9)
bu9 = tk.Menubutton(elewindow, text=SLOT['ELEi']['symbol'], width=3, height=1, relief='raised')
m9 = tk.Menu(bu9)
bu9.config(menu=m9)
m9.add_command(label='Choose by PTE', command=co9)
m9.add_command(label='Properties', command=co9a)
co10 = lambda: PTable(SLOT['ELEj'], bu10)
co10a = lambda: atomsubmenu(SLOT['ELEj'], bu10)
bu10= tk.Menubutton(elewindow, text=SLOT['ELEj']['symbol'], width=3, height=1, relief='raised')
m10 = tk.Menu(bu10)
bu10.config(menu=m10)
m10.add_command(label='Choose by PTE', command=co10)
m10.add_command(label='Properties', command=co10a)
co11 = lambda: PTable(SLOT['ELEk'], bu11)
co11a = lambda: atomsubmenu(SLOT['ELEk'], bu11)
bu11 = tk.Menubutton(elewindow, text=SLOT['ELEk']['symbol'], width=3, height=1, relief='raised')
m11 = tk.Menu(bu11)
bu11.config(menu=m11)
m11.add_command(label='Choose by PTE', command=co11)
m11.add_command(label='Properties', command=co11a)
co12 = lambda: PTable(SLOT['ELEl'], bu12)
co12a = lambda: atomsubmenu(SLOT['ELEl'], bu12)
bu12 = tk.Menubutton(elewindow, text=SLOT['ELEl']['symbol'], width=3, height=1, relief='raised')
m12 = tk.Menu(bu12)
bu12.config(menu=m12)
m12.add_command(label='Choose by PTE', command=co12)
m12.add_command(label='Properties', command=co12a)
co13 = lambda: PTable(SLOT['ELEm'], bu13)
co13a = lambda: atomsubmenu(SLOT['ELEm'], bu13)
bu13 = tk.Menubutton(elewindow, text=SLOT['ELEm']['symbol'], width=3, height=1, relief='raised')
m13 = tk.Menu(bu13)
bu13.config(menu=m13)
m13.add_command(label='Choose by PTE', command=co13)
m13.add_command(label='Properties', command=co13a)
co14 = lambda: PTable(SLOT['ELEn'], bu14)
co14a = lambda: atomsubmenu(SLOT['ELEn'], bu14)
bu14 = tk.Menubutton(elewindow, text=SLOT['ELEn']['symbol'], width=3, height=1, relief='raised')
m14 = tk.Menu(bu14)
bu14.config(menu=m14)
m14.add_command(label='Choose by PTE', command=co14)
m14.add_command(label='Properties', command=co14a)
co15 = lambda: PTable(SLOT['ELEo'], bu15)
co15a = lambda: atomsubmenu(SLOT['ELEo'], bu15)
bu15 = tk.Menubutton(elewindow, text=SLOT['ELEo']['symbol'], width=3, height=1, relief='raised')
m15 = tk.Menu(bu15)
bu15.config(menu=m15)
m15.add_command(label='Choose by PTE', command=co15)
m15.add_command(label='Properties', command=co15a)
####################################################
bu1.grid(row=0, column=0, padx=1, pady=1)
bu2.grid(row=0, column=1, padx=1, pady=1)
bu3.grid(row=0, column=2, padx=1, pady=1)
bu4.grid(row=0, column=3, padx=1, pady=1)
bu5.grid(row=0, column=4, padx=1, pady=1)
bu6.grid(row=1, column=0, padx=1, pady=1)
bu7.grid(row=1, column=1, padx=1, pady=1)
bu8.grid(row=1, column=2, padx=1, pady=1)
bu9.grid(row=1, column=3, padx=1, pady=1)
bu10.grid(row=1, column=4, padx=1, pady=1)
bu11.grid(row=2, column=0, padx=1, pady=1)
bu12.grid(row=2, column=1, padx=1, pady=1)
bu13.grid(row=2, column=2, padx=1, pady=1)
bu14.grid(row=2, column=3, padx=1, pady=1)
bu15.grid(row=2, column=4, padx=1, pady=1)
####################################################
from numpy import *
H = dict(name = "Hydrogen", mass = 1.0079, Z = 1, dist = zeros((50000), float), control = 0)
He = dict(name = "Helium", mass = 4.0026, Z = 2, dist = zeros((50000), float), control = 0)
Li = dict(name = "Lithium", mass = 6.941, Z = 3, dist = zeros((50000), float), control = 0)
Be = dict(name = "Beryllium", mass = 9.0122, Z = 4, dist = zeros((50000), float), control = 0)
B = dict(name = "Boron", mass = 10.811, Z = 5, dist = zeros((50000), float), control = 0)
C = dict(name = "Carbon", mass = 12.011, Z = 6, dist = zeros((50000), float), control = 0)
N = dict(name = "Nitrogen", mass = 14.007, Z = 7, dist = zeros((50000), float), control = 0)
O = dict(name = "Oxygen", mass = 15.999, Z = 8, dist = zeros((50000), float), control = 0)
F = dict(name = "Fluorine", mass = 18.998, Z = 9, dist = zeros((50000), float), control = 0)
Ne = dict(name = "Neon", mass = 20.180, Z = 10, dist = zeros((50000), float), control = 0)
Na = dict(name = "Sodium", mass = 22.990, Z = 11, dist = zeros((50000), float), control = 0)
Mg = dict(name = "Magnesium", mass = 24.305, Z = 12, dist = zeros((50000), float), control = 0)
Al = dict(name = "Aluminium", mass = 26.982, Z = 13, dist = zeros((50000), float), control = 0)
Si = dict(name = "Silicon", mass = 28.086, Z = 14, dist = zeros((50000), float), control = 0)
P = dict(name = "Phosphorus", mass = 30.974, Z = 15, dist = zeros((50000), float), control = 0)
S = dict(name = "Sulfur", mass = 32.066, Z = 16, dist = zeros((50000), float), control = 0)
Cl = dict(name = "Chlorine", mass = 35.453, Z = 17, dist = zeros((50000), float), control = 0)
Ar = dict(name = "Argon", mass = 39.948, Z = 18, dist = zeros((50000), float), control = 0)
K = dict(name = "Potassium", mass = 39.098, Z = 19, dist = zeros((50000), float), control = 0)
Ca = dict(name = "Calcium", mass = 40.078, Z = 20, dist = zeros((50000), float), control = 0)
Sc = dict(name = "Scandium", mass = 44.956, Z = 21, dist = zeros((50000), float), control = 0)
Ti = dict(name = "Titanium", mass = 47.867, Z = 22, dist = zeros((50000), float), control = 0)
V = dict(name = "Vanadium", mass = 50.942, Z = 23, dist = zeros((50000), float), control = 0)
Cr = dict(name = "Chromium", mass = 51.996, Z = 24, dist = zeros((50000), float), control = 0)
Mn = dict(name = "Manganese", mass = 54.938, Z = 25, dist = zeros((50000), float), control = 0)
Fe = dict(name = "Iron", mass = 55.845, Z = 26, dist = zeros((50000), float), control = 0)
Co = dict(name = "Cobalt", mass = 58.993, Z = 27, dist = zeros((50000), float), control = 0)
Ni = dict(name = "Nickel", mass = 58.693, Z = 28, dist = zeros((50000), float), control = 0)
Cu = dict(name = "Copper", mass = 63.546, Z = 29, dist = zeros((50000), float), control = 0)
Zn = dict(name = "Zinc", mass = 65.39, Z = 30, dist = zeros((50000), float), control = 0)
Ga = dict(name = "Gallium", mass = 69.723, Z = 31, dist = zeros((50000), float), control = 0)
Ge = dict(name = "Germanium", mass = 72.61, Z = 32, dist = zeros((50000), float), control = 0)
As = dict(name = "Arsenic", mass = 74.922, Z = 33, dist = zeros((50000), float), control = 0)
Se = dict(name = "Selenium", mass = 78.96, Z = 34, dist = zeros((50000), float), control = 0)
Br = dict(name = "Bromine", mass = 79.904, Z = 35, dist = zeros((50000), float), control = 0)
Kr = dict(name = "Krypton", mass = 83.80, Z = 36, dist = zeros((50000), float), control = 0)
Rb = dict(name = "Rubidium", mass = 85.468, Z = 37, dist = zeros((50000), float), control = 0)
Sr = dict(name = "Strontium", mass = 87.62, Z = 38, dist = zeros((50000), float), control = 0)
Y = dict(name = "Yttrium", mass = 88.906, Z = 39, dist = zeros((50000), float), control = 0)
Zr = dict(name = "Zirconium", mass = 91.224, Z = 40, dist = zeros((50000), float), control = 0)
Nb = dict(name = "Niobium", mass = 92.906, Z = 41, dist = zeros((50000), float), control = 0)
Mo = dict(name = "Molibdenium", mass = 95.94, Z = 42, dist = zeros((50000), float), control = 0)
Tc = dict(name = "Technetium", mass = 98.906, Z = 43, dist = zeros((50000), float), control = 0)
Ru = dict(name = "Ruthenium", mass = 101.07, Z = 44, dist = zeros((50000), float), control = 0)
Rh = dict(name = "Rhodium", mass = 102.91, Z = 45, dist = zeros((50000), float), control = 0)
Pd = dict(name = "Palladium", mass = 106.42, Z = 46, dist = zeros((50000), float), control = 0)
Ag = dict(name = "Silver", mass = 107.87, Z = 47, dist = zeros((50000), float), control = 0)
Cd = dict(name = "Cadmium", mass = 112.41, Z = 48, dist = zeros((50000), float), control = 0)
In = dict(name = "Indium", mass = 114.82, Z = 49, dist = zeros((50000), float), control = 0)
Sn = dict(name = "Tin", mass = 118.71, Z = 50, dist = zeros((50000), float), control = 0)
Sb = dict(name = "Antimony", mass = 121.76, Z = 51, dist = zeros((50000), float), control = 0)
Te = dict(name = "Tellurium", mass = 127.60, Z = 52, dist = zeros((50000), float), control = 0)
I = dict(name = "Iodine", mass = 126.90, Z = 53, dist = zeros((50000), float), control = 0)
Xe = dict(name = "Xenon", mass = 131.29, Z = 54, dist = zeros((50000), float), control = 0)
Cs = dict(name = "Caesium", mass = 132.91, Z = 55, dist = zeros((50000), float), control = 0)
Ba = dict(name = "Barium", mass = 137.33, Z = 56, dist = zeros((50000), float), control = 0)
import Tkinter as tk
from Edict import *
from pylab import *
xsum=0.
xdep=0.
def atomsubmenu(elem, but):
sub = tk.Tk()
sub.title(elem['name'])
propbutton = tk.Menubutton(sub, width=20, text='Edit properties')
edit = tk.Menu(propbutton)
propbutton.config(menu=edit)
distbutton = tk.Menubutton(sub, width=20, text='Edit distribution')
editdist = tk.Menu(distbutton)
distbutton.config(menu=editdist)
def cmdadd():
if elem['control']==0:
elem['control']=1
but['text'] = elem['symbol']
but['relief'] = 'sunken'
addremove['text']='Remove element'
else:
elem['control']=0
but['relief'] = 'raised'
addremove['text']='Add element'
addremove = tk.Button(sub, width=16, bg='white', command=cmdadd, relief='raised', bd=4)
if elem['control']==0:
addremove['text']='Add element'
else:
addremove['text']='Remove element'
addremove.pack(side='bottom')
L1 = tk.Label(sub, text = 'Mass - %f' %elem['mass'])
L1.pack()
L2 = tk.Label(sub, text = 'Z - %d' %elem['Z'])
L2.pack()
L3 = tk.Label(sub, text = 'Symbol - %s' %elem['symbol'])
L3.pack()
def cmdmass():
submass = tk.Tk()
submass.title('%s - Mass' %elem['name'])
def modmass():
elem['mass'] = float(E1.get())
submass.destroy()
L1.configure(text = 'Mass - %f' %elem['mass'])
E1 = tk.Entry(submass, bd =2, width=20)
E1.pack()
B1 = tk.Button(submass, text ='Modify', command=modmass, width=18)
B1.pack()
E1.focus_force()
F1 = tk.Frame(submass, width=300)
F1.pack()
submass.mainloop()
def cmdz():
subz = tk.Tk()
subz.title('%s - Z' %elem['name'])
def modz():
elem['Z'] = int(E2.get(), 10)
subz.destroy()
L2.configure(text = 'Z - %d' %elem['Z'])
E2 = tk.Entry(subz, bd =2, width=20)
E2.pack()
B2 = tk.Button(subz, text ='Modify', command=modz, width=18)
B2.pack()
E2.focus_force()
subz.mainloop()
def cmdname():
subname = tk.Tk()
subname.title('%s - Name' %elem['name'])
def modname():
elem['name'] = E3.get()
subname.destroy()
sub.title(elem['name'])
E3 = tk.Entry(subname, bd =2, width=20)
E3.pack()
B3 = tk.Button(subname, text ='Modify', command=modname, width=18)
B3.pack()
E3.focus_force()
subname.mainloop()
def cmdsymbol():
subsymbol = tk.Tk()
subsymbol.title('Symbol - %s' %elem['symbol'])
def modsymbol():
elem['symbol'] = E4.get()
subsymbol.destroy()
L3.configure(text = 'Symbol - %s' %elem['symbol'])
but['text'] = elem['symbol']
E4 = tk.Entry(subsymbol, bd =2, width=20)
E4.pack()
B4 = tk.Button(subsymbol, text ='Modify', command=modsymbol, width=18)
B4.pack()
E4.focus_force()
subsymbol.mainloop()
def cmddraw():
print elem['mass']
def cmdnume():
global xsum
xsum = 0
subnume = tk.Tk()
subnume.title('%s - Distribution' %elem['name'])
subnume.minsize(295,95)
subnume.resizable(width='false', height='false')
F6 = tk.Frame(subnume, width=100)
F6b = tk.Frame(subnume, width=100)
F6.grid(column=0, row=0, sticky='w')
F6b.grid(column=0, row=0, sticky='e')
def modnume():
global xsum
global xdep
xdep=float(E6.get())
L6.configure(text='Current depth = %fnm' %(xdep+xsum/100))
for j in range(int(xsum), int(xsum + xdep*100)):
if j > 999:
print "Reached maximum depth"
break
else:
elem['dist'][j]=float(E6b.get())
xsum+=xdep*100
E6.delete(0, 'end')
E6.insert(0, 0)
E6 = tk.Entry(F6b, bd =2, width=10)
E6.pack()
E6b = tk.Entry(F6b, bd =2, width=10)
E6b.pack()
B6 = tk.Button(subnume, text ='Add depth/concentration', command=modnume, width=33)
B6.grid(column=0, row=2)
E6.focus_force()
L6 = tk.Label(subnume, text = 'Current depth = %f' %xdep)
L6.grid(column=0, row=1)
L6b = tk.Label(F6, text = 'Depth Amount', width=25)
L6b.pack()
L6c = tk.Label(F6, text = 'Concentration factor (0 to 1)', width=25)
L6c.pack()
plot_dist(elem, window)
subnume.mainloop()
def cmdspecial():
plot (elem['dist'])
show()
edit.add_command(label='Mass', command=cmdmass)
edit.add_command(label='Name', command=cmdname)
edit.add_command(label='Z', command=cmdz)
edit.add_command(label='Symbol', command=cmdsymbol)
editdist.add_command(label='Drawing', command=cmddraw)
editdist.add_command(label='Numerical', command=cmdnume)
editdist.add_command(label='Special', command=cmdspecial)
F2 = tk.Frame(sub, width=250, height=4)
F2.pack()
sub.resizable(width='true', height='false')
propbutton.pack()
propbutton.config(bg='white', bd=4, relief='raised')
distbutton.pack()
distbutton.config(bg='white', bd=4, relief='raised')
sub.mainloop()
......@@ -9,12 +9,20 @@ i=0
points = []
spline = 0
tag1 = "theline"
Econtrol = 0
##############################################################################
# PTE window
#PTE = tk.Tk()
#PTE.title('Periodic Table of Elements')
##############################################################################
# Element callback
def elem_callback(edict , ebutton, frm):
#plot_dist(edict, frm)
PTable(edict , ebutton)
def elem_callback(edict , ebutton, canvas, i, Labelmass, LabelZ, Labelname, Labelsymbol, LabelLS, Entrymass, EntryZ, Entryname, Entrysymbol, EntryLS):
global Econtrol
Econtrol = i
PTable(edict , ebutton, Labelmass, LabelZ, Labelname, Labelsymbol, LabelLS, Entrymass, EntryZ, Entryname, Entrysymbol, EntryLS)
##############################################################################
# Element addition
......@@ -24,13 +32,17 @@ def ewin_build(window, xmax, xstep):
def create():
global i, Edict, Ebuttons
Edict[i] = dict(name = "New", symbol = "Hf", mass = 178.00, Z = 72, dist = ones(int(xmax/xstep)), control = 0, LineShape = 200.)
Ebuttons.insert(i, tk.Button(Eframe,text=i,width=1,height=1, command=lambda i=i : elem_callback(Edict[i] , Ebuttons[i], Dframe)))
Ebuttons.insert(i, tk.Button(Eframe,text=i,width=1,height=1, command=lambda i=i : elem_callback(Edict[i] , Ebuttons[i], Distcanvas, i, Labelmass, LabelZ, Labelname, Labelsymbol, LabelLS, Entrymass, EntryZ, Entryname, Entrysymbol, EntryLS )))
Ebuttons[i].pack(side='left')
i=i+1
but = tk.Button(window, command=create, text='Add element', bd=2, height=2,width=7)
but.pack()
but.place(anchor='n', y=5, x=44)
def remove():
global i, Edict, Ebuttons
if i > 1:
i=i-1
del Edict[i]
Ebuttons[i].destroy()
del Ebuttons[i]
##############################################################################
# Element Frames
......@@ -38,15 +50,77 @@ def ewin_build(window, xmax, xstep):
Label1 = tk.LabelFrame(window, text = 'Elements', relief='raised', bd=2)
Label1.pack()
Label2 = tk.LabelFrame(window, text = 'Distribution', bd=1)
Label2.pack()
Label2.place(anchor='w', y=210)
Eframe = tk.Canvas(Label1)
Eframe.pack(fill='both',expand=0)
Dframe = tk.Frame(Label2)
Dframe.pack()
##############################################################################
# Init
create()
##############################################################################
# Properties
global Econtrol, Edict
def update(i):
Edict[i]['mass'] = float(Entrymass.get())
Labelmass.configure(text = 'Mass - %f' %Edict[i]['mass'])
Edict[i]['Z'] = float(EntryZ.get())
LabelZ.configure(text = 'Z - %f' %Edict[i]['Z'])
Edict[i]['name'] = str(Entryname.get())
Labelname.configure(text = '%s' %Edict[i]['name'])
Edict[i]['symbol'] = str(Entrysymbol.get())
Labelsymbol.configure(text = 'Symbol - %s' %Edict[i]['symbol'])
Edict[i]['LineShape'] = float(EntryLS.get())
LabelLS.configure(text = 'Line Shape - %f' %Edict[i]['LineShape'])
print Edict[i]
Labelprop = tk.LabelFrame(window, text = 'Properties', relief='raised', bd=2)
#Labelprop.pack()
Labelprop.place(anchor='w', y=125, x=5)
EPframel = tk.Frame(Labelprop)
EPframel.pack(side='left')
EPframee = tk.Frame(Labelprop)
EPframee.pack(side='right')
Labelname = tk.Label(EPframel, width=30, pady=2, text='%s' %Edict[int(Econtrol)]['name'])
Labelmass = tk.Label(EPframel, width=30, pady=2, text='Mass - %f' %Edict[int(Econtrol)]['mass'])
LabelZ = tk.Label(EPframel, width=30, pady=2, text='Z - %f' %Edict[int(Econtrol)]['Z'])
Labelsymbol = tk.Label(EPframel, width=30, pady=2, text= 'Symbol - %s' %Edict[int(Econtrol)]['symbol'])
LabelLS = tk.Label(EPframel, width=30, pady=2, text='Line Shape - %f' %Edict[int(Econtrol)]['LineShape'])
Labelname.pack()
Labelmass.pack()
LabelZ.pack()
Labelsymbol.pack()
LabelLS.pack()
Entryname = tk.Entry(EPframee, width=22)
Entrymass = tk.Entry(EPframee, width=22)
EntryZ = tk.Entry(EPframee, width=22)
Entrysymbol = tk.Entry(EPframee, width=22)
EntryLS = tk.Entry(EPframee, width=22)
Entryname.pack()
Entrymass.pack()
EntryZ.pack()
Entrysymbol.pack()
EntryLS.pack()
BUpdate = tk.Button(EPframee, text ='Update', command=lambda i=int(Econtrol) :update(i), width=20)
BUpdate.pack(side='bottom')
but = tk.Button(EPframel, command=create, text='Add element', bd=1, height=1,width=15)
but.pack(side='left')
butrmv = tk.Button(EPframel, command=remove, text='Remove element', bd=1, height=1,width=15)
butrmv.pack(side='right')
##############################################################################
# Init
Entrymass.insert(0, Edict[int(Econtrol)]['mass'])
Entryname.insert(0, Edict[int(Econtrol)]['name'])
EntryZ.insert(0, Edict[int(Econtrol)]['Z'])
Entrysymbol.insert(0, Edict[int(Econtrol)]['symbol'])
EntryLS.insert(0, Edict[int(Econtrol)]['LineShape'])
##############################################################################
# Canvas callback
......@@ -77,7 +151,11 @@ def ewin_build(window, xmax, xstep):
##############################################################################
# Drawing Canvas
Distcanvas = tk.Canvas(Dframe, bg="white", width=600, height= 300)
Label2 = tk.LabelFrame(window, text = 'Distribution', bd=1)
#Label2.pack()
Label2.place(anchor='w', y=375, x=5)
Distcanvas = tk.Canvas(Label2, bg="white", width=800, height= 300)
#Distcanvas.configure(cursor="crosshair")
Distcanvas.grid_columnconfigure(999, weight = 1)
Distcanvas.grid_rowconfigure(999, weight = 1)
......@@ -87,7 +165,4 @@ def ewin_build(window, xmax, xstep):
Distcanvas.bind("<Button-2>", toggle)
##############################################################################
# Init
create()
##############################################################################
1.5200e+02 4.1800e+02
1.7400e+02 4.2900e+02
1.9000e+02 4.4600e+02
1.9900e+02 4.5200e+02
2.0600e+02 4.5200e+02
2.1200e+02 4.4500e+02
2.1800e+02 4.3300e+02
2.2400e+02 4.2000e+02
2.3200e+02 4.1100e+02
2.4800e+02 4.0700e+02
2.7500e+02 4.0200e+02
2.9100e+02 4.0200e+02
3.0900e+02 4.0400e+02
3.2400e+02 4.0400e+02
3.3400e+02 4.0100e+02
3.4300e+02 3.9300e+02
3.4900e+02 3.8700e+02
3.5400e+02 3.7900e+02
3.6000e+02 3.6600e+02
3.6600e+02 3.5300e+02
3.7000e+02 3.4100e+02
3.7600e+02 3.2200e+02
3.8000e+02 3.0900e+02
3.8600e+02 2.9300e+02
3.9200e+02 2.8400e+02
3.9900e+02 2.7400e+02
4.1100e+02 2.7100e+02
4.2500e+02 2.7100e+02
4.4000e+02 2.7700e+02
4.5300e+02 2.8100e+02
4.6500e+02 2.7900e+02
4.7500e+02 2.7100e+02
4.8300e+02 2.5900e+02
4.8700e+02 2.4700e+02
4.9100e+02 2.3300e+02
4.9500e+02 2.1600e+02
4.9900e+02 1.9900e+02
5.0400e+02 1.7800e+02
5.0900e+02 1.5700e+02
5.1300e+02 1.4500e+02
5.1500e+02 1.3700e+02
5.1900e+02 1.3300e+02
5.2200e+02 1.3100e+02
5.2600e+02 1.3100e+02
5.3000e+02 1.3800e+02
5.3400e+02 1.4800e+02
5.3800e+02 1.6500e+02
5.4000e+02 1.8100e+02
5.4400e+02 2.0300e+02
5.4600e+02 2.2000e+02
5.5000e+02 2.5000e+02
5.5600e+02 2.9400e+02
5.5600e+02 3.1500e+02
5.6100e+02 3.3600e+02
5.6500e+02 3.4800e+02
5.6700e+02 3.5000e+02
5.6900e+02 3.4800e+02
5.7200e+02 3.4000e+02
5.7600e+02 3.2200e+02
5.7800e+02 3.0100e+02
5.8100e+02 2.8100e+02
5.8300e+02 2.5700e+02
5.8700e+02 2.3300e+02
5.8800e+02 2.1200e+02
5.9100e+02 1.9000e+02
5.9400e+02 1.6600e+02
5.9700e+02 1.3700e+02
6.0100e+02 1.1100e+02
6.0500e+02 9.1000e+01
6.0900e+02 7.9000e+01
6.1400e+02 7.2000e+01
6.2000e+02 7.1000e+01
6.2800e+02 7.0000e+01
8.5249e+01 7.3469
8.5628e+01 7.1837
8.5806e+01 7.0408
8.5895e+01 6.9796
8.6163e+01 6.9796
8.6229e+01 7.2857
8.6407e+01 7.0000
8.6697e+01 7.0000
8.6897e+01 7.0612
8.7142e+01 7.2449
8.7297e+01 7.4286
8.7364e+01 7.2449
8.7409e+01 6.9184
8.7631e+01 7.2857
8.7742e+01 7.4898
8.7964e+01 7.6735
8.7986e+01 7.8980
8.8187e+01 7.7551
8.8388e+01 7.5510
8.8521e+01 7.4898
8.8678e+01 7.2857
8.8723e+01 7.1224
8.8767e+01 6.9388
8.8946e+01 6.6939
8.9102e+01 6.6327
8.9125e+01 6.4694
8.9303e+01 6.5102
8.9481e+01 6.4694
8.9792e+01 6.5918
8.9793e+01 6.4694
8.9859e+01 6.7143
9.0193e+01 6.7755
9.0281e+01 6.8980
9.0549e+01 6.8980
9.0772e+01 6.7959
9.1017e+01 6.7347
9.1195e+01 6.6327
9.1597e+01 6.1633
9.1686e+01 6.1020
9.1864e+01 5.9388
9.1887e+01 5.8571
9.1999e+01 5.5714
9.2066e+01 5.3469
9.2089e+01 5.2245
9.2156e+01 5.1020
9.2245e+01 4.9796
9.2290e+01 4.8571
9.2357e+01 4.4898
9.2469e+01 4.3673
9.2469e+01 4.2449
9.2514e+01 4.0000
9.2559e+01 3.8367
9.2782e+01 3.7551
9.2849e+01 3.7551
9.3027e+01 3.8571
9.3204e+01 4.0204
9.3316e+01 4.0816
9.3338e+01 4.0000
9.3560e+01 4.2245
9.3760e+01 4.3469
9.3983e+01 4.1224
9.4050e+01 4.1429
9.4139e+01 4.0408
9.4229e+01 3.9592
9.4318e+01 3.8163
9.4362e+01 3.8980
9.4832e+01 2.9184
9.4855e+01 2.7143
9.4945e+01 2.3878
9.5034e+01 2.0612
9.5146e+01 1.7959
9.5281e+01 1.4898