pyVHR.utils package

Submodules

pyVHR.utils.ecg module

class pyVHR.utils.ecg.ECGsignal(data, fs, startTime=0)[source]

Bases: object

Manage ECG signals

getBPM(winsize=5)[source]

Compute the BPMs (ECG peaks) by biosppy library

Returns:

This method returns two variables: a list of BPMs and a list of times (each one correspond to the i-th BPM).

maxHz = 4.0
minHz = 0.75
nFFT = 16384
step = 1
verb = False

pyVHR.utils.elapse module

pyVHR.utils.elapse.tic(verb=True)[source]

tic like Matlab function

pyVHR.utils.elapse.toc(verb=True)[source]

toc like Matlab function

pyVHR.utils.errors module

pyVHR.utils.errors.LinCorr(bpmES, bpmGT, timesES=None, timesGT=None)[source]
pyVHR.utils.errors.MAEerror(bpmES, bpmGT, timesES=None, timesGT=None)[source]

MAE:

pyVHR.utils.errors.MAXError(bpmES, bpmGT, timesES=None, timesGT=None)[source]

MAE:

pyVHR.utils.errors.PearsonCorr(bpmES, bpmGT, timesES=None, timesGT=None)[source]
pyVHR.utils.errors.RMSEerror(bpmES, bpmGT, timesES=None, timesGT=None)[source]

RMSE:

pyVHR.utils.errors.bpm_diff(bpmES, bpmGT, timesES=None, timesGT=None)[source]
pyVHR.utils.errors.concordance_correlation_coefficient(bpm_true, bpm_pred)[source]
pyVHR.utils.errors.displayErrors(bpmES, bpmGT, timesES=None, timesGT=None)[source]
pyVHR.utils.errors.getErrors(bpmES, bpmGT, timesES, timesGT)[source]
pyVHR.utils.errors.printErrors(RMSE, MAE, MAX, PCC, CCC)[source]

pyVHR.utils.printutils module

pyVHR.utils.printutils.multiplot(x=None, y=None, name=None, zeroMean=True, title='Signal', height=400, width=800)[source]
pyVHR.utils.printutils.printProgressBar(iteration, total, prefix='', suffix='', decimals=1, length=100, fill='█', printEnd='\r')[source]

Call in a loop to create terminal progress bar @params:

iteration - Required : current iteration (Int) total - Required : total iterations (Int) prefix - Optional : prefix string (Str) suffix - Optional : suffix string (Str) decimals - Optional : positive number of decimals in percent complete (Int) length - Optional : character length of bar (Int) fill - Optional : bar fill character (Str) printEnd - Optional : end character (e.g. “

“, ” “) (Str)

Module contents