code: def phase_from_frequencyseries(htilde, remove_start_phase=True):
      
      p = numpy.unwrap(numpy.angle(htilde.data)).astype(
              real_same_precision_as(htilde))
      if remove_start_phase:
          p += -p[0]
      return FrequencySeries(p, delta_f=htilde.delta_f, epoch=htilde.epoch,
          copy=False)
docs: Returns the phase from the given frequency-domain waveform. This assumes
      that the waveform has been sampled finely enough that the phase cannot
      change by more than pi radians between each step.
  
      Parameters
      ----------
      htilde : FrequencySeries
          The waveform to get the phase for; must be a complex frequency series.
      remove_start_phase : {True, bool}
          Subtract the initial phase before returning.
  
      Returns
      -------
      FrequencySeries
          The phase of the waveform as a function of frequency.