§
    :zni½Y  ã                   óB  — d dl mZmZ d dlZd dlmZ d dlmZ d dlmZm	Z	m
Z
 g d¢Z e
 e	d¦  «        edd	i¦  «        Zd
„ Zdededej        dej        ddf
d„Z ed dj        dEi e¤Ž¦  «        ddddej        dddœdedee         dededeej                 dej        deej                 dedefd„¦   «         Z ed dj        dEi e¤Ž¦  «        ddej        dddœdededeej                 dej        deej                 dedefd „¦   «         Z ed! d"j        dEi e¤Ž¦  «        dddej        ddd#œded$ededeej                 dej        deej                 dedefd%„¦   «         Z ed& d'j        dEi e¤Ž¦  «        d(ddej        ddd)œded*ededeej                 dej        deej                 dedefd+„¦   «         Z ed, d-j        dEi e¤Ž¦  «        ddej        dddœdededeej                 dej        deej                 dedefd.„¦   «         Z ed/ d0j        dEi e¤Ž¦  «        ddej        dddœdededeej                 dej        deej                 dedefd1„¦   «         Z ed2 d3j        dEi e¤Ž¦  «        ddej        dddœdededeej                 dej        deej                 dedefd4„¦   «         Z ed5 d6j        dEi e¤Ž¦  «        ddej        dddœdededeej                 dej        deej                 dedefd7„¦   «         Z ed8 d9j        dEi e¤Ž¦  «        ddej        dddœd:ededeej                 dej        deej                 dedefd;„¦   «         Z  ed< d=j        dEi e¤Ž¦  «        d>ddej        ddd?œd@ededeej                 dej        deej                 dedefdA„¦   «         Z! edB dCj        dEi e¤Ž¦  «        ddej        dddœdededeej                 dej        deej                 dedefdD„¦   «         Z"dS )Fé    )ÚOptionalÚIterableN)Úsqrt)ÚTensor)Úfactory_common_argsÚparse_kwargsÚmerge_dicts)ÚbartlettÚblackmanÚcosineÚexponentialÚgaussianÚgeneral_cosineÚgeneral_hammingÚhammingÚhannÚkaiserÚnuttalla6  
    M (int): the length of the window.
        In other words, the number of points of the returned window.
    sym (bool, optional): If `False`, returns a periodic window suitable for use in spectral analysis.
        If `True`, returns a symmetric window suitable for use in filter design. Default: `True`.
