Skip to content

Commit 55c2035

Browse files
committed
Revert "Merge with Julian's updated branch"
This reverts commit 09f608c.
1 parent 4e939ac commit 55c2035

File tree

1,030 files changed

+2757
-122884
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,030 files changed

+2757
-122884
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,4 @@ $RECYCLE.BIN/
8080
.directory
8181
.Trash-*
8282
core.*
83-
.Rhistory
83+

.gitmodules

-12
This file was deleted.

README.md

+3-24
Original file line numberDiff line numberDiff line change
@@ -24,30 +24,9 @@ cp /opt/prestus/example_data/PRESTUS_example_data.zip ${HOME}
2424

2525
Download and install these tools:
2626

27-
- MATLAB (R2022b)
28-
- [SimNIBS 4](https://github.com/simnibs/simnibs)
29-
- toolboxes included as submodules if this repository is cloned (must be added on MATLAB startup)
30-
- [k-Wave (1.4)](https://github.com/ucl-bug/k-wave.git)
31-
- [export_fig](https://github.com/altmany/export_fig)
32-
- [FEX-minimize](https://github.com/rodyo/FEX-minimize.git)
33-
- [xml2struct](https://github.com/joe-of-all-trades/xml2struct)
34-
35-
Tested on MATLAB 2022b, set up to work on Donders HPC (can work on a local PC as well).
36-
37-
Before using the package, you need to have some libraries on your path. Major dependencies are included as submodules in the toolbox folder. If you clone this repository, you can retrieve the submodules as follows:
38-
```
39-
git clone --recurse-submodules https://github.com/Donders-Institute/PRESTUS.git
40-
```
41-
42-
If you cloned this repository in the past, and updated it, you can retrieve submodules as follows:
43-
```
44-
cd PRESTUS
45-
git submodule init
46-
git submodule update
47-
```
48-
You additionally need to install SimNIBS (https://simnibs.github.io/simnibs/build/html/index.html#simnibs-4).
49-
50-
*Note: If you do not clone this repository, you must manually download and add the toolboxes specified above.*
27+
- [SimNIBS 4](https://simnibs.github.io/simnibs/build/html/index.html#simnibs-4)
28+
- [k-Wave 1.4](http://www.k-wave.org/download.php) (should be installed in the 'toolbox' folder of PRESTUS or be added automatically on MATLAB startup if you use HPC)
29+
- toolboxes included in this repository
5130

5231
Example data: We are currently working on a solution to make the example dataset available for users outside the DCCN.
5332

configs/M1_project_config.yaml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
transducer:
2+
n_elements: 2 # number of elements in the transducer
3+
Elements_ID_mm: [0, 32.6644] # elements 1 & 2 inner diameter [mm]
4+
Elements_OD_mm: [32.1564, 45.4914] # element 1 & 2 outer diameter [mm]
5+
curv_radius_mm: 63.20 # radius from the focal point to the bowl outermost point
6+
dist_to_plane_mm: 56.87 # distance to the transducer plane from the geometric focus
7+
source_amp: 126e3 # [Pa] (calibrated values at 20 W/cm^2 free-water Isppa)
8+
source_phase_rad: [0,2.0381] # [rad] (calibrated values at 20 W/cm^2 free-water Isppa)
9+
source_freq_hz: 250e3 # [Hz]
10+
11+
12+
expected_focal_distance_mm: 28.0 # expected distance to the stimulation focus
13+
transducer_from_localite: 1 # transducer position is to be taken from the localite file
14+
15+
# distance from the reference used in the neuronavigation (could be the TMS coil or the three-ball reference) and the transducer
16+
reference_transducer_distance_mm: 18
17+
18+
data_path: /project/2422024.01/M1TUS_2
19+
20+
t1_path_template: P%1$02d/*_T1w.nii.gz # path to T1 relative to data_path; all string substitutions will be done using subject_id
21+
t2_path_template: P%1$02d/*_T2w.nii.gz # path to T2 relative to data_path; all string substitutions will be done using subject_id
22+
localite_instr_file_template: P%1$02d/Instrument*.xml # path to the localite file that has the data about the instrument relative to data_path; could also be a template similar to t1 and t2 path (usually an xml file taken from subject/Sessions/Session_xxxx/InstrumentMarkers/ folder)
23+
24+
run_heating_sims: 1
25+
26+
default_grid_dims: [144, 144, 256]
27+
28+
thermal:
29+
duty_cycle: 0.3 # share of the stimulation duration during which the stimulation is on
30+
on_off_step_duration: 0.1 # duration of the on+off cycle (e.g., with a duty cycle of 0.3 and 0.01 s time steps for simulation, the whole on+off cycle will take 0.1 s)
31+
equal_steps: 0 # is the duration of the simulation steps equal for on and off steps? if not, it is computed based on the sim_time_steps * n_steps where n_steps is the needed number of on and off steps derived from the duty cycle
32+
temp_0: 37 #[deg C] initial temperature, currently not used
33+
stim_duration: 0.5 # [s] stimulation duration within a trial
34+
iti: 5 # interval between the trials, from the start of one trial to the start of another [s]
35+
n_trials: 2 # number of trials to simulate; the total simulated duration is then n_trials*iti seconds
36+
sensor_xy_halfsize: 100 # maximum size of the sensor window in which the temperature is recorded (in grid units)
37+
sim_time_steps: 0.01 # [s] simulation time steps during the stimulation period
38+
post_stim_time_step_dur: 0.1 # post-stimulation (inter-trial) steps
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
transducer:
2+
n_elements: 2 # number of elements in the transducer
3+
Elements_ID_mm: [0, 32.6644] # elements 1 & 2 inner diameter [mm]
4+
Elements_OD_mm: [32.1564, 45.4914] # element 1 & 2 outer diameter [mm]
5+
curv_radius_mm: 63.20 # radius from the focal point to the bowl outermost point
6+
dist_to_plane_mm: 56.87 # distance to the transducer plane from the geometric focus
7+
source_amp: 122277 # [Pa] (calibrated values at 20 W/cm^2 free-water Isppa)
8+
source_phase_rad: [0, 2.0381] # [rad] (calibrated values at 20 W/cm^2 free-water Isppa)
9+
source_freq_hz: 250e3 # [Hz]
10+
11+
12+
expected_focal_distance_mm: 28.0 # expected distance to the stimulation focus
13+
transducer_from_localite: 1 # transducer position is to be taken from the localite file
14+
15+
# distance from the reference used in the neuronavigation (could be the TMS coil or the three-ball reference) and the transducer
16+
reference_transducer_distance_mm: 18
17+
18+
data_path: /project/2422024.01/M1TUS_2
19+
20+
t1_path_template: P%1$02d/*_T1w.nii.gz # path to T1 relative to data_path; all string substitutions will be done using subject_id
21+
t2_path_template: P%1$02d/*_T2w.nii.gz # path to T2 relative to data_path; all string substitutions will be done using subject_id
22+
localite_instr_file_template: P%1$02d/Instrument*.xml # path to the localite file that has the data about the instrument relative to data_path; could also be a template similar to t1 and t2 path (usually an xml file taken from subject/Sessions/Session_xxxx/InstrumentMarkers/ folder)
23+
24+
run_heating_sims: 1
25+
26+
default_grid_dims: [144, 144, 256]
27+
28+
thermal:
29+
duty_cycle: 0.3 # share of the stimulation duration during which the stimulation is on
30+
on_off_step_duration: 0.1 # duration of the on+off cycle (e.g., with a duty cycle of 0.3 and 0.01 s time steps for simulation, the whole on+off cycle will take 0.1 s)
31+
equal_steps: 0 # is the duration of the simulation steps equal for on and off steps? if not, it is computed based on the sim_time_steps * n_steps where n_steps is the needed number of on and off steps derived from the duty cycle
32+
sim_time_steps: 0.01 # [s] simulation time steps during the stimulation period
33+
post_stim_time_step_dur: 0.1 # post-stimulation (inter-trial) steps
34+
stim_duration: 0.5 # [s] stimulation duration within a trial
35+
iti: 5 # interval between the trials, from the start of one trial to the start of another [s]
36+
n_trials: 2 # number of trials to simulate; the total simulated duration is then n_trials*iti seconds
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Location of stored data
2+
data_path: /project/3023001.06/Simulations/data_for_prestus/
3+
simnibs_bin_path: /home/mrphys/kenvdzee/SimNIBS-4.0/bin/
4+
subject_subfolder: 1
5+
output_location: /project/ change to ben's project
6+
7+
overwrite_simnibs: 0
8+
9+
# Structure of subfolders containing T1 and T1 images
10+
## It is easier to store the subject data of each participant in an individual subfolder
11+
t1_path_template: sub-%1$03d/*t1mprage*T1w.nii.gz
12+
t2_path_template: sub-%1$03d/*t2space*T2w.nii.gz
13+
14+
transducer:
15+
n_elements: 4 # number of elements in the transducer
16+
Elements_ID_mm: [0, 30.1788, 42.1388, 51.1088]
17+
Elements_OD_mm: [29.62, 41.58, 50.55, 57.94]
18+
curv_radius_mm: 62.94 # radius of curvature of the bowl
19+
dist_to_plane_mm: 52.38 # distance to the transducer plane from the geometric focus
20+
source_amp: 199270 # [Pa]
21+
source_phase_deg: [0, 300.544203, 308.222241, 283.413768] # source phase [deg]
22+
source_freq_hz: 250e3 # [Hz] the central frequency
23+
pos_t1_grid: [number, number, number]
24+
25+
focus_pos_t1_grid: [number, number, number]
26+
27+
expected_focal_distance_mm: 60.9 # expected distance to the stimulation focus
28+
transducer_from_localite: 0 # should we load the transducer locations from the localite file(s)
29+
30+
using_donders_hpc: 1 # are the simulations run on the HPC cluster?
31+
32+
run_posthoc_water_sims: 0
33+
run_heating_sims: 0
34+
35+
thermal:
36+
duty_cycle: 0.3 # share of the stimulation duration during which the stimulation is on [0 to 1] (trial length = duty_cycle * stim_duration)
37+
iti: 14 # [s] interval between the trials, from the start of one trial to the start of another
38+
n_trials: 60 # number of trials to simulate; the total simulated duration is then n_trials*iti seconds
39+
stim_duration: 1 # [s] stimulation duration within a trial
40+
# Pulse repetition frequency is not used since the cooling effects between these cycles are limited
41+
42+
# These should only be changed if they don't meet the criteria described in "run_heating_simulations"
43+
sim_time_steps: 0.01 # [s] simulation time steps during the stimulation period
44+
post_stim_time_step_dur: 0.1 # post-stimulation (inter-trial) steps
45+
on_off_step_duration: 0.1 # duration of the on+off cycle (e.g., with a duty cycle of 0.3 and 0.01 s time steps for simulation, the whole on+off cycle will take 0.1 s)
46+
equal_steps: 0 # is the duration of the simulation steps equal for on and off steps? if not, it is computed based on the sim_time_steps * n_steps where n_steps is the needed number of on and off steps derived from the duty cycle
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
data_path: /home/visual/andche/STAFF_SCI/andche_sandbox/Sjoerd_MRI/
2+
t1_path_template: MRI/sub-%1$03d/ses-mri01/anat/*T1w.nii.gz
3+
t2_path_template: MRI/sub-%1$03d/ses-mri01/anat/*T2w.nii.gz
4+
5+
transducer:
6+
n_elements: 4 # number of elements in the transducer
7+
Elements_ID_mm: [0, 32.9184, 46.1264, 56.0324]
8+
Elements_OD_mm: [32.3596, 45.5676, 55.5244, 64.008]
9+
curv_radius_mm: 63.20 # radius of curvature of the bowl
10+
dist_to_plane_mm: 52.38 # distance to the transducer plane from the geometric focus
11+
source_amp: 145103 # [Pa] (calibrated values at 20 W/cm^2 free-water Isppa)
12+
source_phase_deg: [0, 0, 358.0546, 272.2390] # source phase [deg] (calibrated values at 20 W/cm^2 free-water Isppa)
13+
source_freq_hz: 250e3 # [Hz] the central frequency
14+
15+
transducer_from_localite: 0 # should we load the transducer locations from the localite file(s)
16+
thermal:
17+
duty_cycle: 0.3 # share of the stimulation duration during which the stimulation is on
18+
on_off_step_duration: 0.1 # duration of the on+off cycle (e.g., with a duty cycle of 0.3 and 0.01 s time steps for simulation, the whole on+off cycle will take 0.1 s)
19+
equal_steps: 0 # is the duration of the simulation steps equal for on and off steps? if not, it is computed based on the sim_time_steps * n_steps where n_steps is the needed number of on and off steps derived from the duty cycle
20+
sim_time_steps: 0.01 # [s] simulation time steps during the stimulation period
21+
post_stim_time_step_dur: 0.1 # post-stimulation (inter-trial) steps
22+
stim_duration: 3 # [s] stimulation duration within a trial
23+
iti: 9 # interval between the trials, from the start of one trial to the start of another [s]
24+
n_trials: 4 # number of trials to simulate; the total simulated duration is then n_trials*iti seconds
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
data_path: /home/visual/andche/STAFF_SCI/andche_sandbox/Sjoerd_MRI/
2+
t1_path_template: MRI/sub-%1$03d/ses-mri01/anat/*T1w.nii.gz
3+
t2_path_template: MRI/sub-%1$03d/ses-mri01/anat/*T2w.nii.gz
4+
5+
transducer:
6+
n_elements: 4 # number of elements in the transducer
7+
Elements_ID_mm: [0, 32.9184, 46.1264, 56.0324]
8+
Elements_OD_mm: [32.3596, 45.5676, 55.5244, 64.008]
9+
curv_radius_mm: 63.20 # radius of curvature of the bowl
10+
dist_to_plane_mm: 52.38 # distance to the transducer plane from the geometric focus
11+
source_amp: 143805 # [Pa] (calibrated values at 30 W/cm^2 free-water Isppa)
12+
source_phase_deg: [0, 0, 332.8122, 264.4677] # source phase [deg] (calibrated values at 30 W/cm^2 free-water Isppa)
13+
source_freq_hz: 250e3 # [Hz] the central frequency
14+
15+
transducer_from_localite: 0 # should we load the transducer locations from the localite file(s)
16+
17+
thermal:
18+
duty_cycle: 0.3 # share of the stimulation duration during which the stimulation is on
19+
on_off_step_duration: 0.1 # duration of the on+off cycle (e.g., with a duty cycle of 0.3 and 0.01 s time steps for simulation, the whole on+off cycle will take 0.1 s)
20+
equal_steps: 0 # is the duration of the simulation steps equal for on and off steps? if not, it is computed based on the sim_time_steps * n_steps where n_steps is the needed number of on and off steps derived from the duty cycle
21+
sim_time_steps: 0.01 # [s] simulation time steps during the stimulation period
22+
post_stim_time_step_dur: 0.1 # post-stimulation (inter-trial) steps
23+
stim_duration: 3 # [s] stimulation duration within a trial
24+
iti: 9 # interval between the trials, from the start of one trial to the start of another [s]
25+
n_trials: 4 # number of trials to simulate; the total simulated duration is then n_trials*iti seconds
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
subject_subfolder: 1 # Should each participants output be stored in a separate folder?
2+
3+
t1_path_template: /*T1.nii.gz
4+
t2_path_template: /*T2.nii.gz
5+
6+
transducer:
7+
n_elements: 4 # number of elements in the transducer
8+
Elements_ID_mm: [0, 32.9184, 46.1264, 56.0324]
9+
Elements_OD_mm: [32.3596, 45.5676, 55.5244, 64.008]
10+
curv_radius_mm: 63.20 # radius of curvature of the bowl
11+
dist_to_plane_mm: 52.38 # distance to the transducer plane from the geometric focus
12+
source_amp: 143000 # [Pa] (143000 calibrated values at 30 W/cm^2 free-water Isppa, 166500 at 40 W/cm^2, 184200 for 50 W/cm^2)
13+
source_phase_deg: [0, 0, 358.0546, 272.2390] # source phase [deg] (calibrated values at 20 W/cm^2 free-water Isppa)
14+
source_freq_hz: 250e3 # [Hz] the central frequency
15+
16+
expected_focal_distance_mm: 64.5 # expected distance to the stimulation focus
17+
transducer_from_localite: 0 # should we load the transducer locations from the localite file(s)
18+
19+
using_donders_hpc: 1 # are the simulations run on the HPC cluster?
20+
21+
run_posthoc_water_sims: 1
22+
run_heating_sims: 1
23+
24+
medium:
25+
skull:
26+
alpha_0_true: 8
27+
28+
thermal:
29+
duty_cycle: 0.5 # share of the stimulation duration during which the stimulation is on
30+
sim_time_steps: 0.1 # [s] simulation time steps during the stimulation period
31+
temp_0: 37 #[deg C] initial temperature, currently not used
32+
stim_duration: 120 # [s] stimulation duration within a trial
33+
iti: 0 # interval between the trials, from the start of one trial to the start of another [s]
34+
n_trials: 1 # number of trials to simulate; the total simulated duration is then n_trials*iti seconds

0 commit comments

Comments
 (0)