This toolbox provides computation methods for skin nerve activity (SKNA), which can be derived from electrocardiogram (ECG) signals collected under specific recording conditions.
pip install pysknaimport pandas as pd
from pyskna import extract_iSKNA, extract_TVSKNA
# Load EKG file
EKG = pd.read_csv("example_ekg.csv", header=None).to_numpy().reshape(-1)
# iSKNA computation
SKNA_dict = extract_iSKNA(input_ary=EKG, fs=4000, f_l=500, f_h=1000, smoothing_win_len=0.1)
# TVSKNA computation
TVSKNA_dict = extract_TVSKNA(input_ary=EKG, fs=4000, smoothing_win_len=0.1, thread_n=12)See test.py
Also see API.md
The extract_TVSKNA function uses VFCDM binaries, which has been tested with Python 3.11 on the following platforms:
- macOS (Apple Silicon / ARM64)
- Linux (x86_64)
- Windows (x86_64)
- macOS x86_64 (Intel) is expected to work, but has not been formally tested.
- 32-bit systems are not supported; the VFCDM library has only been compiled for 64-bit architectures.
The neuECG technique for computing iSKNA has been implemented based on the following paper:
Kusayama, T., Wong, J., Liu, X., He, W., Doytchinova, A., Robinson, E. A., ... & Chen, P. S. (2020).
Simultaneous noninvasive recording of electrocardiogram and skin sympathetic nerve activity (neuECG).
Nature Protocols, 15(5), 1853–1877.
If you use TVSKNA for 4kHz sampling frequency. Please cite the following paper:
-
For 4 kHz sampling:
Kong, Y., Baghestani, F., D'Angelo, W., Chen, I. P., & Chon, K. H. (2025).
A New Approach to Characterize Dynamics of ECG-Derived Skin Nerve Activity via Time-Varying Spectral Analysis.
IEEE Transactions on Affective Computing. -
For 500 and 1000 Hz sampling:
Kong, Y., Baghestani, F., D'Angelo, W., Chen, I. P., & Chon, K. H. (2025).
A New Approach to Characterize Dynamics of ECG-Derived Skin Nerve Activity via Time-Varying Spectral Analysis.
IEEE Transactions on Affective Computing.Kong, Y., Baghestani, F., Chen, I. P., & Chon, K. H. (2025).
Feasibility of Extracting Skin Nerve Activity from Electrocardiogram Recorded at a Low Sampling Frequency.
arXiv preprint, arXiv:2508.00494. https://doi.org/10.48550/arXiv.2508.00494
Some functions (e.g., process_tvskna) in this library interface with the VFCDM algorithm covered by
U.S. Patent No. US8858450B2, owned by Ki Chon, Ph.D. and Kihwan Ju, Ph.D.
(Assignee: Research Foundation of the State University of New York).
By using VFCDM‑related functions (e.g., process_tvskna) in PySKNA, you agree to the
LICENSE.md and PATENT_NOTICE.md provided in the VFCDM Binaries repository, solely for non-commercial, academic, and research use.
Please see the PySKNA LICENSE.md for more details.
Commercial use of the patented components requires a separate license.
For patent‑related inquiries, contact [email protected].
For all other matters, contact [email protected].
If you use this library in your research and publish your results, please cite it as follows:
APA 7th: Kong, Y. (2025). pySKNA (Version 0.1.0) [Computer software]. GitHub. https://github.com/ykong-phd/pyskna
IEEE: Y. Kong, pySKNA, Version 0.1.0, GitHub repository, 2025. [Online]. Available: https://github.com/ykong-phd/pyskna