diff --git a/physioqc/metrics/multimodal.py b/physioqc/metrics/multimodal.py index 31a456f..0070c7e 100644 --- a/physioqc/metrics/multimodal.py +++ b/physioqc/metrics/multimodal.py @@ -142,7 +142,26 @@ def max(signal: np.array): @physio_or_numpy -def iqr(signal: np.array, q_high: float = 75, q_low: float = 25): +def max_amplitude(signal: np.array): + """ + Calculate max across input channels of signal. + + Parameters + ---------- + signal : np.array or peakdet Physio object + Physiological data + + Returns + ------- + N-sized array :obj:`numpy.ndarray` + max of signal. + """ + max_amp = np.max(signal, axis=0) - np.min(signal, axis=0) + return max_amp + + +@physio_or_numpy +def IQR(signal: np.array, q_high: float = 75, q_low: float = 25): """Calculate the Inter Quantile Range (IQR) over the input signal. Parameters