code: def spectrogram2(self, fftlength, overlap=None, window='hann', **kwargs):
          
          # set kwargs for periodogram()
          kwargs.setdefault('fs', self.sample_rate.to('Hz').value)
          # run
          return spectral.spectrogram(self, signal.periodogram,
                                      fftlength=fftlength, overlap=overlap,
                                      window=window, **kwargs)
docs: Calculate the non-averaged power `Spectrogram` of this `TimeSeries`
  
          Parameters
          ----------
          fftlength : `float`
              number of seconds in single FFT.
  
          overlap : `float`, optional
              number of seconds of overlap between FFTs, defaults to the
              recommended overlap for the given window (if given), or 0
  
          window : `str`, `numpy.ndarray`, optional
              window function to apply to timeseries prior to FFT,
              see :func:`scipy.signal.get_window` for details on acceptable
              formats
  
          scaling : [ 'density' | 'spectrum' ], optional
              selects between computing the power spectral density ('density')
              where the `Spectrogram` has units of V**2/Hz if the input is
              measured in V and computing the power spectrum ('spectrum')
              where the `Spectrogram` has units of V**2 if the input is
              measured in V. Defaults to 'density'.
  
          **kwargs
              other parameters to be passed to `scipy.signal.periodogram` for
              each column of the `Spectrogram`
  
          Returns
          -------
          spectrogram: `~gwpy.spectrogram.Spectrogram`
              a power `Spectrogram` with `1/fftlength` frequency resolution and
              (fftlength - overlap) time resolution.
  
          See also
          --------
          scipy.signal.periodogram
              for documentation on the Fourier methods used in this calculation
  
          Notes
          -----
          This method calculates overlapping periodograms for all possible
          chunks of data entirely containing within the span of the input
          `TimeSeries`, then normalises the power in overlapping chunks using
          a triangular window centred on that chunk which most overlaps the
          given `Spectrogram` time sample.