Únormalizationz�The window is normalized to 1 (maximum value is 1). However, the 1 doesn't appear if :attr:`M` is even and :attr:`sym` is `True`.c                  ó   ‡ — ˆ fd„}|S )a8  Adds docstrings to a given decorated function.

    Specially useful when then docstrings needs string interpolation, e.g., with
    str.format().
    REMARK: Do not use this function if the docstring doesn't need string
    interpolation, just write a conventional docstring.

    Args:
        args (str):
    c                 ó<   •— d                      ‰¦  «        | _        | S )NÚ )ÚjoinÚ__doc__)ÚoÚargss    €ú|/var/www/html/cool-property-finder/image-detection-backend/venv/lib/python3.11/site-packages/torch/signal/windows/windows.pyÚ	decoratorz_add_docstr.<locals>.decorator4   s   ø€ Ø—G’G˜D‘M”MˆŒ	Øˆó    © )r   r   s   ` r   Ú_add_docstrr!   (   s$   ø€ ðð ð ð ð ð Ðr   Úfunction_nameÚMÚdtypeÚlayoutÚreturnc                 óÚ   — |dk     rt          | › d|› �¦  «        ‚|t          j        urt          | › d|› �¦  «        ‚|t          j        t          j        fvrt          | › d|› �¦  «        ‚dS )aŠ  Performs common checks for all the defined windows.
     This function should be called before computing any window.

     Args:
         function_name (str): name of the window function.
         M (int): length of the window.
         dtype (:class:`torch.dtype`): the desired data type of returned tensor.
         layout (:class:`torch.layout`): the desired layout of returned tensor.
     r   z, requires non-negative window length, got M=z/ is implemented for strided tensors only, got: z) expects float32 or float64 dtypes, got: N)Ú
ValueErrorÚtorchÚstridedÚfloat32Úfloat64)r"   r#   r$   r%   s       r   Ú_window_function_checksr-   ;   s�   € ð 	ˆ1‚u€uÝ˜MÐZÐZÐWXÐZÐZÑ[Ô[Ð[Ø•U”]Ð"Ð"Ý˜MÐbÐbÐZ`ÐbÐbÑcÔcÐcØ•U”]¥E¤MÐ2Ð2Ð2Ý˜MÐ[Ð[ÐTYÐ[Ð[Ñ\Ô\Ð\ð 3Ð2r   zì
Computes a window with an exponential waveform.
Also known as Poisson window.

The exponential window is defined as follows:

.. math::
    w_n = \exp{\left(-\frac{|n - c|}{\tau}\right)}

where `c` is the ``center`` of the window.
    aF  

{normalization}

Args:
    {M}

Keyword args:
    center (float, optional): where the center of the window will be located.
        Default: `M / 2` if `sym` is `False`, else `(M - 1) / 2`.
    tau (float, optional): the decay value.
        Tau is generally associated with a percentage, that means, that the value should
        vary within the interval (0, 100]. If tau is 100, it is considered the uniform window.
        Default: 1.0.
    {sym}
    {dtype}
    {layout}
    {device}
    {requires_grad}

Examples::

    >>> # Generates a symmetric exponential window of size 10 and with a decay value of 1.0.
    >>> # The center will be at (M - 1) / 2, where M is 10.
    >>> torch.signal.windows.exponential(10)
    tensor([0.0111, 0.0302, 0.0821, 0.2231, 0.6065, 0.6065, 0.2231, 0.0821, 0.0302, 0.0111])

    >>> # Generates a periodic exponential window and decay factor equal to .5
    >>> torch.signal.windows.exponential(10, sym=False,tau=.5)
    tensor([4.5400e-05, 3.3546e-04, 2.4788e-03, 1.8316e-02, 1.3534e-01, 1.0000e+00, 1.3534e-01, 1.8316e-02, 2.4788e-03, 3.3546e-04])
    ç      ð?TF)ÚcenterÚtauÚsymr$   r%   ÚdeviceÚrequires_gradr/   r0   r1   r2   r3   c          	      ó¸  — |€t          j        ¦   «         }t          d| ||¦  «         |dk    rt          d|› d�¦  «        ‚|r|�t          d¦  «        ‚| dk    rt          j        d||||¬¦  «        S |€|s| dk    r| n| dz
  d	z  }d|z  }t          j        | |z  | | dz
  z   |z  | ||||¬
¦  «        }	t          j        t          j        |	¦  «         ¦  «        S )Nr   r   zTau must be positive, got: ú	 instead.z)Center must be None for symmetric windows©r   ©r$   r%   r2   r3   é   ç       @©ÚstartÚendÚstepsr$   r%   r2   r3   )r)   Úget_default_dtyper-   r(   ÚemptyÚlinspaceÚexpÚabs)
r#   r/   r0   r1   r$   r%   r2   r3   ÚconstantÚks
             r   r   r   M   s  € ðr €}ÝÔ'Ñ)Ô)ˆå˜M¨1¨e°VÑ<Ô<Ð<à
