def peak_voltage(x, Ps):
    """
    Calculate the distribution of voltage of the extrema as in Hentsche EJN 2007 Fig2
    
    Note that this function only returns data while the signal was identified to be in an oscillation,
    using the default oscillation detector
    
    Parameters
    ----------
    x : array-like 1d
        voltage time series
    Ps : array-like 1d
        Arrays of extrema time points
        
    Returns
    -------
    peak_voltages : array-like 1d
        distribution of the peak voltage values
    """
    return x[Ps]