Get rms average difference between spline and energy trend.

def smoothness(self):
        """
        Get rms average difference between spline and energy trend.
        """
        energies = self.energies
        try:
            sp = self.spline()
        except:
            print("Energy spline failed.")
            return None
        spline_energies = sp(range(len(energies)))
        diff = spline_energies - energies
        rms = np.sqrt(np.sum(np.square(diff)) / len(energies))
        return rms