ˆa‚x€xÝÐE°sÐEÐEÐEÑFÔFÐFà
ð FˆvÐ!ÝÐDÑEÔEÐEàˆA‚v€vÝŒ{˜4 u°VÀFÐZgÐhÑhÔhÐhà€~ØÐ3 1 q¢5 5�!�!¨a°!©e°sÑ:ˆà�3‰w€HåŒ˜f˜W xÑ/Ø#˜G q¨1¡uÑ-°Ñ9ØØ"Ø$Ø$Ø%2ð	4ñ 	4ô 	4€Aõ Œ9•e”i ‘l”l�]Ñ#Ô#Ð#r   zì
Computes a window with a simple cosine waveform.
Also known as the sine window.

The cosine window is defined as follows:

.. math::
    w_n = \cos{\left(\frac{\pi n}{M} - \frac{\pi}{2}\right)} = \sin{\left(\frac{\pi n}{M}\right)}
    aô  

{normalization}

Args:
    {M}

Keyword args:
    {sym}
    {dtype}
    {layout}
    {device}
    {requires_grad}

Examples::

    >>> # Generates a symmetric cosine window.
    >>> torch.signal.windows.cosine(10)
    tensor([0.1564, 0.4540, 0.7071, 0.8910, 0.9877, 0.9877, 0.8910, 0.7071, 0.4540, 0.1564])

    >>> # Generates a periodic cosine window.
    >>> torch.signal.windows.cosine(10, sym=False)
    tensor([0.1423, 0.4154, 0.6549, 0.8413, 0.9595, 1.0000, 0.9595, 0.8413, 0.6549, 0.4154])
©r1   r$   r%   r2   r3   c          	      ó@  — |€t          j        ¦   «         }t          d| ||¦  «         | dk    rt          j        d||||¬¦  «        S d}t           j        |s| dk    r| dz   n| z  }t          j        ||z  || dz
  z   |z  | ||||¬¦  «        }t          j        |¦  «        S )Nr   r   r6   r7   ç      à?r8   r:   )r)   r>   r-   r?   Úpir@   Úsin©	r#   r1   r$   r%   r2   r3   r;   rC   rD   s	            r   r   r   ¤   sÃ   € ð\ €}ÝÔ'Ñ)Ô)ˆå˜H a¨°Ñ7Ô7Ð7àˆA‚v€vÝŒ{˜4 u°VÀFÐZgÐhÑhÔhÐhà€EÝŒx¨Ð<°°A²°˜1˜q™5˜5¸1Ñ=€HåŒ˜U XÑ-Ø! Q¨¡U™O¨xÑ7ØØ"Ø$Ø$Ø%2ð	4ñ 	4ô 	4€Aõ Œ9�Q‰<Œ<Ðr   z§
Computes a window with a gaussian waveform.

The gaussian window is defined as follows:

.. math::
    w_n = \exp{\left(-\left(\frac{n}{2\sigma}\right)^2\right)}
    a   

{normalization}

Args:
    {M}

Keyword args:
    std (float, optional): the standard deviation of the gaussian. It controls how narrow or wide the window is.
        Default: 1.0.
    {sym}
    {dtype}
    {layout}
    {device}
    {requires_grad}

Examples::

    >>> # Generates a symmetric gaussian window with a standard deviation of 1.0.
    >>> torch.signal.windows.gaussian(10)
    tensor([4.0065e-05, 2.1875e-03, 4.3937e-02, 3.2465e-01, 8.8250e-01, 8.8250e-01, 3.2465e-01, 4.3937e-02, 2.1875e-03, 4.0065e-05])

    >>> # Generates a periodic gaussian window and standard deviation equal to 0.9.
    >>> torch.signal.windows.gaussian(10, sym=False,std=0.9)
    tensor([1.9858e-07, 5.1365e-05, 3.8659e-03, 8.4658e-02, 5.3941e-01, 1.0000e+00, 5.3941e-01, 8.4658e-02, 3.8659e-03, 5.1365e-05])
)Ústdr1   r$   r%   r2   r3   rK   c          	      óŽ  — |€t          j        ¦   «         }t          d| ||¦  «         |dk    rt          d|› d�¦  «        ‚| dk    rt          j        d||||¬¦  «        S |s| dk    r| n| dz
   dz  }d|t          d	¦  «        z  z  }t          j        ||z  || dz
  z   |z  | ||||¬
