KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21585/root/usr/lib64/python2.4/site-packages/Numeric/FFT/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21585/root/usr/lib64/python2.4/site-packages/Numeric/FFT/FFT.pyc
mň
Jä:c@sEdZdkZdkZdkZhZhZddeieied„Z	ddd„Z
ddd„Zddd„Zddd„Z
ddd„Zddd	„Zddd
d„Zdde
d„Zddd
„Zddd„Zddd„Zddd„Zddd„Zddd„Zddd„Zddd„ZdS(s}
Discrete Fourier Transforms - FFT.py 

The underlying code for these functions is an f2c translated and modified
version of the FFTPACK routines.

fft(a, n=None, axis=-1) 
inverse_fft(a, n=None, axis=-1) 
real_fft(a, n=None, axis=-1) 
inverse_real_fft(a, n=None, axis=-1)
hermite_fft(a, n=None, axis=-1)
inverse_hermite_fft(a, n=None, axis=-1)
fftnd(a, s=None, axes=None)
inverse_fftnd(a, s=None, axes=None)
real_fftnd(a, s=None, axes=None)
inverse_real_fftnd(a, s=None, axes=None)
fft2d(a, s=None, axes=(-2,-1)) 
inverse_fft2d(a, s=None, axes=(-2, -1))
real_fft2d(a, s=None, axes=(-2,-1)) 
inverse_real_fft2d(a, s=None, axes=(-2, -1))
Ni˙˙˙˙cCsšti|ƒ}|djo|i|}ny||}
Wn)t	j
o||ƒ}
|
||<nX|i||joŔt|iƒ}|||jo:t
dƒgt|ƒ}t
d|ƒ||<||}q;t
dƒgt|ƒ}t
d||ƒ||<|||<ti||iƒƒ}	||	|<|	}n|djoti||dƒ}n|||
ƒ}|djoti||dƒ}n|S(Nii˙˙˙˙(tNumerictasarraytatntNonetshapetaxist	fft_cachetwsavetKeyErrort
init_functiontlisttstslicetlentindextzerosttypecodetztswapaxest
work_functiontr(RRRR
RRRRRRR((t5/usr/lib64/python2.4/site-packages/Numeric/FFT/FFT.pyt_raw_ffts4





cCst|||tititƒS(spfft(a, n=None, axis=-1) 

    Will return the n point discrete Fourier transform of a. n defaults to the
    length of a. If n is larger than a, then a will be zero-padded to make up
    the difference. If n is smaller than a, the first n items in a will be
    used.

    The packing of the result is "standard": If A = fft(a, n), then A[0]
    contains the zero-frequency term, A[1:n/2+1] contains the
    positive-frequency terms, and A[n/2+1:] contains the negative-frequency
    terms, in order of decreasingly negative frequency. So for an 8-point
    transform, the frequencies of the result are [ 0, 1, 2, 3, 4, -3, -2, -1].

    This is most efficient for n a power of two. This also stores a cache of
    working memory for different sizes of fft's, so you could theoretically
    run into memory problems if you call this too many times with too many
    different n's.N(RRRRtfftpacktcfftitcfftft
_fft_cache(RRR((Rtfft=scCsbti|ƒitiƒ}|djoti|ƒ|}nt	|||t
it
it
ƒ|S(sîinverse_fft(a, n=None, axis=-1) 

    Will return the n point inverse discrete Fourier transform of a.  n
    defaults to the length of a. If n is larger than a, then a will be
    zero-padded to make up the difference. If n is smaller than a, then a will
    be truncated to reduce its size.

    The input array is expected to be packed the same way as the output of
    fft, as discussed in it's documentation.

    This is the inverse of fft: inverse_fft(fft(a)) == a within numerical
    accuracy.

    This is most efficient for n a power of two. This also stores a cache of
    working memory for different sizes of fft's, so you could theoretically
    run into memory problems if you call this too many times with too many
    different n's.N(RRRtastypetComplexRRRRRRRtcfftbR(RRR((Rtinverse_fftSs

cCs:ti|ƒitiƒ}t|||ti	ti
tƒS(sĹreal_fft(a, n=None, axis=-1) 

    Will return the n point discrete Fourier transform of the real valued
    array a. n defaults to the length of a. n is the length of the input, not
    the output.

    The returned array will be the nonnegative frequency terms of the
    Hermite-symmetric, complex transform of the real array. So for an 8-point
    transform, the frequencies in the result are [ 0, 1, 2, 3, 4]. The first
    term will be real, as will the last if n is even. The negative frequency
    terms are not needed because they are the complex conjugates of the
    positive frequency terms. (This is what I mean when I say
    Hermite-symmetric.)

    This is most efficient for n a power of two.N(RRRRtFloatRRRRtrfftitrfftft_real_fft_cache(RRR((Rtreal_fftlscCsjti|ƒitiƒ}|djoti|ƒ|dd}nt	|||t
it
it
ƒ|S(sinverse_real_fft(a, n=None, axis=-1)
    
    Will return the real valued n point inverse discrete Fourier transform of
    a, where a contains the nonnegative frequency terms of a Hermite-symmetric
    sequence. n is the length of the result, not the input. If n is not
    supplied, the default is 2*(len(a)-1). If you want the length of the
    result to be odd, you have to say so.

    If you specify an n such that a must be zero-padded or truncated, the
    extra/removed values will be added/removed at high frequencies. One can
    thus resample a series to m points via Fourier interpolation by: a_resamp
    = inverse_real_fft(real_fft(a), m).

    This is the inverse of real_fft:
    inverse_real_fft(real_fft(a), len(a)) == a
    within numerical accuracy.iiN(RRRRRRRRRRRR"trfftbR$(RRR((Rtinverse_real_ffts
cCsdti|ƒitiƒ}|djoti|ƒ|dd}nt	ti
|ƒ||ƒ|S(sÂhermite_fft(a, n=None, axis=-1)
    inverse_hermite_fft(a, n=None, axis=-1)

    These are a pair analogous to real_fft/inverse_real_fft, but for the
    opposite case: here the signal is real in the frequency domain and has
    Hermite symmetry in the time domain. So here it's hermite_fft for which
    you must supply the length of the result if it is to be odd.

    inverse_hermite_fft(hermite_fft(a), len(a)) == a
    within numerical accuracy.iiN(RRRRRRRRRR't	conjugate(RRR((Rthermite_fftšs


cCs\ti|ƒitiƒ}|djoti|ƒ|}nti	t
|||ƒƒ|S(sÂhermite_fft(a, n=None, axis=-1)
    inverse_hermite_fft(a, n=None, axis=-1)

    These are a pair analogous to real_fft/inverse_real_fft, but for the
    opposite case: here the signal is real in the frequency domain and has
    Hermite symmetry in the time domain. So here it's hermite_fft for which
    you must supply the length of the result if it is to be odd.

    inverse_hermite_fft(hermite_fft(a), len(a)) == a
    within numerical accuracy.N(RRRRR!RRRRR(R%(RRR((Rtinverse_hermite_fftŹs


icCsĺ|djo?d}|djot|iƒ}qRti|i|ƒ}nd}t|ƒ}|djot	t
|ƒdƒ}nt
|ƒt
|ƒjo
td‚n|o)|o"||ddd||d<n||fS(Niis&Shape and axes have different lengths.i˙˙˙˙i(
RRt	shapelesstaxesRRRRttaketrangeRt
ValueErrortinvreal(RRR,R0R+((Rt
_cook_nd_argsžs



"cCsxti|ƒ}t|||ƒ\}}tt|ƒƒ}|i	ƒx.|D]&}||d||d||ƒ}qJW|S(NRR(RRRR1RR,R.Rtitltreversetiitfunction(RRR,R5R2R4((Rt
_raw_fftndŃs
$cCst|||tƒS(sŽfftnd(a, s=None, axes=None)

    The n-dimensional fft of a. s is a sequence giving the shape of the input
    an result along the transformed axes, as n for fft. Results are packed
    analogously to fft: the term for zero frequency in all axes is in the
    low-order corner, while the term for the Nyquist frequency in all axes is
    in the middle.

    If neither s nor axes is specified, the transform is taken along all
    axes. If s is specified and axes is not, the last len(s) axes are used.
    If axes are specified and s is not, the input shape along the specified
    axes is used. If s and axes are both specified and are not the same
    length, an exception is raised.N(R6RRR,R(RRR,((RtfftndŰs
cCst|||tƒS(sBinverse_fftnd(a, s=None, axes=None)
    
    The inverse of fftnd.N(R6RRR,R (RRR,((Rt
inverse_fftndísiţ˙˙˙cCst|||tƒS(sxfft2d(a, s=None, axes=(-2,-1)) 
    
    The 2d fft of a. This is really just fftnd with different default
    behavior.N(R6RRR,R(RRR,((Rtfft2dőscCst|||tƒS(s‰inverse_fft2d(a, s=None, axes=(-2, -1))

    The inverse of fft2d. This is really just inverse_fftnd with different
    default behavior.N(R6RRR,R (RRR,((Rt
inverse_fft2dţscCsŒti|ƒitiƒ}t|||ƒ\}}t||d|dƒ}x8t	t
|ƒdƒD] }t|||||ƒ}qdW|S(sreal_fftnd(a, s=None, axes=None)

    The n-dimensional discrete Fourier transform of a real array a. A real
    transform as real_fft is performed along the axis specified by the last
    element of axes, then complex transforms as fft are performed along the
    other axes.i˙˙˙˙iN(
RRRRR!R1RR,R%R.RR4R(RRR,R4((Rt
real_fftndscCst|||ƒS(s”real_fft2d(a, s=None, axes=(-2,-1)) 

    The 2d fft of the real valued array a. This is really just real_fftnd with
    different default behavior.N(R;RRR,(RRR,((Rt
real_fft2dscCs’ti|ƒitiƒ}t|||ddƒ\}}x8tt	|ƒdƒD] }t|||||ƒ}qPWt||d|dƒ}|S(sginverse_real_fftnd(a, s=None, axes=None)

    The inverse of real_fftnd. The transform implemented in inverse_fft is
    applied along all axes but the last, then the transform implemented in
    inverse_real_fft is performed along the last axis. As with
    inverse_real_fft, the length of the result along that axis must be
    specified if it is to be odd.R0ii˙˙˙˙N(
RRRRRR1RR,R.RR4R R'(RRR,R4((Rtinverse_real_fftnd scCst|||ƒS(s˜inverse_real_fft2d(a, s=None, axes=(-2, -1))

    The inverse of real_fft2d. This is really just inverse_real_fftnd with
    different default behavior.N(R=RRR,(RRR,((Rtinverse_real_fft2d1s(iţ˙˙˙i˙˙˙˙(iţ˙˙˙i˙˙˙˙(iţ˙˙˙i˙˙˙˙(iţ˙˙˙i˙˙˙˙(t__doc__RRtcopyRR$RRRRRR R%R'R)R*R1R6R7R8R9R:R;R<R=R>(R7R*R>RR;R6RRRR1R<R9R8R$R'R:R%RR)R=R@R ((Rt?s("
			

Anon7 - 2021