features.ap
features.ap(data, geometry=None, channel_labels=None)Compute AP features from a numpy array.
Computes the action potential (AP) features from electrophysiological data including RMS values and correlation ratios.
Args: data (np.ndarray): AP band data array with shape (channels, samples). geometry (dict): Dictionary with channel geometry containing ‘x’ and ‘y’ arrays. channel_labels (np.ndarray): Array of channel quality labels.
Returns: pd.DataFrame: DataFrame with columns [‘channel’, ‘rms_ap’, ‘cor_ratio’, ‘channel_labels’].
Raises: AssertionError: If geometry or channel_labels are not provided.
Note: This function computes RMS values and cross-correlation ratios for action potential band data.