¦  «        }	t          j        |	d	z   ¦  «        S )Nr   r   z*Standard deviation must be positive, got: r5   r6   r7   r8   r9   é   r:   )r)   r>   r-   r(   r?   r   r@   rA   )
r#   rK   r1   r$   r%   r2   r3   r;   rC   rD   s
             r   r   r   è   sþ   € ð` €}ÝÔ'Ñ)Ô)ˆå˜J¨¨5°&Ñ9Ô9Ð9à
ˆa‚x€xÝÐTÀcÐTÐTÐTÑUÔUÐUàˆA‚v€vÝŒ{˜4 u°VÀFÐZgÐhÑhÔhÐhàÐ/˜q 1šu˜uˆaˆa¨!¨a©%Ð0°3Ñ6€Eà�C�$˜q™'œ'‘MÑ"€HåŒ˜U XÑ-Ø! Q¨¡U™O¨xÑ7ØØ"Ø$Ø$Ø%2ð	4ñ 	4ô 	4€Aõ Œ9�a˜1‘f�WÑÔÐr   aK  
Computes the Kaiser window.

The Kaiser window is defined as follows:

.. math::
    w_n = I_0 \left( \beta \sqrt{1 - \left( {\frac{n - N/2}{N/2}} \right) ^2 } \right) / I_0( \beta )

where ``I_0`` is the zeroth order modified Bessel function of the first kind (see :func:`torch.special.i0`), and
``N = M - 1 if sym else M``.
    aò  

{normalization}

Args:
    {M}

Keyword args:
    beta (float, optional): shape parameter for the window. Must be non-negative. Default: 12.0
    {sym}
    {dtype}
    {layout}
    {device}
    {requires_grad}

Examples::

    >>> # Generates a symmetric gaussian window with a standard deviation of 1.0.
    >>> torch.signal.windows.kaiser(5)
    tensor([4.0065e-05, 2.1875e-03, 4.3937e-02, 3.2465e-01, 8.8250e-01, 8.8250e-01, 3.2465e-01, 4.3937e-02, 2.1875e-03, 4.0065e-05])
    >>> # Generates a periodic gaussian window and standard deviation equal to 0.9.
    >>> torch.signal.windows.kaiser(5, sym=False,std=0.9)
    tensor([1.9858e-07, 5.1365e-05, 3.8659e-03, 8.4658e-02, 5.3941e-01, 1.0000e+00, 5.3941e-01, 8.4658e-02, 3.8659e-03, 5.1365e-05])
g      (@)Úbetar1   r$   r%   r2   r3   rN   c          	      ó:  — |€t          j        ¦   «         }t          d| ||¦  «         |dk     rt          d|› d�¦  «        ‚| dk    rt          j        d||||¬¦  «        S | dk    rt          j        d||||¬¦  «        S | }d	|z  |s| n| dz
  z  }t          j        ||| dz
  |z  z   | ||||¬
¦  «        }	t          j        t          j        ||z  t          j	        |	d¦  «        z
  ¦  «        ¦  «        t          j        t          j
        ||¬¦  «        ¦  «        z  S )Nr   r   z beta must be non-negative, got: r5   r6   r7   r8   ©r8   r9   r:   rM   )r2   )r)   r>   r-   r(   r?   Úonesr@   Úi0r   ÚpowÚtensor)
r#   rN   r1   r$   r%   r2   r3   r;   rC   rD   s
             r   r   r   2  sB  € ðb €}ÝÔ'Ñ)Ô)ˆå˜H a¨°Ñ7Ô7Ð7àˆa‚x€xÝÐK¸DÐKÐKÐKÑLÔLÐLàˆA‚v€vÝŒ{˜4 u°VÀFÐZgÐhÑhÔhÐhàˆA‚v€vÝŒz˜$ e°FÀ6ÐYfÐgÑgÔgÐgàˆE€EØ�T‰z cÐ4˜Q˜Q¨q°1©uÑ5€HåŒ˜UØ  A¨¡E¨XÑ#5Ñ5ØØ"Ø$Ø$Ø%2ð	4ñ 	4ô 	4€Aõ Œ8•E”J˜t d™{­U¬Y°q¸!©_¬_Ñ<Ñ=Ô=Ñ>Ô>ÅÄÍ%Ì,ÐW[ÐdjÐJkÑJkÔJkÑAlÔAlÑlÐlr   zœ
Computes the Hamming window.

The Hamming window is defined as follows:

.. math::
    w_n = \alpha - \beta\ \cos \left( \frac{2 \pi n}{M - 1} \right)
    a¡  

{normalization}

Arguments:
    {M}

Keyword args:
    {sym}
    alpha (float, optional): The coefficient :math:`\alpha` in the equation above.
    beta (float, optional): The coefficient :math:`\beta` in the equation above.
    {dtype}
    {layout}
    {device}
    {requires_grad}

Examples::

    >>> # Generates a symmetric Hamming window.
    >>> torch.signal.windows.hamming(10)
    tensor([0.0800, 0.1876, 0.4601, 0.7700, 0.9723, 0.9723, 0.7700, 0.4601, 0.1876, 0.0800])

    >>> # Generates a periodic Hamming window.
    >>> torch.signal.windows.hamming(10, sym=False)
    tensor([0.0800, 0.1679, 0.3979, 0.6821, 0.9121, 1.0000, 0.9121, 0.6821, 0.3979, 0.1679])
c                ó,   — t          | |||||¬¦  «        S )NrE   ©r   ©r#   r1   r$   r%   r2   r3   s         r   r   r     s!   € õZ ˜1 #¨U¸6È&Ð`mÐnÑnÔnÐnr   zÔ
Computes the Hann window.

