+
    /i@>                        R t . ROt^ RIt^ RIHtHtHtHtHtH	t	H
t
Ht ^RIHt ^ RIHt ]P                   ! 4       t^R]3R ltR]3R ltR]3R lt]3R lt]3R	 ltR]3R
 ltR]3R ltR]3R ltR]3R ltR]3R ltR# )z1
Differential and pseudo-differential operators.
N)piasarraysincossinhcoshtanhiscomplexobj)convolve)_datacopiedc                   \        V\        P                  4      '       d&   \        VR4      '       g   / Vn        VP                  p\        V 4      pV^ 8X  d   V# \        V4      '       d;   \        VP                  WV4      R\        VP                  WV4      ,          ,           # Ve   ^\        ,          V,          pMRp\        V 4      pVP                  WaV34      pVfP   \        V4      ^8  d   V'       d   VP                  4        K  W3R lp\        P                  ! WhV^R7      pWsWaV3&   \!        W@4      p	\        P                  ! WGV^,          V	R7      # )a  
Return kth derivative (or integral) of a periodic sequence x.

If x_j and y_j are Fourier coefficients of periodic functions x
and y, respectively, then::

  y_j = pow(sqrt(-1)*j*2*pi/period, order) * x_j
  y_0 = 0 if order is not 0.

Parameters
----------
x : array_like
    Input array.
order : int, optional
    The order of differentiation. Default order is 1. If order is
    negative, then integration is carried out under the assumption
    that ``x_0 == 0``.
period : float, optional
    The assumed period of the sequence. Default is ``2*pi``.

Notes
-----
If ``sum(x, axis=0) = 0`` then ``diff(diff(x, k), -k) == x`` (within
numerical accuracy).

For odd order and even ``len(x)``, the Nyquist mode is taken zero.


diff_cache              ?      ?c                 :    V '       d   \        W ,          V4      # ^ #     )pow)kordercs   &&&Y/var/www/html/photoedit/myenv/lib/python3.14/site-packages/scipy/fftpack/_pseudo_diffs.pykerneldiff.<locals>.kernelI   s    13u~%    dzero_nyquistswap_real_imagoverwrite_x)
isinstance	threadinglocalhasattrr   r   r	   diffrealimagr   lengetpopitemr
   init_convolution_kernelr   )
xr   period_cachetmpr   nomegar   r    s
   &&&&      r   r%   r%      s/   : &)//**v|,, "F""
!*Cz
CCHHeV4RHHeV9- 6- - 	-bDKAAJJ{#E}v;   	 00E>?A#{c%KSeai)46 6r   c                   \        V\        P                  4      '       d&   \        VR4      '       g   / Vn        VP                  p\        V 4      p\        V4      '       d;   \        VP                  WV4      R\        VP                  WV4      ,          ,           # Ve   V^,          \        ,          V,          p\        V 4      pVP                  WQ34      pVfN   \        V4      ^8  d   V'       d   VP                  4        K  V3R lp\        P                  ! WW^R7      pWcWQ3&   \!        W@4      p\        P                  ! WF^VR7      # )a'  
Return h-Tilbert transform of a periodic sequence x.

If x_j and y_j are Fourier coefficients of periodic functions x
and y, respectively, then::

    y_j = sqrt(-1)*coth(j*h*2*pi/period) * x_j
    y_0 = 0

Parameters
----------
x : array_like
    The input array to transform.
h : float
    Defines the parameter of the Tilbert transform.
period : float, optional
    The assumed period of the sequence. Default period is ``2*pi``.

Returns
-------
tilbert : ndarray
    The result of the transform.

Notes
-----
If ``sum(x, axis=0) == 0`` and ``n = len(x)`` is odd, then
``tilbert(itilbert(x)) == x``.

If ``2 * pi * h / period`` is approximately 10 or larger, then
numerically ``tilbert == hilbert``
(theoretically oo-Tilbert == Hilbert).

For even ``len(x)``, the Nyquist mode of ``x`` is taken zero.

tilbert_cacher   c                 F    V '       d   R \        W,          4      ,          # ^ # )r   r   r   hs   &&r   r   tilbert.<locals>.kernel   s    49}$r   r   r   )r!   r"   r#   r$   r3   r   r	   tilbertr&   r'   r   r(   r)   r*   r
   r+   r   	r,   r7   r-   r.   r/   r0   r1   r   r    s	   &&&&     r   r:   r:   U   s   H &)//**v//#%F %%
