Next: scale, Previous: s2pv, Up: Internal Routines [Contents][Index]
sc, x, s, c
Returns a sine-cosine transform of the first dimension of numerical data
x
. x
may be of any positive size. In
s
and c
are returned the sine and cosine
coefficients; element i
corresponds to wavelength
num_elem(x)/i
. Sine transform: s(i) = 2 *
mean(x * sin(#2pi * i * indgen(x)/num_elem(x)))
, but
without prefactor 2 for i = 0
. Cosine transform:
c(i) = 2 * mean(x * cos(#2pi * i *
indgen(x)/num_elem(x)))
, but without prefactor 2 for
i = 0
. For quickest calculation, the length of the first
dimension of x
should only contain small prime factors,
like 2, 3, and 5.
The values s(0,...)
are always equal to zero. If the
number of elements in the first dimension is even, then
s(*-1,...)
is also equal to zero.
Reverse: scb
• sc Details: |