The Hann window is defined as follows:

.. math::
    w_n = \frac{1}{2}\ \left[1 - \cos \left( \frac{2 \pi n}{M - 1} \right)\right] =
    \sin^2 \left( \frac{\pi n}{M - 1} \right)
    añ  

{normalization}

Arguments:
    {M}

Keyword args:
    {sym}
    {dtype}
    {layout}
    {device}
    {requires_grad}

Examples::

    >>> # Generates a symmetric Hann window.
    >>> torch.signal.windows.hann(10)
    tensor([0.0000, 0.1170, 0.4132, 0.7500, 0.9698, 0.9698, 0.7500, 0.4132, 0.1170, 0.0000])

    >>> # Generates a periodic Hann window.
    >>> torch.signal.windows.hann(10, sym=False)
    tensor([0.0000, 0.0955, 0.3455, 0.6545, 0.9045, 1.0000, 0.9045, 0.6545, 0.3455, 0.0955])
c          	      ó.   — t          | d|||||¬¦  «        S )NrG   ©Úalphar1   r$   r%   r2   r3   rV   rW   s         r   r   r   ¯  s0   € õX ˜1Ø!$Ø"Ø!&Ø"(Ø"(Ø)6ð8ñ 8ô 8ð 8r   zÊ
Computes the Blackman window.

The Blackman window is defined as follows:

.. math::
    w_n = 0.42 - 0.5 \cos \left( \frac{2 \pi n}{M - 1} \right) + 0.08 \cos \left( \frac{4 \pi n}{M - 1} \right)
    aá  

{normalization}

Arguments:
    {M}

Keyword args:
    {sym}
    {dtype}
    {layout}
    {device}
    {requires_grad}

Examples::

    >>> # Generates a symmetric Blackman window.
    >>> torch.signal.windows.blackman(5)
    tensor([-1.4901e-08,  3.4000e-01,  1.0000e+00,  3.4000e-01, -1.4901e-08])

    >>> # Generates a periodic Blackman window.
    >>> torch.signal.windows.blackman(5, sym=False)
    tensor([-1.4901e-08,  2.0077e-01,  8.4923e-01,  8.4923e-01,  2.0077e-01])
c          	      ó€   — |€t          j        ¦   «         }t          d| ||¦  «         t          | g d¢|||||¬¦  «        S )Nr   )gáz®GáÚ?rG   g{®Gáz´?©Úar1   r$   r%   r2   r3   )r)   r>   r-   r   rW   s         r   r   r   ä  sZ   € ðV €}ÝÔ'Ñ)Ô)ˆå˜J¨¨5°&Ñ9Ô9Ð9å˜!Ð0Ð0Ð0°cÀÈvÐ^dØ(5ð7ñ 7ô 7ð 7r   a4  
Computes the Bartlett window.

The Bartlett window is defined as follows:

.. math::
    w_n = 1 - \left| \frac{2n}{M - 1} - 1 \right| = \begin{cases}
        \frac{2n}{M - 1} & \text{if } 0 \leq n \leq \frac{M - 1}{2} \\
        2 - \frac{2n}{M - 1} & \text{if } \frac{M - 1}{2} < n < M \\ \end{cases}
    a  

{normalization}

Arguments:
    {M}

Keyword args:
    {sym}
    {dtype}
    {layout}
    {device}
    {requires_grad}

Examples::

    >>> # Generates a symmetric Bartlett window.
    >>> torch.signal.windows.bartlett(10)
    tensor([0.0000, 0.2222, 0.4444, 0.6667, 0.8889, 0.8889, 0.6667, 0.4444, 0.2222, 0.0000])

    >>> # Generates a periodic Bartlett window.
    >>> torch.signal.windows.bartlett(10, sym=False)
    tensor([0.0000, 0.2000, 0.4000, 0.6000, 0.8000, 1.0000, 0.8000, 0.6000, 0.4000, 0.2000])
c          	      ó^  — |€t          j        ¦   «         }t          d| ||¦  «         | dk    rt          j        d||||¬¦  «        S | dk    rt          j        d||||¬¦  «        S d}d|s| n| dz
  z  }t          j        ||| dz
  |z  z   | ||||¬	¦  «        }dt          j        |¦  «        z
  S )
