psd: Obtained a copy of template series.c
psd: Calculation of power spectral density