code: def interpolate(series, delta_f):
      
      new_n = (len(series)-1) * series.delta_f / delta_f + 1
      samples = numpy.arange(0, numpy.rint(new_n)) * delta_f
      interpolated_series = numpy.interp(samples, series.sample_frequencies.numpy(), series.numpy())
      return FrequencySeries(interpolated_series, epoch=series.epoch,
                             delta_f=delta_f, dtype=series.dtype)
docs: Return a new PSD that has been interpolated to the desired delta_f.
  
      Parameters
      ----------
      series : FrequencySeries
          Frequency series to be interpolated.
      delta_f : float
          The desired delta_f of the output
  
      Returns
      -------
      interpolated series : FrequencySeries
          A new FrequencySeries that has been interpolated.