-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.py
More file actions
48 lines (39 loc) · 1.13 KB
/
run.py
File metadata and controls
48 lines (39 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import gui
'''
from queue import Queue
from Simulation import Simulation
from Charge import ChargeDist
'''
def run():
gui.run()
'''
sim_conf = {
'phy_rect': (-0.4, 0.4, 0.4, -0.4),
'mpp': 0.5e-4,
'down_sampling': 1,
'plots': {
'potential_color': {
'min': (0, 0, 255),
'max': (255, 0, 0),
'ref': (255, 255, 255)
},
'potential_contour': {
'scale': 0.5
}
},
'ref_point': None,
'device': 'cpu',
'charges': [
ChargeDist(-0.1, 0.05, 0.1, 0.05, density=1e-8, depth=0.4),
ChargeDist(-0.1, -0.05, 0.1, -0.05, density=-1e-8, depth=0.4)
]
}
# print('Image Size : ', Simulation.get_adjusted_size(sim_conf['phy_rect'],
# sim_conf['down_sampling'],
# sim_conf['mpp'])['image_size'])
progress_q = Queue()
sim = Simulation(sim_conf)
sim.run(progress_q, verbose=True)
'''
if __name__ == '__main__':
run()