Git Product home page Git Product logo

repose's Issues

Parsing EDF error

Opening an issue and trying to fix error as I go along:

This is run in a venv with python: Python 3.10.5
File magic: 10-15-00.EDF: Biosig/EDF: European Data format

$ python repose.py

Reading: /Users/steve/Downloads/edf/10-15-00.EDF
Traceback (most recent call last):
  File "/Users/steve/Downloads/edf/repose.py", line 217, in <module>
    main()
  File "/Users/steve/Downloads/edf/repose.py", line 188, in main
    ecg, acc, sample_rate = get_data(pathname, filename)
  File "/Users/steve/Downloads/edf/repose.py", line 49, in get_data
    ecg_timestamp = [start_date +
  File "/Users/steve/Downloads/edf/repose.py", line 50, in <listcomp>
    datetime.timedelta(microseconds=1./sample_rate['ECG']*n*1e6)
KeyError: 'ECG'

Trying with repose_v1.2.py:

$ python repose_v1.2.py
Reading: /Users/steve/Downloads/edf/10-15-00.EDF
Sample rates: {'ECG_1': 250.0, 'ECG_2': 250.0, 'ECG_3': 250.0, 'Accelerometer_X': 25.0, 'Accelerometer_Y': 25.0, 'Accelerometer_Z': 25.0, 'Marker': 1.0, 'HRV': 5.0}
Recording start: Fri Dec 23 10:15:00 2022
Recording end:   Sat Dec 24 11:44:36 2022
Working...  *** WORKING VERSION ***
/Users/steve/Downloads/edf/repose_v1.2.py:118: FutureWarning: pad is deprecated and will be removed in a future version. Use ffill instead.
  hr = hr.resample('S').pad()
Traceback (most recent call last):
  File "/Users/steve/Downloads/edf/repose_v1.2.py", line 229, in <module>
    main()
  File "/Users/steve/Downloads/edf/repose_v1.2.py", line 205, in main
    rr = calculate_rr(acc, sample_rate, window_length=120, calc_every=5) # <- *
  File "/Users/steve/Downloads/edf/repose_v1.2.py", line 141, in calculate_rr
    for i in range(0, len(acc_tot)-rr_win,
TypeError: 'numpy.float64' object cannot be interpreted as an integer

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.