Refactor spectrogram.

Underlying ndarray is now a member.