lmlib.utils.generator.gen_sine#

lmlib.utils.generator.gen_sine(K, k_periods, amplitudes=None, k0s=None)#

Generates multiple sinusoidal signals and adds them to one

Parameters
  • K (int) – Signal length

  • k_periods (int or array_like of int) – signal periodicities in number of samples per period.

  • amplitudes (scalar, array_like of scalars, optional) – amplitude(s) of a signal, if set to None all amlitudes are set to 1.0

  • k0s (int or array_like of int, optional) – time index(es) of first zero-crossing of sinusoidal signal, if set to None all k0s are set to 1.0

Returns

out – Sum of Sinusoidal signals of length K.

Return type

numpy.ndarray

Example