-
Notifications
You must be signed in to change notification settings - Fork 11
/
default_config.yaml
224 lines (182 loc) · 11.4 KB
/
default_config.yaml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# The configuration is structured using YAML (https://yaml.org/). Note that YAML uses spaces, not tabs, for identation.
# !!! Important !!! Do not edit this document. Instead, copy (at least) the first segment into your own config file.
#------------ This first segment of the config contains parameters mandatory for running a pipeline
# Paths to the data location and SimNIBS environment (please use full paths)
data_path: /project/3015999.02/andche_sandbox/TUS_sims/tusim/data
# Paths to T1 and T2 relative to data_path; all string substitutions will be done using subject_id
t1_path_template: sub-%1$03d_orig_T1w.nii.gz
t2_path_template: sub-%1$03d_orig_T2w.nii.gz
# Path to SimNIBS binaries
simnibs_bin_path: /home/affneu/kenvdzee/SimNIBS-4.0/bin/
# select which medium setup to use: 'water' or 'layered' (a layered medium consists of several layers defined below)
simulation_medium: layered
# Parameters differ for each transducer and can be obtained from the manufacturer
transducer:
n_elements: 4 # Number of elements in the transducer
Elements_ID_mm: [0, 32.9184, 46.1264, 56.0324] # Inner diameter of each element [mm]
Elements_OD_mm: [32.3596, 45.5676, 55.5244, 64.008] # Outer diameter of each element [mm]
curv_radius_mm: 63.20 # Radius of curvature of the bowl [mm]
dist_to_plane_mm: 52.38 # Distance to the transducer exit plane from the geometric focus [mm]
source_amp: 91590 # Source amplitude [Pa]
source_phase_deg: [0.0, 13.2, 26.4, 52.8] # Source phase [deg]
source_freq_hz: 250e3 # The central frequency [Hz]
pos_t1_grid: [128, 139, 15] # Position on T1 grid [T1 grid space] (can be left out if importing location data)
# Important to note: the alpha values in `alpha_0_true` below are currently set for 500KHz transducers.
# The values that should be used when simulating 250KHz transducers are commented next to the `alpha_0_true` values that should be changed.
# Stimulation target on T1 grid [T1 grid space] (again, can be left out if importing location data)
# (only used to angle the transducer, does not influence depth steering)
focus_pos_t1_grid: [128, 142, 75]
# Expected focus distance of the transducer, measured from the exit-plane
# (Should only be specified when importing location data or when using neither a skull or layered medium)
# (Can be calculated by the pipeline when both the 'pos_t1_grid' and 'focus_pos_t1_grid' are known)
expected_focal_distance_mm: 64.5
#------------ This second segment contains parameters that can be used based on the specific needs of the analysis
# Should output be ordered based on subject id?
subject_subfolder: 1
# Optional affix for result filenames
results_filename_affix: ''
# This allows you to add additional paths and subpaths while running the pipeline
paths_to_add: []
subpaths_to_add: []
# Can allow to only run specific components of the pipeline
run_source_setup: 1 # Should we set up acoustic source? useful to switch off to look at initial segmentation results only
run_acoustic_sims: 1 # Should we run the acoustic simulations? useful to switch off to look at initial segmentation results only
run_heating_sims: 0 # Should we run the heating simulations? useful to switch off to look at initial segmentation results only
run_posthoc_water_sims: 0 # Should we run the simulations in free water with exactly the same parameter? useful for double checking that the true intensity matches the desired one
# In interactive mode (1), the figures are shown and confirmation dialogs appear (the latter of which will halt the pipeline until confirmation)
# In non-interactive mode (0), no plots are shown and no confirmation dialogs will
interactive: 1
# Needs to be included if running in a non-interactive mode
overwrite_files: ask # 'never' to never overwrite, 'always' to always overwrite, any other value to ask for confirmation
# Default parameters for thermal simulations
# The document 'thermal simulations getting started' provides documentation on how to change these for your own thermal simulations.
thermal:
duty_cycle: 1 # [float between 0 to 1]
iti: 0.6 # [s]
n_trials: 12 # [integer]
stim_duration: 0.6 # [s]
continuous_protocol: 0 # [binary]
# These should only be changed if they don't meet the criteria described in "run_heating_simulations"
sim_time_steps: 0.01 # [s]
post_stim_time_step_dur: 0.1 # [s]
on_off_step_duration: 0.1 # [s], commented out so that the `check_thermal_parameters` function calculated one based on the `duty_cycle`
equal_steps: 0 # [binary]
# Optional parameters:
temp_0: 37 # [deg C]
sensor_xy_halfsize: 100 # [grid units]
record_t_at_every_step: 0 # [binary]
# Should the script position_transducer_localite be used?
transducer_from_localite: 0
# Allows one to correct for varying distances between the infrared trackers attached to the transducer and the exit plane
# (can only be used with the function 'transducer_from_localite')
reference_transducer_distance_mm: 15
# Grid resolution (must be isotropic)
grid_step_mm: 0.5 # [mm]
# Grid size and dimensions only need to be set manually if the simulations are done for water only
# Select the desired simulation grid size (number of points per dimension)
default_grid_size: 144
default_grid_dims: [144, 144, 256]
#--- Other SimNIBS-related parameters
# Labels for layered simulation, assuming for now the SimNIBS masks indices;
# Note that the labels are applied in the order specified here, so the skull should normally be the last as it matters the most
# This labeling scheme assumes the outputs of charm in SimNIBS
layer_labels:
water: [0, 3, 6, 9, 10] # this isn't really neccessary as water is a default layer - all that has a number not used for other layers will be water
brain: [1, 2]
skin: [5]
skull_cortical: [7]
skull_trabecular: [8]
# You can remove or add layers. If you want a skull-only simulation, you can remove brain and skin for example.
# If you are using headreco, those are the labels you probably want.
# layer_labels:
# water: [0, 6, 7, 8]
# brain: [1, 2]
# skin: [5]
# skull: [4]
# Only use this if you are using the Donders HPC. If not, you would have to do some things by hand (currently it only affects SimNIBS segmentation).
using_donders_hpc: 1
# By default, SimNIBS segmentation results are not overwritten, unless enabled here
overwrite_simnibs: 0
# An optional path to LD_LIBRARY used during SimNIBS installation
# If you experience an `undefined symbol` error in `create_mesh_surf.cpython-39-x86_64-linux-gnu.so`, set the next line to your LD_LIBRARY location
ld_library_path: /opt/gcc/7.2.0/lib64
# If you encounter the error "The qform and sform of do not match. Please run charm with the --forceqform option" when running charm, you can set this to 1 to do it for all subjects
use_forceqform: 0
# Segmentation software (current options are 'headreco' and 'charm')
segmentation_software: charm
# When enabled, the Charm segmentation function will also save the segmented skull in between each processing step. Some of these do not contain the enforced CSF layer, thickening the skull.
charm_debug: 0
#------------------------------------------
# Medium properties, references: ITRUST benchmarks (https://arxiv.org/abs/2202.04552); Tissue Properties DB (https://itis.swiss/virtual-population/tissue-properties/overview/);
# Important to note: the alpha values in `alpha_0_true` are currently set for 500KHz transducers
# These should be adjusted to the values shown in their respected comments next to the medium parameters
# We are still not entirely sure what alpha values best to use, so be critical of our and your own choices
medium:
water:
sound_speed: 1500 # [m/s] ITRUST benchmarks
density: 994 # [kg/m^3] Tissue Properties DB or waterDensity(37) function in kWave
alpha_0_true: 0 # from ITRUST benchmarks at 500 kHz (assumes no absorption in water, so no heating )
alpha_power_true: 1.2
thermal_conductivity: 0.60 # [W/m/°C] Tissue Properties DB
specific_heat_capacity: 4178 # [J/kg/°C] Tissue Properties DB
skull: # cortical bone
sound_speed: 2800 # [m/s], ITRUST benchmarks
density: 1850 # [kg/m^3], ITRUST benchmarks
alpha_0_true: 4 # ITRUST benchmarks [this is alpha_0 in alpha = alpha_0*frequency^alpha_power] (changed to 2 for 250KHz transducers)
alpha_power_true: 1.2
thermal_conductivity: 0.32 # [W/m/°C] Tissue Properties DB
specific_heat_capacity: 1313 # [J/kg/°C] Tissue Properties DB
brain:
sound_speed: 1546 # [m/s] Tissue Properties DB
density: 1046 # [kg/m^3], ITRUST benchmarks or waterDensity(temp_0)
alpha_0_true: 0.6 # ITRUST benchmarks (changed to 0.15 for 250KHz transducers)
alpha_power_true: 1.2
thermal_conductivity: 0.51 # [W/m/°C] Tissue Properties DB
specific_heat_capacity: 3630 # [J/kg/°C] Tissue Properties DB
skin:
sound_speed: 1610 # [m/s], ITRUST benchmarks
density: 1090 # [kg/m^3], ITRUST benchmarks
alpha_0_true: 0.4 # ITRUST benchmarks (changed to 0.1 for 250KHz transducers)
alpha_power_true: 1.2
thermal_conductivity: 0.37 # [W/m/°C] Tissue Properties DB
specific_heat_capacity: 3391 # [J/kg/°C] Tissue Properties DB
skull_trabecular: # trabecular bone
sound_speed: 2300 # [m/s], ITRUST benchmarks
density: 1700 # [kg/m^3], ITRUST benchmarks
alpha_0_true: 8 # ITRUST benchmarks [this is alpha_0 in alpha = alpha_0*frequency^alpha_power] (changed to 2 for 250KHz transducers)
alpha_power_true: 1.2
thermal_conductivity: 0.32 # [W/m/°C] Tissue Properties DB
specific_heat_capacity: 1313 # [J/kg/°C] Tissue Properties DB
skull_cortical: # cortical bone
sound_speed: 2800 # [m/s], ITRUST benchmarks
density: 1850 # [kg/m^3], ITRUST benchmarks
alpha_0_true: 4 # ITRUST benchmarks [this is alpha_0 in alpha = alpha_0*frequency^alpha_power] (changed to 2 for 250KHz transducers)
alpha_power_true: 1.2
thermal_conductivity: 0.32 # [W/m/°C] Tissue Properties DB
specific_heat_capacity: 1313 # [J/kg/°C] Tissue Properties DB
# The default frequency used to calculate the medium parameters above
default_freq: 0.5e6
# Radius of the target area around the focus in which the ISPPA is averaged for the outputs
focus_area_radius: 5 # [mm]
# select PML size, the default one for 3D is 10 (PML is the layer used in
# kWaves to absorb waves reaching the end of the computational grid,
# http://www.k-wave.org/documentation/example_na_controlling_the_pml.php)
pml_size: 10
# Expansion factor for the cerebro-spinal fluid brain mask;
# if the mask ends up being too big, try reducing it
# (40 is the conservative default; the mask is dilated with csf_mask_expansion_factor/voxel_size_mm cubic kernel)
csf_mask_expansion_factor: 40
# Use the kwaveArray class for simulations
use_kWaveArray: 0
# Thresholds for smoothing the skull and other masks
skull_smooth_threshold: 0.35 # (higher threshold means thinner mask, lower threshold means thicker mask)
other_smooth_threshold: 0.5 # (higher threshold means thinner mask, lower threshold means thicker mask)
# To what extent the computational grid can be expanded in order to get lower prime numbers to (potentially) speed up computations
prime_factor_max_grid_expansion: 40
# Select which k-Wave code to run (see 'run_simulations' for more documentation)
# MATLAB CPU code 'matlab_cpu'
# MATLAB GPU code 'matlab_gpu'
# C++ code (Interactive) 'cpp_interactive'
# C++ code (Non-Interactive) 'cpp_noninteractive'
# CUDA code 'cuda' (currently does not work at the Donders HPC, but 'matlab_gpu' works)
code_type: matlab_gpu