We provided an OPA-building pipeline for the optimal coil pose and the data from the simulation results are openly available in Science Data Bank
- Function1: Coil Pose Conversion Tool
- Function2: Coil Pose mapping tool
- Install and create a python environment, such as conda
- To install the dependency library, see requirements.txt
- Convert HAC coil coordinate system to MNI coordinate system inferior pose
cd ./TMS_OPA
python ./tms_convert.py -p {a} {b}- MNI coordinates of the position of the center point of the coil
- Statistical analysis of simulation results to generate group coil pose mapping
- The subject of the simulation results and the directory where the results are stored
- Modify the corresponding content in the file
analysis_config.py - Example:
subjectnum_result = [ { 'subject': '003', # The first subject 'simu_result_path': 'simu_result20201226232724_21443' # Corresponding simulation results catalog }, { 'subject': '004', 'simu_result_path': 'simu_result20210124015948_33635' } ]
- Modify the corresponding content in the file
- Evaluation index parameters
- Modify the contents of the file
analysis_config.pyaccordingly, see the comments for details
- Modify the contents of the file
- Objective function
- Modify the corresponding content in the file
tms_evaluation.py - Example:
# func(x) = 3.0/resultA_x + 1.0 / resultB_B2/B1_x func = lambda all_csv, area_index : 3.0 / all_csv['resultA_' + str(area_index)] + 1.0 / all_csv['resultB_B2/B1_' + str(area_index)]
- Modify the corresponding content in the file
- Modify dataPath
- Modify the path where the file data file is located
May take longer for statistical analysis
cd ./TMS_OPA
python ./tms_opa.py -o {path_to_save_result}If you use TMS_OPA in an academic work, please cite:
@article{TMS_OPA,
title={Stimulation Effects Mapping for Optimal Coil Pose Atlas of Transcranial Magnetic Stimulation},
author={Gangliang Zhong, Liang Ma, Yongfeng Yang, Baogui Zhang, Xuefeng Lu, Dan Cao, Jin Li, Nianming Zuo, Lingzhong Fan, Zhengyi Yang, Tianzi Jiang},
journal={under review},
volume={under review},
number={under review},
pages={under review},
year={2022}
}