I am trying to use the function rois.find_rois_cwt from scikit maad, which outputs a dataframe and a nice figure. It would be really useful if I could access the data which is being used to plot the amplitude and the time as a csv (or in any form) so I can do some extra analysis on this.
However, as this is something that the function does not actually output I'm not sure how to do this. Any help would be much appreciated!
I tried taking a look at the source code using this code, then I tried to copy and paste it myself and edit the outputs but it was referring to too many other functions and I wasn't sure how to deal with this. I also tried using the bits commented out but this also produced an error. I mainly want the values that the functions produces from the first sublot - list / array of values for the amplitude against time.
import maad
from maad import sound, rois
from maad import features
import inspect
s, fs = sound.load("C:\\Users\\Student\\Project Stuff\\Our Audio Files\\190324\\240319_0086_F.wav")
rois.find_rois_cwt(s, fs, flims=(600,1800), tlen=3, th = -0.000001, display=True, save_df=True, savefilename='240319_0086_F_rois.csv')
#fig1, fig2, ax1, ax2 = rois.find_rois_cwt(s, fs, flims=(600,1800), tlen=3, th = -0.000001, display=True, save_df=True, savefilename='240319_0086_F_rois.csv')
#x_data = ax_2.lines[0].get_xdata()
#y_data = ax_2.lines[0].get_ydata()
source_code = inspect.getsource(rois.find_rois_cwt)
print(source_code)