Power spectrum gain seems off
Power spectrum should probably be normalized by gain of the window, but the power spectrum doesn't really match sine wave amplitude.
For example, on a 1 second excitation at 100 Hz and 100 amplitude, peak spectrum is only 60, but at 10 seconds its 160. ( absolute magnitude )