CallibriECG 1.0.4

dotnet add package CallibriECG --version 1.0.4
NuGet\Install-Package CallibriECG -Version 1.0.4
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CallibriECG" Version="1.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CallibriECG --version 1.0.4
#r "nuget: CallibriECG, 1.0.4"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install CallibriECG as a Cake Addin
#addin nuget:?package=CallibriECG&version=1.0.4

// Install CallibriECG as a Cake Tool
#tool nuget:?package=CallibriECG&version=1.0.4

Mathematical library for working with ECG data from the Callibri sensor.

The main functionality is the calculation of cardio-interval lengths, heart rate and Stress Index (SI).

During the first 6 seconds the algorithm is learning, if no 5 RR-intervals are found in the signal 5 RR-intervals are not found, the training is repeated. Further work with the library is iterative (adding new data, calculating indicators).

Initialization

Determine the basic parameters

  1. Raw signal sampling frequency. Integer type. The allowed values are 250 or 1000.
  2. Data processing window size. Integer type. Valid values of sampling_rate / 4 or sampling_rate / 2.
  3. Number of windows to calculate SI. Integer type. Allowable values [20...50].
  4. The averaging parameter of the IN calculation. Default value is 6.

Creating a library instance

Firstly you need to determine lybrary parameters and then put them to library. Tne next step is initialize the filters. In the current version the filters are built-in and clearly defined: Butterworth 2nd order BandPass 5_15 Hz.

You can initialize averaging for SI calculation. It is optional value.

C#
// 1. Raw signal sampling frequency
int samplingRate = 250;
// 2. Data processing window size
int dataWindow = samplingRate / 2;
// 3. Number of windows to calculate SI
int nwinsForPressureIndex = 30;

CallibriMath math = new CallibriMath(samplingRate, dataWindow, nwinsForPressureIndex);
// Filters are initialized into the constructor

// optional
// 4. The averaging parameter of the IN calculation. Default value is 6.
int pressureIndexAverage = 6;
math.SetPressureAverage(pressureIndexAverage);

Initializing a data array for transfer to the library:

The size of the transmitted array has to be of a certain length:

  • 25 values for a signal frequency of 250 Hz
  • 100 values for a signal frequency of 1000 Hz
C#
double[] rawData = new double[25];
// or
double[] rawData = new double[100];

Optional functions (not necessary for the library to work)

Check for initial signal corruption:

C#
if(math.InitialSignalCorrupted()){
    // Signal corrupted!!!
}

Work with the library

  1. Adding and process data:
C#
math.PushData(samples);
  1. Getting the results:
C#
if (math.RRdetected)
// check for a new peak in the signal
{               
    // RR-interval length
    double rr = math.RR;
    // HR     
    double hr = math.HR;
    // SI
    double pi = math.PressureIndex;
    // Moda
    double moda = math.Moda;
    // Amplitude of mode
    double amplModa = math.AmplModa;
    // Variation range
    double variationDist = math.VariationDist;
    math.SetRRchecked();	
}

Finishing work with the library:

C#
math.Dispose();
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed.  monoandroid50 is compatible. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Universal Windows Platform uap was computed.  uap10.0 is compatible. 
Xamarin.iOS xamarinios was computed.  xamarinios10 is compatible. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.
  • MonoAndroid 5.0

    • No dependencies.
  • UAP 10.0

    • No dependencies.
  • Xamarin.iOS 1.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.4 158 6/9/2023