forked from Neuroinflab/fourspheremodel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparameters.py
57 lines (45 loc) · 1.39 KB
/
parameters.py
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
49
50
51
52
53
54
55
56
57
import numpy as np
# All numbers in cm
dipole_loc = 7.8
brain_rad = 7.9
csftop_rad = 8.
skull_rad = 8.5
scalp_rad = 9.
sigma_brain = 1. / 300. # S / cm
sigma_scalp = sigma_brain
sigma_csf = 5 * sigma_brain
sigma_skull20 = sigma_brain / 20.
sigma_skull40 = sigma_brain / 40.
sigma_skull80 = sigma_brain / 80.
# from gmsh sphere_4.geo
whitemattervol = 32
graymattervol = 64
csfvol = 96
skullvol = 128
scalpvol = 160
# measument points
# theta = np.arange(0, 180)
# phi_angle = 0 # -90 to 90
theta, phi_angle = np.mgrid[0:180:1, -90:90:1]
theta = theta.flatten()
phi_angle = phi_angle.flatten()
theta_r = np.deg2rad(theta)
phi_angle_r = np.deg2rad(phi_angle)
rad_tol = 1e-2
x_points = (scalp_rad - rad_tol) * np.sin(theta_r) * np.cos(phi_angle_r)
y_points = (scalp_rad - rad_tol) * np.sin(theta_r) * np.sin(phi_angle_r)
z_points = (scalp_rad - rad_tol) * np.cos(theta_r)
ele_coords = np.vstack((x_points, y_points, z_points)).T
# dipole location - Radial
rad_dipole = {'src_pos': [0., 0., 7.85],
'snk_pos': [0., 0., 7.75],
'name': 'rad'}
# # dipole location - Tangential
tan_dipole = {'src_pos': [0., -0.05, 7.8],
'snk_pos': [0., 0.05, 7.8],
'name': 'tan'}
# # # dipole location - Mix
mix_dipole = {'src_pos': [0., -0.0353, 7.835],
'snk_pos': [0., 0.0353, 7.764],
'name': 'mix'}
dipole_list = [rad_dipole, tan_dipole, mix_dipole]