# Path: signalz/misc.py
# def check_type_or_raise(obj, expected_type, obj_name):
#     """
#     This fuction raises error if the object does not have expected type.
#     """
#     if not isinstance(obj, expected_type):
#         raise TypeError(
#             "'{}' must be {}, not {}".format(
#                 obj_name,
#                 expected_type.__name__,
#                 obj.__class__.__name__)
#             )
# 
# def ode45(f, t, x0, *args):
#     """
#     4th Order Runge-Kutta method
#     """
#     n = len(t)
#     x = np.zeros((n, len(x0)))
#     x[0] = x0
#     for i in range(n-1):
#         dt = t[i+1] - t[i] 
#         x[i+1] = ode45_step(f, x[i], t[i], dt, *args)
#     return x
# 
# def rem(a, b):
#     """
#     Reminder estimation function (estimates reminder in different way
#     than it is default in Pyton).
#     """
#     q = abs(a) % b
#     s = np.sign(a)
#     return q*s


import numpy as np
from signalz.misc import check_type_or_raise, ode45, rem

    Kwargs:

    * `sfecg` : ECG sampling frequency (int), it Hz

    * `N` : approaximate number of heart beats (int)

    * `hrmean` : mean heart rate (float) in beats per minute

    * `hrstd` : standard deviation of heart rate (float) in beats per minute

    * 'lfhfration : LF/HF ratio (float)

    * `sfint` : internal sampling frequency (int) in Hz

    * `ti` : angles of PQRST extrema (1d array of size 5) in degrees

    * `ai` : z-position of PQRST extrema (1d array of size 5)

    * `bi` : Gaussian width of peaks (1d array of size 5)
        
    Returns:

    * `x` : ECG values in mV
    
    * `peaks`: labels for PQRST peaks (P=1, Q=2, R=3, S=4, T=5 and 0 elsewhere)
    
    """
    # check data types
    check_type_or_raise(sfecg, int, "sfecg")

# Path: signalz/misc.py
# def check_type_or_raise(obj, expected_type, obj_name):
#     """
#     This fuction raises error if the object does not have expected type.
#     """
#     if not isinstance(obj, expected_type):
#         raise TypeError(
#             "'{}' must be {}, not {}".format(
#                 obj_name,
#                 expected_type.__name__,
#                 obj.__class__.__name__)
#             )
# 
# def ode45(f, t, x0, *args):
#     """
#     4th Order Runge-Kutta method
#     """
#     n = len(t)
#     x = np.zeros((n, len(x0)))
#     x[0] = x0
#     for i in range(n-1):
#         dt = t[i+1] - t[i] 
#         x[i+1] = ode45_step(f, x[i], t[i], dt, *args)
#     return x
# 
# def rem(a, b):
#     """
#     Reminder estimation function (estimates reminder in different way
#     than it is default in Pyton).
#     """
#     q = abs(a) % b
#     s = np.sign(a)
#     return q*s


# Path: signalz/generators/ecgsyn.py
import numpy as np
from signalz.misc import check_type_or_raise, ode45, rem


    Kwargs:

    * `sfecg` : ECG sampling frequency (int), it Hz

    * `N` : approaximate number of heart beats (int)

    * `hrmean` : mean heart rate (float) in beats per minute

    * `hrstd` : standard deviation of heart rate (float) in beats per minute

    * 'lfhfration : LF/HF ratio (float)

    * `sfint` : internal sampling frequency (int) in Hz

    * `ti` : angles of PQRST extrema (1d array of size 5) in degrees

    * `ai` : z-position of PQRST extrema (1d array of size 5)

    * `bi` : Gaussian width of peaks (1d array of size 5)
        
    Returns:

    * `x` : ECG values in mV
    
    * `peaks`: labels for PQRST peaks (P=1, Q=2, R=3, S=4, T=5 and 0 elsewhere)
    
    """
    # check data types
    check_type_or_raise(sfecg, int, "sfecg")

    check_type_or_raise(n, int, "sfecg")