!*CCsxxF3GCHHa889 	9 EBJAAJJvE}v;  	 00a@uc%KSaKPPr   c                   \        V\        P                  4      '       d&   \        VR4      '       g   / Vn        VP                  p\        V 4      p\        V4      '       d;   \        VP                  WV4      R\        VP                  WV4      ,          ,           # Ve   V^,          \        ,          V,          p\        V 4      pVP                  WQ34      pVfN   \        V4      ^8  d   V'       d   VP                  4        K  V3R lp\        P                  ! WW^R7      pWcWQ3&   \!        W@4      p\        P                  ! WF^VR7      # )z
Return inverse h-Tilbert transform of a periodic sequence x.

If ``x_j`` and ``y_j`` are Fourier coefficients of periodic functions x
and y, respectively, then::

  y_j = -sqrt(-1)*tanh(j*h*2*pi/period) * x_j
  y_0 = 0

For more details, see `tilbert`.

itilbert_cacher   c                 :    V '       d   \        W,          4      ) # ^ # r   r5   r6   s   &&r   r   itilbert.<locals>.kernel   s    QS	z!r   r9   r   )r!   r"   r#   r$   r=   r   r	   itilbertr&   r'   r   r(   r)   r*   r
   r+   r   r;   s	   &&&&     r   r@   r@      s    &)//**v/00$&F!&&
!*CC!V4(388Q778 	8aCF6MAAJJuE}v;  	 00A>uc%KSaKPPr   c                N   \        V\        P                  4      '       d&   \        VR4      '       g   / Vn        VP                  p\        V 4      p\        V4      '       d9   \        VP                  V4      R\        VP                  V4      ,          ,           # \        V 4      pVP                  V4      pVfJ   \        V4      ^8  d   V'       d   VP                  4        K  R p\        P                  ! W5^R7      pWAV&   \        W 4      p\        P                  ! W$^VR7      # )a  
Return Hilbert transform of a periodic sequence x.

If x_j and y_j are Fourier coefficients of periodic functions x
and y, respectively, then::

  y_j = sqrt(-1)*sign(j) * x_j
  y_0 = 0

Parameters
----------
x : array_like
    The input array, should be periodic.
_cache : dict, optional
    Dictionary that contains the kernel used to do a convolution with.

Returns
-------
y : ndarray
    The transformed input.

See Also
--------
scipy.signal.hilbert : Compute the analytic signal, using the Hilbert
                       transform.

Notes
-----
If ``sum(x, axis=0) == 0`` then ``hilbert(ihilbert(x)) == x``.

For even len(x), the Nyquist mode of x is taken zero.

The sign of the returned transform does not have a factor -1 that is more
often than not found in the definition of the Hilbert transform. Note also
that `scipy.signal.hilbert` does have an extra -1 factor compared to this
function.

hilbert_cacher   c                 *    V ^ 8  d   R# V ^ 8  d   R# R# )r   r   g        g       )r   s   &r   r   hilbert.<locals>.kernel   s    1uQr   r9   r   )r!   r"   r#   r$   rB   r   r	   hilbertr&   r'   r(   r)   r*   r
   r+   r   )r,   r.   r/   r0   r1   r   r    s   &&     r   rF   rF      s    N &)//**v//#%F %%
!*CCsxx(2&0I+IIIAAJJqME}v; 	 00A>q	c%KSaKPPr   c                    \        V\        P                  4      '       d&   \        VR4      '       g   / Vn        VP                  p\        W4      ) # )z
Return inverse Hilbert transform of a periodic sequence x.

If ``x_j`` and ``y_j`` are Fourier coefficients of periodic functions x
and y, respectively, then::

  y_j = -sqrt(-1)*sign(j) * x_j
  y_0 = 0

ihilbert_cache)r!   r"   r#   r$   rH   rF   )r,   r.   s   &&r   ihilbertrI     sD     &)//**v/00$&F!&&Ar   c           	        \        V\        P                  4      '       d&   \        VR4      '       g   / Vn        VP                  p\        V 4      p\        V4      '       d;   \        VP                  WW44      R\        VP                  WW44      ,          ,           # Ve7   V^,          \        ,          V,          pV^,          \        ,          V,          p\        V 4      pVP                  WaV34      pVfO   \        V4      ^8  d   V'       d   VP                  4        K  W3R lp\        P                  ! Wh^R7      pWtWaV3&   \!        WP4      p	\        P                  ! WW^V	R7      # )a  
Return (a,b)-cosh/sinh pseudo-derivative of a periodic sequence.

