Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Rafael Peretti Pezzi
OpenFlatus
Commits
d1738f9b
Commit
d1738f9b
authored
Jan 10, 2012
by
Matheus Müller
Browse files
Save e Load de amostrar unificado, simulacao adicionada
parent
4f937fb6
Changes
127
Hide whitespace changes
Inline
Side-by-side
Too many changes to show.
To preserve performance only
127 of 127+
files are displayed.
Plain diff
Email patch
Al.dat
View file @
d1738f9b
...
...
@@ -15,5 +15,16 @@
0.0 0.0
0.0 0.0
0.0 0.0
1.03722084368 0.219387755102
0.0 0.0
0.0 0.0
0.0 0.0
0.0 0.0
0.0 0.0
0.0 0.0
0.0 0.0
0.0 0.0
0.0 0.0
0.0 0.0
0.0 0.0
1.24565756824 0.206632653061
5.0 0
Al.prof
View file @
d1738f9b
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.2
19387755102
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.2
06632653061
0.
206632653061
0.
206632653061
0.
206632653061
0.
206632653061
0.
206632653061
0.
206632653061
0.
206632653061
0.
206632653061
0.
206632653061
0.
206632653061
0.
206632653061
0.
206632653061
0.
206632653061
0.
206632653061
0.
206632653061
0.
206632653061
0.
206632653061
0.
206632653061
0.
206632653061
0.
206632653061
0.
206632653061
0.0
0.0
0.0
...
...
Ewindow.py
View file @
d1738f9b
...
...
@@ -5,6 +5,7 @@ from pylab import *
from
numpy
import
zeros
import
os
import
tkFileDialog
import
shutil
##############################################################################
# Control variables and lists
...
...
@@ -48,13 +49,13 @@ def elem_select(i, button):
##############################################################################
# Init
def
ewin_build
(
window
,
EntryDstep
):
def
ewin_build
(
window
,
OFlabentries
):
##############################################################################
# Element addition
def
create
():
global
i
,
Edict
,
Ebuttons
Edict
[
i
]
=
dict
(
name
=
"New
Element
"
,
symbol
=
"Hf"
,
mass
=
178.00
,
Z
=
72
,
dist
=
zeros
(
int
(
10.
/
float
(
EntryDstep
.
get
())
)),
LineShape
=
200.
,
profundidademax
=
10.
)
Edict
[
i
]
=
dict
(
name
=
"New"
,
symbol
=
"Hf"
,
mass
=
178.00
,
Z
=
72
,
dist
=
zeros
(
int
(
10.
/
float
(
OFlabentries
[
17
]
.
get
())
)),
LineShape
=
200.
,
profundidademax
=
10.
)
Ebuttons
.
insert
(
i
,
tk
.
Button
(
Eframe
,
text
=
i
,
width
=
1
,
height
=
1
,
command
=
lambda
i
=
i
:
elem_select
(
i
,
Ebuttons
))
)
Ebuttons
[
i
].
grid
(
column
=
((
len
(
Ebuttons
)
-
1
)
%
14
),
row
=
int
(
math
.
floor
((
len
(
Ebuttons
)
-
1
)
/
14
)))
i
=
i
+
1
...
...
@@ -153,17 +154,29 @@ def ewin_build(window, EntryDstep):
##############################################################################
# Load/Save sample
def
LOADSAMPLE
():
arquivo
=
tkFileDialog
.
askopenfilename
()
f
=
loadtxt
(
arquivo
,
dtype
=
"string"
)
global
i
,
Econtrol
arquivo
=
tkFileDialog
.
askopenfile
()
for
n
in
arange
(
9
,
18
):
OFlabentries
[
n
].
delete
(
0
,
len
(
OFlabentries
[
n
].
get
()))
OFlabentries
[
n
].
insert
(
0
,
float
(
arquivo
.
readline
()))
for
n
in
arange
(
21
,
24
):
OFlabentries
[
n
].
delete
(
0
,
len
(
OFlabentries
[
n
].
get
()))
OFlabentries
[
n
].
insert
(
0
,
float
(
arquivo
.
readline
()))
f
=
loadtxt
(
arquivo
.
name
+
'.elm'
,
dtype
=
"string"
)
els
=
f
[:,
0
]
eln
=
f
[:,
1
]
elm
=
f
[:,
2
]
elz
=
f
[:,
3
]
LSs
=
f
[:,
4
]
eld
=
f
[:,
5
]
Edict
.
clear
()
for
n
in
range
(
len
(
Ebuttons
)):
Ebuttons
[
n
].
destroy
()
del
Ebuttons
[:]
i
=
0
Econtrol
=
0
for
n
in
range
(
len
(
els
)):
if
n
<
(
len
(
els
)
-
1
):
create
()
create
()
Edict
[
n
][
'LineShape'
]
=
float
(
LSs
[
n
])
Edict
[
n
][
'symbol'
]
=
str
(
els
[
n
])
Edict
[
n
][
'name'
]
=
str
(
eln
[
n
])
...
...
@@ -171,18 +184,32 @@ def ewin_build(window, EntryDstep):
Edict
[
n
][
'Z'
]
=
float
(
elz
[
n
])
Edict
[
n
][
'profundidademax'
]
=
float
(
eld
[
n
])
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'
)
elem_select
(
0
,
Ebuttons
)
arquivo
.
close
()
def
SAVESAMPLE
():
elist
=
tkFileDialog
.
asksaveasfile
(
mode
=
'w'
)
for
n
in
range
(
len
(
Ebuttons
)):
config
=
tkFileDialog
.
asksaveasfile
(
mode
=
'w'
)
elist
=
open
(
config
.
name
+
'.elm'
,
'w+'
)
for
k
in
arange
(
9
,
18
):
config
.
write
(
(
OFlabentries
[
k
].
get
())
+
'
\n
'
)
for
j
in
arange
(
21
,
24
):
config
.
write
(
(
OFlabentries
[
j
].
get
())
+
'
\n
'
)
config
.
write
(
'##############################################################################
\n
'
)
config
.
write
(
'# dƐ/dx
\n
# dω²/dx
\n
# θ out
\n
# θ in
\n
# FWHM
\n
# E min
\n
# E max
\n
# E step
\n
# Depth step
\n
# Ion energy
\n
# Ion mass
\n
# Ion Z
\n
'
)
for
n
in
range
(
len
(
Edict
)):
elist
.
write
(
Edict
[
n
][
'symbol'
]
+
' '
)
elist
.
write
(
Edict
[
n
][
'name'
]
+
' '
)
elist
.
write
(
str
(
Edict
[
n
][
'mass'
])
+
' '
)
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'
)
shutil
.
copy
(
'temp.sim'
,
config
.
name
+
'.sim'
)
elist
.
close
()
config
.
close
()
##############################################################################
# Buttons
...
...
@@ -196,7 +223,7 @@ def ewin_build(window, EntryDstep):
BUpdate
=
tk
.
Button
(
EPframel2
,
text
=
'Update properties'
,
command
=
lambda
i
=
int
(
Econtrol
)
:
update
(
Econtrol
),
width
=
15
)
BUpdate
.
pack
()
BUpdateD
=
tk
.
Button
(
EPframel2
,
text
=
'Distribution'
,
command
=
lambda
i
=
int
(
Econtrol
)
:
os
.
system
(
"python profiler.py %s %s %s %s &"
%
(
Edict
[
int
(
Econtrol
)][
'symbol'
],
str
(
methodvar
.
get
()),
str
(
Labentrys
[
11
].
get
()),
str
(
EntryDstep
.
get
())
)
),
width
=
15
)
BUpdateD
=
tk
.
Button
(
EPframel2
,
text
=
'Distribution'
,
command
=
lambda
i
=
int
(
Econtrol
)
:
os
.
system
(
"python profiler.py %s %s %s %s &"
%
(
Edict
[
int
(
Econtrol
)][
'symbol'
],
str
(
methodvar
.
get
()),
str
(
Labentrys
[
11
].
get
()),
str
(
OFlabentries
[
17
]
.
get
())
)
),
width
=
15
)
BUpdateD
.
pack
()
BLoad
=
tk
.
Button
(
EPframel
,
text
=
'Load Sample'
,
command
=
lambda
i
=
int
(
Econtrol
)
:
LOADSAMPLE
(),
width
=
15
)
...
...
Ewindow.pyc
0 → 100644
View file @
d1738f9b
File added
La.dat
View file @
d1738f9b
...
...
@@ -5,5 +5,20 @@
0.0 0.0
0.0 0.0
0.0 0.0
1.01550868486 0.206632653061
0.0 0.0
0.0 0.0
0.0 0.0
0.0 0.0
0.0 0.0
0.0 0.0
0.0 0.0
0.0 0.0
0.0 0.0
0.0 0.0
0.0 0.0
0.0 0.0
1.02543424317 0.165816326529
1.19851116625 0.163265306122
1.80397022333 0.00255102040817
2.27047146402 0.00255102040816
5.0 0
La.prof
View file @
d1738f9b
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
206
63265
3061
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.
0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.
16581
63265
29
0.
16581
63265
29
0.
16581
63265
29
0.
16581
63265
29
0.
16581
63265
29
0.
16581
63265
29
0.
16581
63265
29
0.
16581
63265
29
0.
16581
63265
29
0.
16581
63265
29
0.
16581
63265
29
0.
16581
63265
29
0.
16581
63265
29
0.
16581
63265
29
0.
16581
63265
29
0.
16581
63265
29
0.
16581
63265
29
0.
16581
63265
29
0.
16581
63265
29
0.
16581
63265
29
0.
16581
63265
29