def compute_symmetry(df_samples):
    """Compute symmetry characteristics.

    Parameters
    ---------
    df_samples : pandas.DataFrame
        Contains cycle points locations for each spike.

    Returns
    -------
    sym_features : dict
        Contains 1d arrays of symmetry features. Trough-centered key definitions:

        - time_decay : time between trough and first peak
        - time_rise : time between peak and trough
        - time_decay_sym : fraction of cycle in the decay period
        - time_rise_sym : fraction of cycle in the rise period

    """

    # Determine rise and decay characteristics
    sym_features = {}

    time_decay =  df_samples['sample_trough'] - df_samples['sample_last_peak']
    time_rise = df_samples['sample_next_peak'] - df_samples['sample_trough']

    time_rise_sym = time_rise / (time_rise + time_decay)
    time_decay_sym = 1 - time_rise_sym

    sym_features['time_decay'] = time_decay.values.astype('int')
    sym_features['time_rise'] = time_rise.values.astype('int')
    sym_features['time_decay_sym'] = time_decay_sym
    sym_features['time_rise_sym'] = time_rise_sym

    return sym_features