o
    Ö­j  ã                   @   sš   d dl mZmZmZmZmZ d dlmZmZm	Z	 d dl
m  mZ d dlmZ dd„ Zdd„ Zd	d
„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ ZdS )é    )ÚfindÚvalueÚcÚspeed_of_lightÚ	precision)Úassert_equalÚassert_Úassert_almost_equalN)Ú	constantsc                  C   sP   t ddd�} t| dgƒ t ddd�} t| g ƒ t ddd�} t| tg d¢ƒƒ d S )Nzweak mixingF©Údispzweak mixing angleÚ
qwertyuiopznatural unit)
znatural unit of velocityznatural unit of actionznatural unit of action in eV sznatural unit of massznatural unit of energyznatural unit of energy in MeVznatural unit of momentumz!natural unit of momentum in MeV/cznatural unit of lengthznatural unit of time)r   r   Úsorted)Úkeys© r   ú^/var/www/html/CropPilot/venv/lib/python3.10/site-packages/scipy/constants/tests/test_codata.pyÚ	test_find   s   
r   c                  C   s$   d} t t| ƒtƒ t t| ƒtƒ d S )Núspeed of light in vacuum)r   r   r   r   )Úc_sr   r   r   Útest_basic_table_parse   s   r   c                   C   s"   t dt d¡t d¡f dƒ d S )Nz%d %sr   z299792458 m s^-1)r   Ú_cdr   Úunitr   r   r   r   Útest_basic_lookup!   s
   ÿþr   c                   C   s   t ttdd�ƒdkƒ d S )NFr   i,  )r   Úlenr   r   r   r   r   Útest_find_all'   s   r   c                   C   s   t tddd�d dƒ d S )Nz	Wien freqFr   r   z(Wien frequency displacement law constant)r   r   r   r   r   r   Útest_find_single+   s   ÿr   c                   C   s   t tdƒtdƒƒ d S )Nzmagn. flux quantumzmag. flux quantum)r	   r   r   r   r   r   Útest_2002_vs_20060   s   ÿr   c                  C   sV   t dd„ tj ¡ D ƒƒ} t | ¡}| ¡ D ]\}}t|t|ƒƒ t|ƒdks(J ‚qd S )Nc                 s   s    � | ]\}}||d  fV  qdS )r   Nr   )Ú.0ÚkÚvr   r   r   Ú	<genexpr>7   s   € z$test_exact_values.<locals>.<genexpr>r   )Údictr   Ú_physical_constants_2018ÚitemsÚ	exact2018r   r   r   )ÚexactÚreplaceÚkeyÚvalr   r   r   Útest_exact_values5   s   
þr)   c                  C   sB   t j} t jd d }t jd d }| |  kr|ksJ ‚ J ‚d S )Nzelectric constantr   zvacuum electric permittivity)r
   Ú	epsilon_0Úphysical_constants)ÚaÚbr   r   r   r   Útest_gh11341>   s    r.   c                  C   s:   t jd d } t jd d t jd d  }| |ksJ ‚d S )NzBoltzmann constant in eV/Kr   zBoltzmann constantzelementary charge)r
   r+   )ÚresÚrefr   r   r   Útest_gh14467G   s
   ÿr1   )Úscipy.constantsr   r   r   r   r   Únumpy.testingr   r   r	   Úscipy.constants._codatar
   Ú_codatar   Úscipyr   r   r   r   r   r   r)   r.   r1   r   r   r   r   Ú<module>   s    		