def get_spectrogram(self):
args = self.args<EOL>fftlength = float(args.secpfft)<EOL>overlap = fftlength * args.overlap<EOL>self.log(<NUM_LIT:2>, "<STR_LIT>" %<EOL>(fftlength, overlap))<EOL>stride = self.get_stride()<EOL>if stride:<EOL><INDENT>specgram = self.timeseries[<NUM_LIT:0>].spectrogram(<EOL>stride, fftlength=fftlength, overlap=overlap,<EOL>window=args.window)<EOL>nfft = stride * (stride // (fftlength - overlap))<EOL>self.log(<NUM_LIT:3>, '<STR_LIT>'<EOL>'<STR_LIT>' % (stride, fftlength,<EOL>overlap, nfft))<EOL><DEDENT>else:<EOL><INDENT>specgram = self.timeseries[<NUM_LIT:0>].spectrogram2(<EOL>fftlength=fftlength, overlap=overlap, window=args.window)<EOL>nfft = specgram.shape[<NUM_LIT:0>]<EOL>self.log(<NUM_LIT:3>, '<STR_LIT>'<EOL>'<STR_LIT>' % (fftlength, overlap, nfft))<EOL><DEDENT>return specgram ** (<NUM_LIT:1>/<NUM_LIT>)<EOL>
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`.