code: def apply_fd_time_shift(htilde, shifttime, kmin=0, fseries=None, copy=True):
      
      dt = float(shifttime - htilde.epoch)
      if dt == 0.:
          # no shift to apply, just copy if desired
          if copy:
              htilde = 1. * htilde
      elif isinstance(htilde, FrequencySeries):
          # FrequencySeries means equally sampled in frequency, use faster shifting
          htilde = apply_fseries_time_shift(htilde, dt, kmin=kmin, copy=copy)
      else:
          if fseries is None:
              fseries = htilde.sample_frequencies.numpy()
          shift = Array(numpy.exp(-2j*numpy.pi*dt*fseries),
                      dtype=complex_same_precision_as(htilde))
          if copy:
              htilde = 1. * htilde
          htilde *= shift
      return htilde
docs: Shifts a frequency domain waveform in time. The shift applied is
      shiftime - htilde.epoch.
  
      Parameters
      ----------
      htilde : FrequencySeries
          The waveform frequency series.
      shifttime : float
          The time to shift the frequency series to.
      kmin : {0, int}
          The starting index of htilde to apply the time shift. Default is 0.
      fseries : {None, numpy array}
          The frequencies of each element in htilde. This is only needed if htilde is not
          sampled at equal frequency steps.
      copy : {True, bool}
          Make a copy of htilde before applying the time shift. If False, the time
          shift will be applied to htilde's data.
  
      Returns
      -------
      FrequencySeries
          A frequency series with the waveform shifted to the new time. If makecopy
          is True, will be a new frequency series; if makecopy is False, will be
          the same as htilde.