code: def from_numpy_arrays(freq_data, noise_data, length, delta_f, low_freq_cutoff):
      
      # Only include points above the low frequency cutoff
      if freq_data[0] > low_freq_cutoff:
          raise ValueError('Lowest frequency in input data '
            ' is higher than requested low-frequency cutoff ' + str(low_freq_cutoff))
  
      kmin = int(low_freq_cutoff / delta_f)
      flow = kmin * delta_f
  
      data_start = (0 if freq_data[0]==low_freq_cutoff else numpy.searchsorted(freq_data, flow) - 1)
  
      # If the cutoff is exactly in the file, start there
      if freq_data[data_start+1] == low_freq_cutoff:
          data_start += 1
  
      freq_data = freq_data[data_start:]
      noise_data = noise_data[data_start:]
  
      flog = numpy.log(freq_data)
      slog = numpy.log(noise_data)
  
      psd_interp = scipy.interpolate.interp1d(flog, slog)
  
      kmin = int(low_freq_cutoff / delta_f)
      psd = numpy.zeros(length, dtype=numpy.float64)
  
      vals = numpy.log(numpy.arange(kmin, length) * delta_f)
      psd[kmin:] =  numpy.exp(psd_interp(vals))
  
      return FrequencySeries(psd, delta_f=delta_f)
docs: Interpolate n PSD (as two 1-dimensional arrays of frequency and data)
      to the desired length, delta_f and low frequency cutoff.
  
      Parameters
      ----------
      freq_data : array
          Array of frequencies.
      noise_data : array
          PSD values corresponding to frequencies in freq_arr.
      length : int
          Length of the frequency series in samples.
      delta_f : float
          Frequency resolution of the frequency series in Herz.
      low_freq_cutoff : float
          Frequencies below this value are set to zero.
  
      Returns
      -------
      psd : FrequencySeries
          The generated frequency series.