If ``x_j`` and ``y_j`` are Fourier coefficients of periodic functions x
and y, respectively, then::

  y_j = -sqrt(-1)*cosh(j*a*2*pi/period)/sinh(j*b*2*pi/period) * x_j
  y_0 = 0

Parameters
----------
x : array_like
    The array to take the pseudo-derivative from.
a, b : float
    Defines the parameters of the cosh/sinh pseudo-differential
    operator.
period : float, optional
    The period of the sequence. Default period is ``2*pi``.

Returns
-------
cs_diff : ndarray
    Pseudo-derivative of periodic sequence `x`.

Notes
-----
For even len(`x`), the Nyquist mode of `x` is taken as zero.

cs_diff_cacher   c                 f    V '       d)   \        W,          4      ) \        W ,          4      ,          # ^ # r   )r   r   r   abs   &&&r   r   cs_diff.<locals>.kernelH  s!    QS	z$qs)++r   r9   r   )r!   r"   r#   r$   rK   r   r	   cs_diffr&   r'   r   r(   r)   r*   r
   r+   r   
r,   rN   rO   r-   r.   r/   r0   r1   r   r    s
   &&&&&     r   rQ   rQ     s   < &)//**v//#%F %%
!*CCsxxv6'#((A&99: 	:aCF6MaCF6MAAJJAwE}v;  	 00A>Awc%KSaKPPr   c           	        \        V\        P                  4      '       d&   \        VR4      '       g   / Vn        VP                  p\        V 4      p\        V4      '       d;   \        VP                  WW44      R\        VP                  WW44      ,          ,           # Ve7   V^,          \        ,          V,          pV^,          \        ,          V,          p\        V 4      pVP                  WaV34      pVfO   \        V4      ^8  d   V'       d   VP                  4        K  W3R lp\        P                  ! Wh^R7      pWtWaV3&   \!        WP4      p	\        P                  ! WW^V	R7      # )a<  
Return (a,b)-sinh/cosh pseudo-derivative of a periodic sequence x.

If x_j and y_j are Fourier coefficients of periodic functions x
and y, respectively, then::

  y_j = sqrt(-1)*sinh(j*a*2*pi/period)/cosh(j*b*2*pi/period) * x_j
  y_0 = 0

Parameters
----------
x : array_like
    Input array.
a,b : float
    Defines the parameters of the sinh/cosh pseudo-differential
    operator.
period : float, optional
    The period of the sequence x. Default is 2*pi.

Notes
-----
``sc_diff(cs_diff(x,a,b),b,a) == x``
For even ``len(x)``, the Nyquist mode of x is taken as zero.

sc_diff_cacher   c                 d    V '       d(   \        W,          4      \        W ,          4      ,          # ^ # r   )r   r   rM   s   &&&r   r   sc_diff.<locals>.kernel  s    ACyac**r   r9   r   )r!   r"   r#   r$   rT   r   r	   sc_diffr&   r'   r   r(   r)   r*   r
   r+   r   rR   s
   &&&&&     r   rW   rW   R  s   4 &)//**v//#%F %%
!*CCsxxv6GCHHaF;;< 	<aCF6MaCF6MAAJJAwE}v;  	 00A>Awc%KSaKPPr   c           	        \        V\        P                  4      '       d&   \        VR4      '       g   / Vn        VP                  p\        V 4      p\        V4      '       d;   \        VP                  WW44      R\        VP                  WW44      ,          ,           # Ve7   V^,          \        ,          V,          pV^,          \        ,          V,          p\        V 4      pVP                  WaV34      pVfM   \        V4      ^8  d   V'       d   VP                  4        K  W3R lp\        P                  ! Wh4      pWtWaV3&   \!        WP4      p	\        P                  ! WWV	R7      # )a  
Return (a,b)-sinh/sinh pseudo-derivative of a periodic sequence x.

If x_j and y_j are Fourier coefficients of periodic functions x
and y, respectively, then::

  y_j = sinh(j*a*2*pi/period)/sinh(j*b*2*pi/period) * x_j
  y_0 = a/b * x_0

Parameters
----------
x : array_like
    The array to take the pseudo-derivative from.
a,b
    Defines the parameters of the sinh/sinh pseudo-differential
    operator.
period : float, optional
    The period of the sequence x. Default is ``2*pi``.

Notes
-----
``ss_diff(ss_diff(x,a,b),b,a) == x``

ss_diff_cacher   c                     V '       d(   \        W,          4      \        W ,          4      ,          # \        V4      V,          # N)r   floatrM   s   &&&r   r   ss_diff.<locals>.kernel  s*    ACyac**8A:r   r    )r!   r"   r#   r$   rY   r   r	   ss_diffr&   r'   r   r(   r)   r*   r
   r+   r   rR   s
   &&&&&     r   r_   r_     s   2 &)//**v//#%F %%
