% apowspec - Arrow to compute power spectra
%
% apowspec ::
%    [[N]] ~'analysis window'
% -> arrow( {[[N]]}, {[[dftbins(N)]]}, empty).
% 
% apowspec ::
%    [[M]] ~'analysis window',
%    N     ~'size for FFT'
% -> arrow( {[[M]]}, {[[dftbins(N)]]}, empty).
function [o,fx]=apowspec(window,N)
	W=spdiag(window);
	if nargin<2, N=length(window); end
	fx=(0:dftbins(N)-1)/N;
	o=arr(@ps);
	function y=ps(x)
		y=powspec(W*x,N);
	end
end
