Developing code to combine meanspec and fpeaks functions