Comments (1)
Hi @cogitoxin,
thanks for using pyHRV!
I have caught the issue which was causing an error in the warning and error descriptions which this functions generates, which eventually (and ironically) was triggering this error.
This will be fixed with the next update, but if you want to go ahead and copy paste the corrected version of this function, feel free to use this one:
def _check_limits(interval, name):
"""Checks if interval limits are not overlapping or equal.
Parameters
----------
interval : array, 2-element
Interval boundaries [min, max].
name : str
Variable name to be used on exceptions and warnings.
Returns
-------
interval : array, 2-element
Valid and corrected interval limits (if correction is necessary).
Raises
------
ValueError
If interval limits are equal.
Warnings
--------
.. If limits are overlapping (e.g. lower limit > upper limit) and had to be fixed.
"""
# upper limit < 0 or upper limit > max interval -> set upper limit to max
if interval[0] > interval[1]:
interval[0], interval[1] = interval[1], interval[0]
warnings.warn("The provided lower limit of the parameter '%s' is greater than the upper limit. Limits have been switched." % name)
if interval[0] == interval[1]:
raise ValueError("The provided lower and upper limits of the parameter '%s' are invalid as they are identical." % name)
return interval
from pyhrv.
Related Issues (20)
- Verifying pyHRV against Kubios
- welch_psd() generates figure even if show = False HOT 2
- frequency domain comparison with Kubios Standard HOT 1
- Samples folder contains no files HOT 1
- LSL/XDF data to PyHRV HOT 1
- Big error in quickstart documentation HOT 1
- pyhrv.hrv doest stop plotting HOT 2
- having issue to run overall code in colab and also in jupyter notebook? HOT 1
- Can't build pyhrv wheel on Windows 10 HOT 2
- Comparison between pyHRV and medilog DARWIN2
- failed with python3 setup.py install on Ubuntu 22.04
- Suggested value of window width and overalpping rate of Welch's periodogram for 5 minutes of HRV
- failed to use frequency_domain.frequency_domain() function
- Cannot install pyHRV on Ubuntu 22.04
- How do I add more plots to the current figure created by pyHRV
- Setting fbands without ulf crashes the welch method
- Issue with frequency domain
- SD1/SD2 calculation not based on distances
- nonlinear.py: AttributeError: module 'biosppy' has no attribute 'utils'
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 pyhrv.