pyempatica

Python wrapper for Empatica TCP client, allowing bidirectional communication with an Empatica E4.

https://github.com/munroe-meyer-institute-vr-laboratory/pyempatica

Science Score: 52.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
    Organization munroe-meyer-institute-vr-laboratory has institutional domain (www.unmc.edu)
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.8%) to scientific vocabulary

Keywords

data-collection empatica empatica-e4
Last synced: 6 months ago · JSON representation ·

Repository

Python wrapper for Empatica TCP client, allowing bidirectional communication with an Empatica E4.

Basic Info
  • Host: GitHub
  • Owner: Munroe-Meyer-Institute-VR-Laboratory
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 110 KB
Statistics
  • Stars: 4
  • Watchers: 1
  • Forks: 1
  • Open Issues: 1
  • Releases: 0
Topics
data-collection empatica empatica-e4
Created over 4 years ago · Last pushed almost 3 years ago
Metadata Files
Readme License Citation

README.md

pyEmpatica

Parties Involved

Institution: Munroe Meyer Institute in the University of Nebraska Medical Center
Laboratory: Virtual Reality Laboratory
Advisor: Dr. James Gehringer
Developer: Walker Arce

Motivation

This Python library was written to facilitate biometric data collection from an Empatica E4. It also includes windowed sample collection, threaded error handling, and on-wrist detection.

Installation

This library is available for installation over pip using: pip install pyEmpatica

For developers, clone this repository, cd into the directory using either your virtual environment or your local environment, and run: python setup.py install

To actually utilize this library the Empatica Streaming Server is required, meaning this library is only compatible with Windows systems.

Usage

As of version 1.0.3 of the E4 Streaming Server, it seems there are issues with connecting the Empatica E4 for data collection. Follow this workaround to alleviate this issue.

``` from pyempatica import EmpaticaClient, EmpaticaE4, EmpaticaDataStreams, EmpaticaServerConnectError import time

try: client = EmpaticaClient() print("Connected to E4 Streaming Server...") client.listconnecteddevices() print("Listing E4 devices...") time.sleep(1) if len(client.devicelist) != 0: e4 = EmpaticaE4(client.devicelist[0]) if e4.connected: print("Connected to", str(client.devicelist[0]), "device...") for stream in EmpaticaDataStreams.ALLSTREAMS: e4.subscribetostream(stream) print("Subscribed to all streams, starting streaming...") e4.startstreaming() for i in range(0, 10): time.sleep(1) if not e4.onwrist: print("E4 is not on wrist, please put it on!") if e4.client.lasterror: print("Error encountered:", e4.client.lasterror) break e4.suspendstreaming() e4.disconnect() e4.close() print("E4 Errors") for key in e4.client.errors: print("\t", key, ":", e4.client.errors[key]) print("E4 connection closed, saving readings...") e4.savereadings("readings.txt") print("Readings saved to readings.txt...") else: print("Could not connect to Empatica E4:", client.device_list[0]) client.close() print("Cleaning up connections...") except EmpaticaServerConnectError: print("Failed to connect to server, check that the E4 Streaming Server is open and connected to the BLE dongle.")

```

Before running this script, ensure the Empatica Streaming Server is up and running. This library is currently only compatible with Windows due to the Streaming Server dependency.

Citation

@misc{Arce_pyEmpatica_2021, author = {Arce, Walker and Gehringer, James}, month = {8}, title = {{pyEmpatica}}, url = {https://github.com/Munroe-Meyer-Institute-VR-Laboratory/pyEmpatica}, year = {2021} }

Owner

  • Name: Munroe Meyer Institute Virtual Reality Laboratory
  • Login: Munroe-Meyer-Institute-VR-Laboratory
  • Kind: organization

The Virtual Reality Laboratory is researching how cutting-edge virtual reality technology can be applied to help our patients.

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Arce"
  given-names: "Walker"
  orcid: "https://orcid.org/0000-0003-0819-0710"
- family-names: "Gehringer"
  given-names: "James"
  orcid: "https://orcid.org/0000-0003-3457-2288"
title: "pyEmpatica"
version: v0.5.7
date-released: 2021-08-22
url: "https://github.com/Munroe-Meyer-Institute-VR-Laboratory/pyEmpatica"

GitHub Events

Total
Last Year

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 44
  • Total Committers: 1
  • Avg Commits per committer: 44.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Walker Arce w****a@g****m 44

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 2
  • Total pull requests: 0
  • Average time to close issues: 21 days
  • Average time to close pull requests: N/A
  • Total issue authors: 2
  • Total pull request authors: 0
  • Average comments per issue: 3.5
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • gjolde (1)
  • UtharaKeerthan (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 60 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 5
  • Total maintainers: 1
pypi.org: pyempatica

Communicate with your Empatica E4 in your Python scripts.

  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 60 Last month
Rankings
Dependent packages count: 10.1%
Average: 21.0%
Dependent repos count: 21.6%
Forks count: 22.7%
Stargazers count: 23.1%
Downloads: 27.3%
Maintainers (1)
Last synced: 6 months ago

Dependencies

requirements.txt pypi
  • setuptools *
setup.py pypi