Nr
   r   r6   r7   r8   rP   éÿÿÿÿrM   r:   )r)   r>   r-   r?   rQ   r@   rB   rJ   s	            r   r
   r
     sß   € ðZ €}ÝÔ'Ñ)Ô)ˆå˜J¨¨5°&Ñ9Ô9Ð9àˆA‚v€vÝŒ{˜4 u°VÀFÐZgÐhÑhÔhÐhàˆA‚v€vÝŒz˜$ e°FÀ6ÐYfÐgÑgÔgÐgà€EØ˜SÐ+�A�A a¨!¡eÑ,€HåŒ˜UØ  A¨¡E¨XÑ#5Ñ5ØØ"Ø$Ø$Ø%2ð	4ñ 	4ô 	4€Að �uŒy˜‰|Œ|ÑÐr   z¹
Computes the general cosine window.

The general cosine window is defined as follows:

.. math::
    w_n = \sum^{M-1}_{i=0} (-1)^i a_i \cos{ \left( \frac{2 \pi i n}{M - 1}\right)}
    aÁ  

{normalization}

Arguments:
    {M}

Keyword args:
    a (Iterable): the coefficients associated to each of the cosine functions.
    {sym}
    {dtype}
    {layout}
    {device}
    {requires_grad}

Examples::

    >>> # Generates a symmetric general cosine window with 3 coefficients.
    >>> torch.signal.windows.general_cosine(10, a=[0.46, 0.23, 0.31], sym=True)
    tensor([0.5400, 0.3376, 0.1288, 0.4200, 0.9136, 0.9136, 0.4200, 0.1288, 0.3376, 0.5400])

    >>> # Generates a periodic general cosine window wit 2 coefficients.
    >>> torch.signal.windows.general_cosine(10, a=[0.5, 1 - 0.5], sym=False)
    tensor([0.0000, 0.0955, 0.3455, 0.6545, 0.9045, 1.0000, 0.9045, 0.6545, 0.3455, 0.0955])
r]   c          	      ó  — |€t          j        ¦   «         }t          d| ||¦  «         | dk    rt          j        d||||¬¦  «        S | dk    rt          j        d||||¬¦  «        S t          |t          ¦  «        st          d¦  «        ‚|st          d¦  «        ‚d	t           j	        z  |s| n| dz
  z  }t          j
        d| dz
  |z  | ||||¬
¦  «        }t          j        d„ t          |¦  «        D ¦   «         |||¬¦  «        }	t          j        |	j        d         |	j        |	j        |	j        ¬¦  «        }
|	                     d¦  «        t          j        |
                     d¦  «        |z  ¦  «        z                       d¦  «        S )Nr   r   r6   r7   r8   rP   z!Coefficients must be a list/tuplezCoefficients cannot be emptyrM   r:   c                 ó$   — g | ]\  }}d |z  |z  ‘ŒS )r_   r    )Ú.0ÚiÚws      r   ú
<listcomp>z"general_cosine.<locals>.<listcomp>¥  s$   € Ð?Ð?Ð?©$¨!¨Q˜ ™	 A™Ð?Ð?Ð?r   )r2   r$   r3   )r$   r2   r3   r_   )r)   r>   r-   r?   rQ   Ú
isinstancer   Ú	TypeErrorr(   rH   r@   rT   Ú	enumerateÚarangeÚshaper$   r2   r3   Ú	unsqueezeÚcosÚsum)r#   r]   r1   r$   r%   r2   r3   rC   rD   Úa_irc   s              r   r   r   ^  s”  € ðX €}ÝÔ'Ñ)Ô)ˆåÐ,¨a°¸Ñ?Ô?Ð?àˆA‚v€vÝŒ{˜4 u°VÀFÐZgÐhÑhÔhÐhàˆA‚v€vÝŒz˜$ e°FÀ6ÐYfÐgÑgÔgÐgå�a�Ñ"Ô"ð =ÝÐ;Ñ<Ô<Ð<àð 9ÝÐ7Ñ8Ô8Ð8à•5”8‰|¨Ð6˜q˜q°°Q±Ñ7€HåŒ˜QØ ™E XÑ-ØØ"Ø$Ø$Ø%2ð	4ñ 	4ô 	4€Aõ Œ,Ð?Ð?µ)¸A±,´,Ð?Ñ?Ô?ÈÐV[ÐkxÐ
yÑ
yÔ
y€CÝŒ�S”Y˜q”\¨¬¸3¼:ÐUXÔUfÐgÑgÔg€AØ�MŠM˜"ÑÔ¥¤	¨!¯+ª+°b©/¬/¸AÑ*=Ñ >Ô >Ñ>×CÒCÀAÑFÔFÐFr   z²
Computes the general Hamming window.

