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
Metadata
Release files for pyNIBS 0.2026.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pynibs-0.2026.1.tar.gz | 1.6 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pynibs-0.2026.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.1 MB
Release files / pynibs-0.2026.1.tar.gz
| Download URL | pynibs-0.2026.1.tar.gz |
|---|---|
| Size | 1.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd386a71ea75e0074d88e807450aa675ca737478967e85091c3603b3c7d3aeee
|
|
BLAKE2b-256 checksum How to use checksums |
e70eedea6d6b19e2f8beb994d124db438b8920db3b07d5f66891ab3cb28a12d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / pynibs-0.2026.1-py3-none-any.whl
| Download URL | pynibs-0.2026.1-py3-none-any.whl |
|---|---|
| Size | 1.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5cedaddaa7a8ac297cdbc94d57eae44c66785ad5d3848e7d86152e94f1497bc1
|
|
BLAKE2b-256 checksum How to use checksums |
23c2f499cc8ce2016ec0d2e748f87e75c9320e4ea2b5f0e860b7733c0068fac4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Security for pyNIBS 0.2026.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.