§
    fŠtjí  ã                   óÄ   — d dl Zd dlmZ ddlmZmZ ddlmZm	Z	 d dl
mZmZ g d¢Z ej        d¦  «        Zdd
„Zdd„Zdd„Z ed¬¦  «        dd„¦   «         Zdddœd„ZdS )é    N)Úwarné   )ÚrfftÚirffté   )ÚloggammaÚpoch)Úarray_namespaceÚxp_capabilities)ÚfhtÚifhtÚ	fhtoffsetç        c           	      óÈ  — t          | ¦  «        }|                     | ¦  «        } | j        d         }|dk    rF|dz
  dz  }|                     ||j        ¬¦  «        }| |                     | ||z
  z  |z  ¦  «        z  } |                     t          |||||¬¦  «        ¦  «        }	t          | |	|¬¦  «        }
|dk    r%|
|                     | ||z
  |z  |z   z  ¦  «        z  }
|
S )Néÿÿÿÿr   r   r   ©Údtype)ÚoffsetÚbias©Úxp©r
   ÚasarrayÚshapeÚarangeÚfloat64ÚexpÚfhtcoeffÚ_fhtq)ÚaÚdlnÚmur   r   r   ÚnÚj_cÚjÚuÚAs              úW/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/scipy/fft/_fftlog_backend.pyr   r      sõ   € Ý	˜Ñ	Ô	€BØ
�
Š
�1‰Œ€Að 	
Œ�Œ€Að ˆq‚y€yà�‰s�A‰gˆØ�IŠI�a˜rœzˆIÑ*Ô*ˆØ�—’˜�u˜a #™g‘ sÑ*Ñ+Ô+Ñ+ˆð 	�
Š
•8˜A˜s B¨v¸DÐAÑAÔAÑBÔB€Aõ 	ˆa��rÐÑÔ€Að ˆq‚y€yà	ˆR�VŠV�T�E˜A ™G S™=¨6Ñ1Ñ2Ñ3Ô3Ñ3ˆà€Hó    c           
      óÊ  — t          | ¦  «        }|                     | ¦  «        } | j        d         }|dk    rH|dz
  dz  }|                     ||j        ¬¦  «        }| |                     |||z
  |z  |z   z  ¦  «        z  } |                     t          |||||d¬¦  «        ¦  «        }	t          | |	d|¬¦  «        }
|dk    r"|
|                     | ||z
  z  |z  ¦  «        z  }
|
S )	Nr   r   r   r   r   T)r   r   Úinverse)r+   r   r   )r'   r!   r"   r   r   r   r#   r$   r%   r&   r    s              r(   r   r   *   s÷   € Ý	˜Ñ	Ô	€BØ
�
Š
�1‰Œ€Að 	
Œ�Œ€Að ˆq‚y€yà�‰s�A‰gˆØ�IŠI�a˜rœzˆIÑ*Ô*ˆØ�—’�t˜a #™g s™]¨VÑ3Ñ4Ñ5Ô5Ñ5ˆð 	�
Š
•8˜A˜s B¨v¸DÈ$ÐOÑOÔOÑPÔP€Aõ 	ˆa�˜D RÐ(Ñ(Ô(€Að ˆq‚y€yà	ˆR�VŠV�T�E˜1˜s™7‘O CÑ'Ñ(Ô(Ñ(ˆà€Hr)   Fc                 óB  — ||}}|dz   |z   dz  }|dz   |z
  dz  }	t          j        dt           j        | dz  z  | |z  z  | dz  dz   ¦  «        }
t          j        | dz  dz   t          ¬¦  «        }t          j        | dz  dz   t          ¬¦  «        }|
|j        dd…<   |	|j        dd…<   t          ||¬¦  «         ||j        dd…<   t          ||¬¦  «         |
dt          |z
  z  z  }
|xj        |j        z  c_        |xj        t          |z  z  c_        |xj        |j        z  c_        |xj        |
z  c_        t          j	        ||¬¦  «         | dz  dk    r
d|j        d<   t          j
        |d         ¦  «        sd|z  t          |	||	z
  ¦  «        z  |d<   t          j        |d         ¦  «        r-|s+t          dd	¬
¦  «         t          j        |¦  «        }d|d<   nB|d         dk    r6|r4t          dd	¬
¦  «         t          j        |¦  «        }t           j        |d<   |S )z:Compute the coefficient array for a fast Hankel transform.r   r   r   r   N)Úoutr   z.singular transform; consider changing the biasé   )Ú
stacklevelz6singular inverse transform; consider changing the bias)ÚnpÚlinspaceÚpiÚemptyÚcomplexÚimagÚrealr   ÚLN_2r   Úisfiniter	   Úisinfr   ÚcopyÚinf)r#   r!   r"   r   r   r+   ÚlnkrÚqr   ÚxmÚyr&   Úvs                r(   r   r   F   s4  € à�dˆ!€Dð
 ˆQ‰$ˆq‰&�!‰€BØ