!*CCsxxv6'#((A&99: 	:aCF6MaCF6MAAJJAwE}v;  	 00:Awc%KS;??r   c           	        \        V\        P                  4      '       d&   \        VR4      '       g   / Vn        VP                  p\        V 4      p\        V4      '       d;   \        VP                  WW44      R\        VP                  WW44      ,          ,           # Ve7   V^,          \        ,          V,          pV^,          \        ,          V,          p\        V 4      pVP                  WaV34      pVfM   \        V4      ^8  d   V'       d   VP                  4        K  W3R lp\        P                  ! Wh4      pWtWaV3&   \!        WP4      p	\        P                  ! WWV	R7      # )ab  
Return (a,b)-cosh/cosh pseudo-derivative of a periodic sequence.

If x_j and y_j are Fourier coefficients of periodic functions x
and y, respectively, then::

  y_j = cosh(j*a*2*pi/period)/cosh(j*b*2*pi/period) * x_j

Parameters
----------
x : array_like
    The array to take the pseudo-derivative from.
a,b : float
    Defines the parameters of the sinh/sinh pseudo-differential
    operator.
period : float, optional
    The period of the sequence x. Default is ``2*pi``.

Returns
-------
cc_diff : ndarray
    Pseudo-derivative of periodic sequence `x`.

Notes
-----
``cc_diff(cc_diff(x,a,b),b,a) == x``

cc_diff_cacher   c                 P    \        W,          4      \        W ,          4      ,          # r[   )r   rM   s   &&&r   r   cc_diff.<locals>.kernel  s    9T!#Y&&r   r^   )r!   r"   r#   r$   ra   r   r	   cc_diffr&   r'   r   r(   r)   r*   r
   r+   r   rR   s
   &&&&&     r   rd   rd     s   : &)//**v//#%F %%
!*CCsxxv6GCHHaF;;< 	<aCF6MaCF6MAAJJAwE}v;  	'00:Awc%KS;??r   c                   \        V\        P                  4      '       d&   \        VR4      '       g   / Vn        VP                  p\        V 4      p\        V4      '       d;   \        VP                  WV4      R\        VP                  WV4      ,          ,           # Ve   V^,          \        ,          V,          p\        V 4      pVP                  WQ34      pVfq   \        V4      ^8  d   V'       d   VP                  4        K  V3R lpV3R lp\        P                  ! WW^ ^ R7      p	\        P                  ! WX^^ R7      p
W3W5V3&   MVw  r\!        W@4      p\        P"                  ! WIV
VR7      # )a  
Shift periodic sequence x by a: y(u) = x(u+a).

If x_j and y_j are Fourier coefficients of periodic functions x
and y, respectively, then::

      y_j = exp(j*a*2*pi/period*sqrt(-1)) * x_f

Parameters
----------
x : array_like
    The array to take the pseudo-derivative from.
a : float
    Defines the parameters of the sinh/sinh pseudo-differential
period : float, optional
    The period of the sequences x and y. Default period is ``2*pi``.
shift_cacher   c                 $    \        W,          4      # r[   )r   r   rN   s   &&r   kernel_realshift.<locals>.kernel_real      qs8Or   c                 $    \        W,          4      # r[   )r   rh   s   &&r   kernel_imagshift.<locals>.kernel_imag  rk   r   r   r^   )r!   r"   r#   r$   rf   r   r	   shiftr&   r'   r   r(   r)   r*   r
   r+   r   
convolve_z)r,   rN   r-   r.   r/   r0   r1   ri   rm   
omega_real
omega_imagr    s   &&&&        r   ro   ro     sF   $ &)//**v}--!#F##
!*CCSXXq&1BHHa:) 5) ) 	)aCF6MAAJJuE}v;  	  	55aaCDF
55aaCDF
"-!u %
c%Ksj+68 8r   )
r%   r:   r@   rF   rI   rQ   rd   rW   r_   ro   )__doc____all__r"   numpyr   r   r   r   r   r   r   r	    r
   scipy.fft._pocketfft.helperr   r#   r.   r%   r:   r@   rF   rI   rQ   rW   r_   rd   ro   rD   r   r   <module>rx      s   

  G G G  3 
	 $v <6~ f BQJ V &QR  ?QD  $ ! 8Qv ! 4Qn ! 3@l ! 5@p F 28r   