A python toolbox to conduct non-invasive brain stimulation (NIBS) experiments.
Project description
pyNIBS
Preprocessing, postprocessing, and analyses routines for non-invasive brain stimulation experiments.
pyNIBS provides the functions to allow cortical mappings with transcranial magnetic stimulation (TMS) via functional analysis. pyNIBS is developed to work with SimNIBS, i.e. SimNIBS' meshes and FEM results can directly be used.
Currently, SimNIBS >=4.0 is supported.
See the documentation for package details and our protocol publication for a extensive usage examples. Free view only version of the paper: https://t.co/uv7CmVw6tp.
Installation
Via PiP:
pip install pynibs
Or clone the source repository and install the development branch for the most recent version:
git clone https://gitlab.gwdg.de/tms-localization/pynibs
cd pynibs
git checkout dev
pip install -e .
See here for more detailed installation instructions.
To import CED Signal EMG data use the export to .mat feature of Signal.
To read .cfs files exported with CED Signal you might need to manually compile the libbiosig package.
Bugs
For sure. Please open an issue or feel free to file a PR.
Citation
Please cite Numssen, O., Zier, A. L., Thielscher, A., Hartwigsen, G., Knösche, T. R., & Weise, K. (2021). Efficient high-resolution TMS mapping of the human motor cortex by nonlinear regression. NeuroImage, 245, 118654. doi:10.1016/j.neuroimage.2021.118654 when using this toolbox in your research.
References
- Weise*, K., Numssen*, O., Thielscher, A., Hartwigsen, G., & Knösche, T. R. (2020). A novel approach to localize cortical TMS effects. NeuroImage, 209, 116486. doi: 10.1016/j.neuroimage.2019.116486
- Numssen, O., Zier, A. L., Thielscher, A., Hartwigsen, G., Knösche, T. R., & Weise, K. (2021). Efficient high-resolution TMS mapping of the human motor cortex by nonlinear regression. NeuroImage, 245, 118654. doi: 10.1016/j.neuroimage.2021.118654
- Weise*, K., Numssen*, O., Kalloch, B., Zier, A. L., Thielscher, A., Hartwigsen°, G., Knösche°, T. R. (2023). Precise transcranial magnetic stimulation motor-mapping. Nature Protocols. doi: 10.1038/s41596-022-00776-6
- Jing, Y., Numssen, O., Weise, K., Kalloch, B., Buchberger, L., Haueisen, J., Hartwigsen, G., Knösche, T. (2023). Modeling the Effects of Transcranial Magnetic Stimulation on Spatial Attention. Physics in Medicine & Biology. doi: 10.1088/1361-6560/acff34
- Numssen*, O., Kuhnke*, P., Weise, K., & Hartwigsen, G. (2024). Electric field based dosing for TMS. Imaging Neuroscience. doi: 10.1162/imag_a_00106
- Numssen, O., Martin, S., Williams, K., Knösche, T. R., & Hartwigsen, G. (2024). Quantification of subject motion during TMS via pulsewise coil displacement. Brain Stimulation, 17(5), 1045–1047. doi: 10.1016/j.brs.2024.08.009
- Weise, K., Makaroff, S. N., Numssen, O., Bikson, M., & Knösche, T. R. (2025). Statistical method accounts for microscopic electric field distortions around neurons when simulating activation thresholds. Brain Stimulation, 18(2), 280–286. doi: 10.1016/j.brs.2025.02.007
- Jing, Y., Numssen, O., Hartwigsen, G., Knösche, T. R., & Weise, K. (2024). Effects of Electric Field Direction on TMS-based Motor Cortex Mapping. bioRxiv. doi: 10.1101/2024.12.10.627753
- Numssen*, O., Martin*, C. W., Worbs, T., Thielscher, A., Weise, K., & Knösche, T. R. (2025). Optimizing and assessing multichannel TMS focality. bioRxiv. doi: 10.1101/2025.09.19.677136
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pynibs-0.2026.1.tar.gz.
File metadata
- Download URL: pynibs-0.2026.1.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd386a71ea75e0074d88e807450aa675ca737478967e85091c3603b3c7d3aeee
|
|
| MD5 |
320cc2f57e470892b3dd2658f59491af
|
|
| BLAKE2b-256 |
e70eedea6d6b19e2f8beb994d124db438b8920db3b07d5f66891ab3cb28a12d7
|
File details
Details for the file pynibs-0.2026.1-py3-none-any.whl.
File metadata
- Download URL: pynibs-0.2026.1-py3-none-any.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cedaddaa7a8ac297cdbc94d57eae44c66785ad5d3848e7d86152e94f1497bc1
|
|
| MD5 |
96ea6460fd1169191a451cfd78bbe708
|
|
| BLAKE2b-256 |
23c2f499cc8ce2016ec0d2e748f87e75c9320e4ea2b5f0e860b7733c0068fac4
|