Comments (3)
Hi Yurasmol,
What sampling rate is the attached file recorded at? It's so noisy that I'm having issues seeing where the heart rate signal is.
Let me know and I'll see what I can do with some filtering. I'll also add error handling for this case.
Cheers,
Paul
from heartrate_analysis_python.
from heartrate_analysis_python.
Hi Yurasmol,
Please pull the latest version. I've introduced custom exception handling to remedy your issue and make the error more verbose. These situations now trigger a UserWarning BadSignalWarning
.
Note that you still need to catch any warnings and exceptions if you want execution to continue. Consider an example using 'data.csv' from the repo (sampled at 100Hz):
import heartpy as hp
if __name__ == '__main__':
#Let's simulate empty valid_ma during iteration flow example
#by setting bpmmax to 40 (real is 58.92)
bpmmax = [60, 40, 130]
data = hp.get_data('data.csv')
for i in bpmmax:
print(i)
try:
wd, measures = hp.process(data, 100.0, bpmmax=i)
except hp.exceptions.BadSignalWarning as w:
print(w) #display message
pass #or just pass over it if you want
Note the above example steps over the UserWarning BadSignalWarning
but will fail on any other exception. You'd need to catch that separately.
Lastly the non-inheritance of bpmmin and bpmmax has been fixed. Thanks for catching that!
I'll have a look at the other issue later in the week as I'm on holidays now so my time is limited.
Cheers,
Paul
from heartrate_analysis_python.
Related Issues (20)
- versioning doesn't match
- AttributeError: module 'HeartPy' has no attribute 'calc_fd_measures' HOT 1
- Why cutoff=0.05Hz in remove_baseline_wander()? HOT 2
- Peak detection fails for high DC levels HOT 2
- Input raw PPG data clarification in example 3
- Using plotter in Anaconda's JupyterLab gives non-GUI backend UserWarning
- questions abouts calc_fd_measures
- Identify abnormally elevated T waves as R waves HOT 1
- Calling hp.plotter(wd, m) in Jupyter Notebook gives UserWarning HOT 1
- return param 'best' in working_data is what?
- hampel_filter filtsize doesn't work as expected/intended.
- What "s" stand for? HOT 2
- customize frequency bands for frequency-based analysis? HOT 2
- PPG input file (array) what information or data ? HOT 3
- heart rate from six leads ecg
- issue with reject_segmentwise argument inside "hp.process" function
- TypeError: 'numpy.float64' object cannot be interpreted as an integer
- Docs Error in heartrateanalysis.rst HOT 1
- hp.plotter crashes HOT 3
- Process_segmentwise ignore_badsignalwarning=True causes an array size mismatch HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from heartrate_analysis_python.