PySiology: A Python Package for Physiological Feature Extraction

  • Giulio GabrieliEmail author
  • Atiqah Azhari
  • Gianluca Esposito
Part of the Smart Innovation, Systems and Technologies book series (SIST, volume 151)


Physiological signals have been widely used to measure continuous data from the autonomic nervous system in the fields of computer science, psychology, and human–computer interaction. Signal processing and feature estimation of physiological measurements can be performed with several commercial tools. Unfortunately, those tools possess a steep learning curve and do not usually allow for complete customization of estimation parameters. For these reasons, we designed PySiology, an open-source package for the estimation of features from physiological signals, suitable for both novice and expert users. This package provides clear documentation of utilized methodology, guided functionalities for semi-automatic feature estimation, and options for extensive customization. In this article, a brief introduction to the features of the package, and to its design workflow, are presented. To demonstrate the usage of the package in a real-world context, an advanced example of image valence estimation from physiological measurements (ECG, EMG, and EDA) is described. Preliminary tests have shown high reliability of feature estimated using PySiology.


Physiology Signal processing Heart rate variability 


  1. 1.
    Wagner, J., Kim, J., André, E.: From physiological signals to emotions: implementing and comparing selected methods for feature extraction and classification. In: IEEE International Conference on Multimedia and Expo. ICME 2005, pp. 940–943. IEEE (2005)Google Scholar
  2. 2.
    Pitt, M.: The use of stimulated EMG in the diagnosis of neuromuscular junction abnormality. In: Pediatric Electromyography, pp. 123–136. Springer, Berlin (2017)CrossRefGoogle Scholar
  3. 3.
    Ahuja, N.D., Agarwal, A.K., Mahajan, N.M., Mehta, N.H., Kapadia, H.N.: GSR and HRV: its application in clinical diagnosis. In: 16th IEEE Symposium on Computer-Based Medical Systems, 2003. Proceedings, pp. 279–283. IEEE (2003)Google Scholar
  4. 4.
    Xun, L., Zheng, G.: ECG signal feature selection for emotion recognition. Indonesian J. Electr. Eng. Comput. Sci. 11(3), 1363–1370 (2013)Google Scholar
  5. 5.
    Esposito, G., Yoshida, S., Ohnishi, R., Tsuneoka, Y., del Carmen Rostagno, M., Yokota, S., Okabe, S., Kamiya, K., Hoshino, M., Shimizu, M., et al.: Infant calming responses during maternal carrying in humans and mice. Curr. Biol. 23(9), 739–745 (2013)CrossRefGoogle Scholar
  6. 6.
    Castroflorio, T., Bargellini, A., Rossini, G., Cugliari, G., Deregibus, A., Manfredini, D.: Agreement between clinical and portable EMG/ECG diagnosis of sleep bruxism. J. Oral Rehabil. 42(10), 759–764 (2015)CrossRefGoogle Scholar
  7. 7.
    Truzzi, A., Setoh, P., Shinohara, K., Esposito, G.: Physiological responses to dyadic interactions are influenced by neurotypical adults’ levels of autistic and empathy traits. Physiol. Behav. 165, 7–14 (2016)CrossRefGoogle Scholar
  8. 8.
    Truzzi, A., Bornstein, M.H., Senese, V.P., Shinohara, K., Setoh, P., Esposito, G.: Serotonin transporter gene polymorphisms and early parent-infant interactions are related to adult male heart rate response to female crying. Front. Physiol. 8, 111 (2017)CrossRefGoogle Scholar
  9. 9.
    Truzzi, A., Poquérusse, J., Setoh, P., Shinohara, K., Bornstein, M.H., Esposito, G.: Oxytocin receptor gene polymorphisms (rs53576) and early paternal care sensitize males to distressing female vocalizations. Dev. Psychobiol. 60(3), 333–339 (2018)CrossRefGoogle Scholar
  10. 10.
    Ray, G., Kaplan, A.Y., Jovanov, E.: Morphological variations in ECG during music-induced change in consciousness. In: Proceedings of the 19th Annual International Conference of the Engineering in Medicine and Biology Society, 1997, vol. 1, pp. 227–230. IEEE (1997)Google Scholar
  11. 11.
    de Jong, M.A.: A physiological approach to aesthetic preference—I. Paintings. Psychother. Psychosom. 20(6), 360–365 (1972)CrossRefGoogle Scholar
  12. 12.
    de Jong, M.A., Van Mourik, K., Schellekens, H.: A physiological approach to aesthetic preference. Psychother. Psychosom. 22(1), 46–51 (1973)CrossRefGoogle Scholar
  13. 13.
    Lang, P., Bradley, M.M.: The international affective picture system (IAPS) in the study of emotion and attention. In: Handbook of Emotion Elicitation and Assessment, 29 (2007)Google Scholar
  14. 14.
    Mauss, I.B., Levenson, R.W., McCarter, L., Wilhelm, F.H., Gross, J.J.: The tie that binds? coherence among emotion experience, behavior, and physiology. Emotion 5(2), 175 (2005)CrossRefGoogle Scholar
  15. 15.
    da Silva, H.P., Guerreiro, J., Lourenço, A., Fred, A.L., Martins, R.: Bitalino: a novel hardware framework for physiological computing. In: PhyCS, pp. 246–253. Citeseer (2014)Google Scholar
  16. 16.
    Esposito, G., Gabrieli, G.: Replication data for: pysiology: a python package for physiological feature extraction. Dataset Published on DR-NTU (Data) (2019).
  17. 17.
    Blood, J.D., Wu, J., Chaplin, T.M., Hommer, R., Vazquez, L., Rutherford, H.J., Mayes, L.C., Crowley, M.J.: The variable heart: high frequency and very low frequency correlates of depressive symptoms in children and adolescents. J. Affect. Disord. 186, 119–126 (2015)CrossRefGoogle Scholar

Copyright information

© Springer Nature Singapore Pte Ltd. 2020

Authors and Affiliations

  1. 1.Psychology Program, School of Social SciencesNanyang Technological UniversitySingaporeSingapore
  2. 2.Department of Psychology and Cognitive ScienceUniversity of TrentoTrentoItaly

Personalised recommendations