code: def amplitude_from_frequencyseries(htilde):
      
      amp = abs(htilde.data).astype(real_same_precision_as(htilde))
      return FrequencySeries(amp, delta_f=htilde.delta_f, epoch=htilde.epoch,
          copy=False)
docs: Returns the amplitude of the given frequency-domain waveform as a
      FrequencySeries.
  
      Parameters
      ----------
      htilde : FrequencySeries
          The waveform to get the amplitude of.
  
      Returns
      -------
      FrequencySeries
          The amplitude of the waveform as a function of frequency.