code: def smoothness(self, convert_to_muC_per_cm2=True, all_in_polar=True):
          
          tot = self.get_same_branch_polarization_data(
              convert_to_muC_per_cm2=convert_to_muC_per_cm2, all_in_polar=all_in_polar)
          L = tot.shape[0]
          try:
              sp = self.same_branch_splines(convert_to_muC_per_cm2=convert_to_muC_per_cm2,
                                            all_in_polar=all_in_polar)
          except:
              print("Something went wrong.")
              return None
          sp_latt = [sp[i](range(L)) for i in range(3)]
          diff = [sp_latt[i] - tot[:, i].ravel() for i in range(3)]
          rms = [np.sqrt(np.sum(np.square(diff[i])) / L) for i in range(3)]
          return rms
docs: Get rms average difference between spline and same branch polarization data.