def frequency_of_peaks(self, x, start_offset=100, end_offset=100):
        """ 
            This method assess the frequency of the peaks on any given 1-dimensional time series.

            :param x: The time series to assess freeze of gait on. This could be x, y, z or mag_sum_acc.
            :type x: pandas.Series
            :param start_offset: Signal to leave out (of calculations) from the begining of the time series (100 default).
            :type start_offset: int
            :param end_offset: Signal to leave out (from calculations) from the end of the time series (100 default).
            :type end_offset: int
            :return frequency_of_peaks: The frequency of peaks on the provided time series [measured in Hz].
            :rtype frequency_of_peaks: float
        """

        peaks_data = x[start_offset: -end_offset].values
        maxtab, mintab = peakdet(peaks_data, self.delta)

        x = np.mean(peaks_data[maxtab[1:,0].astype(int)] - peaks_data[maxtab[:-1,0].astype(int)])

        frequency_of_peaks = abs(1/x)

        return frequency_of_peaks
This method assess the frequency of the peaks on any given 1-dimensional time series.

            :param x: The time series to assess freeze of gait on. This could be x, y, z or mag_sum_acc.
            :type x: pandas.Series
            :param start_offset: Signal to leave out (of calculations) from the begining of the time series (100 default).
            :type start_offset: int
            :param end_offset: Signal to leave out (from calculations) from the end of the time series (100 default).
            :type end_offset: int
            :return frequency_of_peaks: The frequency of peaks on the provided time series [measured in Hz].
            :rtype frequency_of_peaks: float