neuropsychology / NeuroKit

NeuroKit2: The Python Toolbox for Neurophysiological Signal Processing
https://neuropsychology.github.io/NeuroKit
MIT License
1.58k stars 421 forks source link

RSP_Amplitude_Mean is missing from the return values #961

Open michalgnacek opened 9 months ago

michalgnacek commented 9 months ago

As of https://github.com/neuropsychology/NeuroKit/pull/873 the rsp_intervalrelated no longer returns 'RSP_Amplitude_Mean' as incorrectly indicated by the function description and the documentation.

original code: if "RSP_Amplitude" in colnames: output["RSP_Amplitude_Mean"] = np.nanmean(data["RSP_Amplitude"].values)

was changed to: if "RSP_Amplitude" in colnames: rav = rsp_rav(data["RSP_Amplitude"].values, peaks=data) output.update(rav.to_dict(orient="records")[0])

This code seems to be using RSP amplitude to calculate a number of RAV features but the amplitude mean itself is not returned. I thought that perhaps one of the rsp_rav return values is an amplitude mean but from what I understand, RAV_mean and amplitude mean are two different values.

Apologies if I missed something and this is working as intended.