Next: pr00, Previous: postrelease, Up: Internal Routines [Contents][Index]
power(x [, axis, /power, /shape, /onedim])
Returns the power spectrum of x
along the indicated
axis
(which defaults to 0), with power at negative
frequencies transferred to the corresponding positive ones. By default,
each element of the power spectrum is equal to the square of the
amplitude of the variation at the corresponding frequency, and element
zero is equal to the square of the average value of x
. If
you wish to add several elements of such a power spectrum, then you have
to multiply the first and last elements by a factor of 2 first. This
use is flagged by keyword /power
. e.g., for this implementation
of power
, Parseval’s theorem reads: mean(x^2) =
total(p(1:*-2))/2 + p(0) + p(*-1),
with p = power(x)
, or
mean(x^2) = total(power(x,/power)).
If you wish to investigate
the shape of the power spectrum, then you need to do the /power
correction twice to also correct for the absence of a negative frequency
contribution to the first and last elements (whereas all other elements
do have power from a corresponding negative frequency added in). This
use is flagged by the /shape
keyword. If you specify
/onedim
but no axis
, then x
is regarded
as a one-dimensional array.