U
    e»{jH  ã                   @   s–   d Z ddlZddlmZmZmZ ddlmZ ddl	m
Z
mZmZmZ dZeZdZee7 Zd	Zee7 Zed
7 Zdd„ Zdd„ Zdd„ Ze dee¡ dS )z�Quantity helpers for the scipy.special ufuncs.

Available ufuncs in this module are at
https://docs.scipy.org/doc/scipy/reference/special.html
é    N)Ú
UnitsErrorÚUnitTypeErrorÚdimensionless_unscaledé   )ÚUFUNC_HELPERS)Úget_converterÚhelper_cbrtÚ%helper_dimensionless_to_dimensionlessÚhelper_two_arg_dimensionless)'ÚerfÚerfcZerfcxZerfiZerfinvZerfcinvÚgammaZgammalnZloggammaZgammasgnÚpsiZrgammaZdigammaZwofzZdawsnZentrZexprelÚexpm1Úlog1pZexp2Zexp10Zj0Zj1Zy0Úy1Zi0Zi0eÚi1Zi1eZk0Zk0eZk1Zk1eZitj0y0Zit2j0y0Ziti0k0Zit2i0k0ZndtrZndtri)ZcosdgZsindgZtandgZcotdg)ZjvZjnZjveZynZyvZyveÚknÚkvZkveZivZiveZhankel1Zhankel1eZhankel2Zhankel2e)ÚcbrtÚradianc                 C   sJ   ddl m} zt||ƒgtfW S  tk
rD   td| j› d�ƒ‚Y nX d S )Nr   )ÚdegreeúCan only apply 'ú)' function to quantities with angle units)Úastropy.units.sir   r   r   r   r   Ú__name__)ÚfÚunitr   © r   új/var/www/html/bwave/python/venv/lib/python3.8/site-packages/astropy/units/quantity_helper/scipy_special.pyÚhelper_degree_to_dimensionless*   s    ÿr    c                 C   sf   ddl m}m}m}m} z"t||ƒt||ƒt||ƒg|fW S  tk
r`   td| j› d�ƒ‚Y nX d S )Nr   )ÚarcminÚarcsecr   r   r   r   )	r   r!   r"   r   r   r   r   r   r   )r   Zunit1Zunit2Zunit3r!   r"   r   r   r   r   r   Ú%helper_degree_minute_second_to_radian5   s    ýüÿr#   c                  C   s‚   dd l m}  i }tD ]$}t| |d ƒ}t|tjƒrt||< qtD ]}t	|t| |ƒ< q>t
D ]}t|t| |ƒ< qVt|| j< t|| j< |S )Nr   )Zscipy.specialÚspecialÚ)dimensionless_to_dimensionless_sps_ufuncsÚgetattrÚ
isinstanceÚnpÚufuncr	   Ú"degree_to_dimensionless_sps_ufuncsr    Ú two_arg_dimensionless_sps_ufuncsr
   r   r   r#   r   )ZspsZSCIPY_HELPERSÚnamer)   r   r   r   Úget_scipy_special_helpersD   s    


r-   zscipy.special)Ú__doc__Únumpyr(   Zastropy.units.corer   r   r   Ú r   Zhelpersr   r   r	   r
   r%   Zscipy_special_ufuncsr*   r+   r    r#   r-   Zregister_moduler   r   r   r   Ú<module>   s&   
  ÿ