code: def smoothness(self):
          
          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
docs: Get rms average difference between spline and energy trend.