code: def get_spectrogram(self):
          
          args = self.args
  
          fftlength = float(args.secpfft)
          overlap = fftlength * args.overlap
          self.log(2, "Calculating spectrogram secpfft: %s, overlap: %s" %
                   (fftlength, overlap))
  
          stride = self.get_stride()
  
          if stride:
              specgram = self.timeseries[0].spectrogram(
                  stride, fftlength=fftlength, overlap=overlap,
                  window=args.window)
              nfft = stride * (stride // (fftlength - overlap))
              self.log(3, 'Spectrogram calc, stride: %s, fftlength: %s, '
                          'overlap: %sf, #fft: %d' % (stride, fftlength,
                                                      overlap, nfft))
          else:
              specgram = self.timeseries[0].spectrogram2(
                  fftlength=fftlength, overlap=overlap, window=args.window)
              nfft = specgram.shape[0]
              self.log(3, 'HR-Spectrogram calc, fftlength: %s, overlap: %s, '
                          '#fft: %d' % (fftlength, overlap, nfft))
  
          return specgram ** (1/2.)
docs: Calculate the spectrogram to be plotted
  
          This exists as a separate method to allow subclasses to override
          this and not the entire `get_plot` method, e.g. `Coherencegram`.
  
          This method should not apply the normalisation from `args.norm`.