Commit 742b170a authored by Matheus Müller's avatar Matheus Müller

Adaptado SAve/Load para nova estrutura de profiles

parent 88cbd2dc
......@@ -295,9 +295,10 @@ def ewin_build(window, OFlabentries, mainwindow, calcbutton, distvar, modevar, L
Edict[n]['mass'] = float(elm[n])
Edict[n]['Z'] = float(elz[n])
Edict[n]['profundidademax'] = float(eld[n])
Edict[n]['dist'].data = list(loadtxt(arquivo.name + '-' + Edict[n]['symbol']+'.prof', dtype="float"))
Ebuttons[n]['text'] = str(els[n])
shutil.copy(arquivo.name + '-' + Edict[n]['symbol'] + '.dat' , Edict[n]['symbol']+'.dat')
shutil.copy(arquivo.name + '-' + Edict[n]['symbol'] + '.prof' , Edict[n]['symbol']+'.prof')
#shutil.copy(arquivo.name + '-' + Edict[n]['symbol'] + '.dat' , Edict[n]['symbol']+'.dat')
#shutil.copy(arquivo.name + '-' + Edict[n]['symbol'] + '.prof' , Edict[n]['symbol']+'.prof')
elem_select(0,Ebuttons,grafico, f, a, t)
arquivo.close()
......@@ -317,8 +318,12 @@ def ewin_build(window, OFlabentries, mainwindow, calcbutton, distvar, modevar, L
elist.write(str(Edict[n]['Z'])+' ')
elist.write(str(Edict[n]['LineShape'])+' ')
elist.write(str(Edict[n]['profundidademax'])+'\n')
shutil.copy(Edict[n]['symbol']+'.prof', config.name + '-' + Edict[n]['symbol'] + '.prof')
shutil.copy(Edict[n]['symbol']+'.dat', config.name + '-' + Edict[n]['symbol'] + '.dat')
temp = open(config.name + '-' + Edict[n]['symbol']+'.prof', 'w+')
for j in range(len(Edict[n]['dist'].data)):
temp.write(str(Edict[n]['dist'].data[j])+'\n')
temp.close()
#shutil.copy(Edict[n]['symbol']+'.prof', config.name + '-' + Edict[n]['symbol'] + '.prof')
#shutil.copy(Edict[n]['symbol']+'.dat', config.name + '-' + Edict[n]['symbol'] + '.dat')
shutil.copy('temp.sim', config.name + '.sim')
elist.close()
config.close()
......
No preview for this file type
This diff is collapsed.
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