ˆQ‰$ˆq‰&�!‰€BÝ
Œ�A•r”u˜a ™d‘| Q s¡UÑ+¨Q°©T°!©VÑ4Ô4€AÝ
Œ��A‘�a‘�wÐ'Ñ'Ô'€AÝ
Œ��A‘�a‘�wÐ'Ñ'Ô'€AØ€A„Fˆ1ˆ1ˆ1�IØ€A„Fˆ1ˆ1ˆ1�IÝˆQ�AÐÑÔÐØ€A„Fˆ1ˆ1ˆ1�IÝˆQ�AÐÑÔÐØˆ�D�4‰K‰Ñ€AØ€F„FˆaŒfÑ€F„FØ€F„F�d�1‰fÑ€F„FØ€F„FˆaŒfÑ€F„FØ€F„Fˆa�K€F„FÝ„Fˆ1�!ÐÑÔÐð 	ˆ1�u�‚z€zØˆŒˆr‰
õ Œ;�q˜”tÑÔð &ð �!‰t•d˜2˜r "™u‘o”oÑ%ˆˆ!‰õ
 
„x��!”�~„~ð 	˜gð 	ÝÐ=È!ÐLÑLÔLÐLåŒG�A‰JŒJˆØˆˆ!‰ˆØ	
ˆ1Œ�Šˆ�wˆÝÐEÐRSÐTÑTÔTÐTåŒG�A‰JŒJˆÝŒvˆˆ!‰à€Hr)   T)Úout_of_scopec                 ó<  — ||}}|dz   |z   dz  }|dz   |z
  dz  }t           j        d| z  z  }t          |d|z  z   ¦  «        }	t          |d|z  z   ¦  «        }
t          |z
  | z  |	j        |
j        z   t           j        z  z   }||t          j        |¦  «        z
  | z  z   S )aî  Return optimal offset for a fast Hankel transform.

    Returns an offset close to `initial` that fulfils the low-ringing
    condition of [1]_ for the fast Hankel transform `fht` with logarithmic
    spacing `dln`, order `mu` and bias `bias`.

    Parameters
    ----------
    dln : float
        Uniform logarithmic spacing of the transform.
    mu : float
        Order of the Hankel transform, any positive or negative real number.
    initial : float, optional
        Initial value for the offset. Returns the closest value that fulfils
        the low-ringing condition.
    bias : float, optional
        Exponent of power law bias, any positive or negative real number.

    Returns
    -------
    offset : float
        Optimal offset of the uniform logarithmic spacing of the transform that
        fulfils a low-ringing condition.

    Examples
    --------
    >>> from scipy.fft import fhtoffset
    >>> dln = 0.1
    >>> mu = 2.0
    >>> initial = 0.5
    >>> bias = 0.0
    >>> offset = fhtoffset(dln, mu, initial, bias)
    >>> offset
    0.5454581477676637

    See Also
    --------
    fht : Definition of the fast Hankel transform.

    References
    ----------
    .. [1] Hamilton A. J. S., 2000, MNRAS, 312, 257 (astro-ph/9905191)

    r   r   y              ð?)r0   r2   r   r7   r5   Úround)r!   r"   Úinitialr   r<   r=   r   r>   r?   ÚzpÚzmÚargs               r(   r   r   y   s©   € ð^ �tˆ!€Dà
ˆQ‰$ˆq‰&�!‰€BØ
ˆQ‰$ˆq‰&�!‰€BÝ
Œˆq�‰u‰€AÝ	�"�r˜!‘t‘)Ñ	Ô	€BÝ	�"�r˜!‘t‘)Ñ	Ô	€BÝ�$‰;˜Ñ
˜rœw¨¬Ñ0µ"´%Ñ7Ñ
7€CØ�3�œ #™œÑ&¨Ñ+Ñ+Ð+r)   r   c                óæ   — |€t           }| j        d         }t          | d¬¦  «        }|s||z  }n||                     |¦  «        z  }t	          ||d¬¦  «        }|                     |d¬¦  «        }|S )zUCompute the biased fast Hankel transform.

    This is the basic FFTLog routine.
    Nr   )Úaxis)r0   r   r   Úconjr   Úflip)r    r&   r+   r   r#   r'   s         r(   r   r   ³   s…   € ð
 
€zÝˆð 	
Œ�Œ€Aõ 	ˆQ�RÐÑÔ€AØð à	ˆQ‰ˆˆð 	
ˆR�WŠW�Q‰ZŒZ‰ˆÝˆa�˜ÐÑÔ€AØ
�Š�˜ˆÑÔ€Aà€Hr)   )r   r   )r   r   F)F)Únumpyr0   Úwarningsr   Ú_basicr   r   Úspecialr   r	   Úscipy._lib._array_apir
   r   Ú__all__Úlogr7   r   r   r   r   r   © r)   r(   ú<module>rT      s  ðØ Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ð Ð Ø $Ð $Ð $Ð $Ð $Ð $Ð $Ð $à BÐ BÐ BÐ BÐ BÐ BÐ BÐ Bà
&Ð
&Ð
&€ð €r„vˆa�y„y€ðð ð ð ð8ð ð ð ð80ð 0ð 0ð 0ðf €˜dÐ#Ñ#Ô#ð6,ð 6,ð 6,ñ $Ô#ð6,ðr Tð ð ð ð ð ð ð r)   