The general Hamming window is defined as follows:

.. math::
    w_n = \alpha - (1 - \alpha) \cos{ \left( \frac{2 \pi n}{M-1} \right)}
    a£  

{normalization}

Arguments:
    {M}

Keyword args:
    alpha (float, optional): the window coefficient. Default: 0.54.
    {sym}
    {dtype}
    {layout}
    {device}
    {requires_grad}

Examples::

    >>> # Generates a symmetric Hamming window with the general Hamming window.
    >>> torch.signal.windows.general_hamming(10, sym=True)
    tensor([0.0800, 0.1876, 0.4601, 0.7700, 0.9723, 0.9723, 0.7700, 0.4601, 0.1876, 0.0800])

    >>> # Generates a periodic Hann window with the general Hamming window.
    >>> torch.signal.windows.general_hamming(10, alpha=0.5, sym=False)
    tensor([0.0000, 0.0955, 0.3455, 0.6545, 0.9045, 1.0000, 0.9045, 0.6545, 0.3455, 0.0955])
gHáz®Gá?rY   rZ   c          	      ó8   — t          | |d|z
  g|||||¬¦  «        S )Nr.   r\   ©r   )r#   rZ   r1   r$   r%   r2   r3   s          r   r   r   ª  s9   € õZ ˜!Ø" B¨¡JÐ/Ø!Ø %Ø!'Ø!'Ø(5ð7ñ 7ô 7ð 7r   uÜ   
Computes the minimum 4-term Blackman-Harris window according to Nuttall.

.. math::
    w_n = 1 - 0.36358 \cos{(z_n)} + 0.48917 \cos{(2z_n)} - 0.13659 \cos{(3z_n)} + 0.01064 \cos{(4z_n)}

where ``z_n = 2 Ï€ n/ M``.
    uå  

{normalization}

Arguments:
    {M}

Keyword args:
    {sym}
    {dtype}
    {layout}
    {device}
    {requires_grad}

References::

    - A. Nuttall, â€œSome windows with very good sidelobe behavior,â€�
      IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. 29, no. 1, pp. 84-91,
      Feb 1981. https://doi.org/10.1109/TASSP.1981.1163506

    - Heinzel G. et al., â€œSpectrum and spectral density estimation by the Discrete Fourier transform (DFT),
      including a comprehensive list of window functions and some new flat-top windowsâ€�,
      February 15, 2002 https://holometer.fnal.gov/GH_FFT.pdf

Examples::

    >>> # Generates a symmetric Nutall window.
    >>> torch.signal.windows.general_hamming(5, sym=True)
    tensor([3.6280e-04, 2.2698e-01, 1.0000e+00, 2.2698e-01, 3.6280e-04])

    >>> # Generates a periodic Nuttall window.
    >>> torch.signal.windows.general_hamming(5, sym=False)
    tensor([3.6280e-04, 1.1052e-01, 7.9826e-01, 7.9826e-01, 1.1052e-01])
