-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
22 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,20 @@ | ||
# Transcranial Temporal Interference Stimulation | ||
# Description | ||
|
||
This project is part of the Bachelor thesis during the studies at the Physics Department of the Aristotle University of Thessaloniki, Greece. | ||
In the code folder, the main software can be found. The folder contains the Core part which implements the meshing and solution for all models. The Scripts folder contains all the necessary scripts to produce a solved model and most of these scripts call functions from the Core folder. | ||
|
||
## Short description | ||
The scripts, included in the unanimous folder, are named based on the stage at which they are used and this naming follows the pattern of `[Stage-Name]_Short_Description`. | ||
|
||
Simulations of the temporally interfering electric field distribution are conducted on the human brain using a _Simple Anthropomorphic model_ **(SAM)** and realistic brain models from the [PHM](https://itis.swiss/virtual-population/regional-human-models/phm-repository/) repository. The different material conductivities are drawn from the [IT'IS Virtual Population Tissue Properties](https://itis.swiss/virtual-population/tissue-properties/database/low-frequency-conductivity/) or from different papers, referenced accordingly. | ||
## Short explanation of the pipeline | ||
|
||
## Further Information | ||
For a detailed explanation of the software and the pipeline [check here](http://dx.doi.org/10.13140/RG.2.2.20020.99202). | ||
|
||
In this repository there [is a Wiki](https://gitlab.com/dimst23/tacs-temporal-interference/-/wikis/0.-Home) in which you can find detailed information about the code and the approaches taken to solve the problems. | ||
* At first the electrode positions for the desired models have to be calculated using [Mesh2EEG](https://engineering.dartmouth.edu/multimodal/mesh2eeg.html), producing a file which contains the electrode names and their corresponding position for the particular model. | ||
* Before doing any mesh manipulation work (including meshing the model), it is suggested to run all meshes through [MeshFix](https://github.com/MarcoAttene/MeshFix-V2.1), thus avoiding any errors during the next steps. An automation script for MeshFix can be found in the _Utilities_ folder, named `mesh_fixing.py`. | ||
* The next step is to add the electrodes on the skin surface for each model. This is done using the `[Meshing]_Model_POLY.py` script, generating a `.poly` file to be used later by TetGen. | ||
* After the successful generation of the `.poly` file(s) for the desired model(s), [TetGen](https://wias-berlin.de/software/index.jsp?id=TetGen) has to be called for each model. A utility script can be found in the _Utilities_ folder, named `tetgen_meshing.sh`. | ||
* Having the tetrahedralized meshes, the next step is to solve the models. A script solving all models for all electrode combinations using one electrode as a reference, is provided in the script named `[Solution]_Electrode_Combinations.py`. The solver part of the code can be adapted to solve only one model, selecting the desired electrode pairs and injection currents. | ||
* With all models solved the optimizer can run. The script named `[Optimization]_Gentic_Algorithm.py` contains the genetic algorithm and the corresponding settings required for running the optimizer. | ||
* The results of the optimization include the objective function value and the optimized electrode pairs. To save the currents that optimized the electrode pairs, the scripts named `[Post-process]_Result_Validation.py` and located in `Data Analysis` has to be called. | ||
*Lastly, all scripts found in the `Nifti Operations` folder are used in the Nifti generation and manipulations, after all the above have been successfully completed. | ||
|
||
## Structure of the Repository | ||
|
||
* [CAD/](/CAD) | ||
* [SAM/](/CAD/SAM) | ||
* [Sphere/](/CAD/Sphere) | ||
* [spheres_brain.stl](/CAD/Sphere/spheres_brain.stl) | ||
* [spheres_csf.stl](/CAD/Sphere/spheres_csf.stl) | ||
* [spheres_outer.stl](/CAD/Sphere/spheres_outer.stl) | ||
* [spheres_skin.stl](/CAD/Sphere/spheres_skin.stl) | ||
* [spheres_skull.stl](/CAD/Sphere/spheres_skull.stl) | ||
* [Jupyter Notebooks/](/Jupyter Notebooks) | ||
* [Test Bench/](/Jupyter Notebooks/Test Bench) | ||
* [modulation_envelope_tests.ipynb](/Jupyter Notebooks/Test Bench/modulation_envelope_tests.ipynb) | ||
* [README.md](/Jupyter Notebooks/Test Bench/README.md) | ||
* [fem_simulation_analysis.ipynb](/Jupyter Notebooks/fem_simulation_analysis.ipynb) | ||
* [modulation_envelope.ipynb](/Jupyter Notebooks/modulation_envelope.ipynb) | ||
* [sim_analysis.ipynb](/Jupyter Notebooks/sim_analysis.ipynb) | ||
* [MATLAB Workspaces and Scripts/](/MATLAB Workspaces and Scripts) | ||
* [Workspaces/](/MATLAB Workspaces and Scripts/Workspaces) | ||
* [BaseFrequency4Layer_Smaller.mat](/MATLAB Workspaces and Scripts/Workspaces/BaseFrequency4Layer_Smaller.mat) | ||
* [DeltaFrequency4Layer_Smaller.mat](/MATLAB Workspaces and Scripts/Workspaces/DeltaFrequency4Layer_Smaller.mat) | ||
* [arrange_elements.m](/MATLAB Workspaces and Scripts/arrange_elements.m) | ||
* [grid_points.m](/MATLAB Workspaces and Scripts/grid_points.m) | ||
* [Scripts/](/Scripts) | ||
* [Archive/](/Scripts/Archive) | ||
* [FEM.py](/Scripts/Archive/FEM.py) | ||
* [meshing.py](/Scripts/Archive/meshing.py) | ||
* [simple.py](/Scripts/Archive/simple.py) | ||
* [simple_meshing.py](/Scripts/Archive/simple_meshing.py) | ||
* [FEM/](/Scripts/FEM) | ||
* [Good Files/](/Scripts/FEM/Good Files) | ||
* [real_head.py](/Scripts/FEM/real_head.py) | ||
* [real_head_10-20.py](/Scripts/FEM/real_head_10-20.py) | ||
* [sim_settings.yml](/Scripts/FEM/sim_settings.yml) | ||
* [sphere.py](/Scripts/FEM/sphere.py) | ||
* [GMSH/](/Scripts/GMSH) | ||
* [spheres.geo](/Scripts/GMSH/spheres.geo) | ||
* [Meshing/](/Scripts/Meshing) | ||
* [electrode_operations.py](/Scripts/Meshing/electrode_operations.py) | ||
* [gmsh_write.py](/Scripts/Meshing/gmsh_write.py) | ||
* [mesh_operations.py](/Scripts/Meshing/mesh_operations.py) | ||
* [modulation_envelope.py](/Scripts/Meshing/modulation_envelope.py) | ||
* [phm_model_meshing.py](/Scripts/Meshing/phm_model_meshing.py) | ||
* [Utils/](/Scripts/Utils) | ||
* [mesh_fixing.py](/Scripts/Utils/mesh_fixing.py) | ||
* [10-20_elec.mat](/Scripts/10-20_elec.mat) | ||
* [main.py](/Scripts/main.py) | ||
* [sphere_meshing.py](/Scripts/sphere_meshing.py) | ||
* [LICENSE](/LICENSE) | ||
* [README.md](/README.md) | ||
In some scripts included in the pipeline described above, the `sim_settings.yml` file is used. This file serves as a settings container for the electrode names and indices, as well as the mesh location and the output directory of the solver. |