c          	      ó2   — t          | g d¢|||||¬¦  «        S )N)g¹zíD×?g;%¯Nß?g¡1“¨|Á?gžòC Ë…?r\   rp   rW   s         r   r   r   à  s6   € õn ˜!ØHÐHÐHØ!Ø %Ø!'Ø!'Ø(5ð7ñ 7ô 7ð 7r   r    )#Útypingr   r   r)   Úmathr   r   Útorch._torch_docsr   r   r	   Ú__all__Úwindow_common_argsr!   ÚstrÚintr$   r%   r-   Úformatr*   ÚfloatÚboolr2   r   r   r   r   r   r   r   r
   r   r   r   r    r   r   ú<module>r|      sb
  ðØ %Ð %Ð %Ð %Ð %Ð %Ð %Ð %à €€€Ø Ð Ð Ð Ð Ð à Ð Ð Ð Ð Ð Ø LÐ LÐ LÐ LÐ LÐ LÐ LÐ LÐ LÐ Lðð ð €ð !�[Ø€Lð	ñô ð àð Hðñô Ð ð"ð ð ð&]¨3ð ]°3ð ]¸u¼{ð ]ÐTYÔT`ð ]Ðeið ]ð ]ð ]ð ]ð$ €ð
ðð ô< 	ð= ð  ð> ð? ð  ñ-ô -ðb #'ØØØ'+Ø$œ}Ø)-Ø#ð&$ð &$ð &$Øð&$ð ˜”ð&$ð ð	&$ð
 ð&$ð ˜œÔ$ð&$ð ”ð&$ð ˜œÔ&ð&$ð ð&$ð ð&$ð &$ð &$ñ]-ô -ð\&$ðR €ððð ô. ð/ð ð0 ð1ð ñ$ô $ðP Ø'+Ø$œ}Ø)-Ø#ðð ð Øðð ðð ˜œÔ$ð	ð
 ”ðð ˜œÔ&ðð ðð ðð ð ñK$ô $ðJð> €ððð ô2 ð3ð ð4 ð5ð ñ%ô %ðR ØØ'+Ø$œ}Ø)-Ø#ð!ð !ð !Øð!ð ð!ð ð	!ð
 ˜œÔ$ð!ð ”ð!ð ˜œÔ&ð!ð ð!ð ð!ð !ð !ñM%ô %ðL!ðH €ð
ðð ô. ð/ð ð0 ð1ð ñ&ô &ðT ØØ'+Ø$œ}Ø)-Ø#ð#mð #mð #mØð#mð ð#mð ð	#mð
 ˜œÔ$ð#mð ”ð#mð ˜œÔ&ð#mð ð#mð ð#mð #mð #mñO&ô &ðN#mðL €ððð ô2 ð3ð ð4 ð5ð ñ%ô %ðP Ø+/Ø#(¤=Ø-1Ø"'ðoð oð oˆsð oàðoð ˜EœKÔ(ðoð ”Lð	oð
 ˜Uœ\Ô*ðoð  ðoð -3ðoð oð oñM%ô %ðLoð €ððð ô. ð/ð ð0 ð1ð ñ$ô $ðN Ø(,Ø %¤Ø*.Ø$ð8ð 8ð 8ˆCð 8àð8ð ˜œÔ%ð8ð ”ð	8ð
 ˜%œ,Ô'ð8ð ð8ð *0ð8ð 8ð 8ñK$ô $ðJ8ð  €ððð ô. ð/ð ð0 ð1ð ñ#ô #ðL Ø,0Ø$)¤MØ.2Ø#(ð7ð 7ð 7�ð 7àð7ð ˜Uœ[Ô)ð7ð ”\ð	7ð
 ˜eœlÔ+ð7ð !ð7ð .4ð7ð 7ð 7ñI#ô #ðH7ð  €ð	ðð ô. ð/ð ð0 ð1ð ñ%ô %ðP Ø,0Ø$)¤MØ.2Ø#(ðð ð �ð àðð ˜Uœ[Ô)ðð ”\ð	ð
 ˜eœlÔ+ðð !ðð .4ðð ð ñM%ô %ðLð@ €ððð ô0 ð1ð ð2 ð3ð ñ$ô $ðN  $Ø26Ø*/¬-Ø48Ø).ð$Gð $Gð $GØð$Gàð$Gð # 5¤;Ô/ð$Gð !œ<ð	$Gð
 $ E¤LÔ1ð$Gð #'ð$Gð 4:ð$Gð $Gð $GñK$ô $ðJ$GðN €ððð ô0 ð1ð ð2 ð3ð ñ$ô $ðN $(Ø $Ø37Ø+0¬=Ø59Ø*/ð7ð 7ð 7à ð7ð ð7ð $ E¤KÔ0ð	7ð
 "œLð7ð % U¤\Ô2ð7ð $(ð7ð 5;ð7ð 7ð 7ñK$ô $ðJ7ð" €ðð!ð !ôB ðC#ð #ðD ðE#ð #ñ-ô -ðb Ø'+Ø$œ}Ø)-Ø#ð7ð 7ð 7Øð7ð ð7ð ˜œÔ$ð	7ð
 ”ð7ð ˜œÔ&ð7ð ð7ð ð7ð 7ð 7ñ]-ô -ð\7ð 7ð 7r   