B
    î&]\<   ã               @   sè  d Z ddlmZmZmZ ddlZddlmZ	 ddl
ZejZde d¡ d  ZZdZd	Zd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'd Z(dd! Z)dd" Z*e	d#ƒ Z+Z,d$e Z-de-e+ e+  Z.e	d%ƒ Z/Z0e/de  Z1e	d&ƒ Z2Z3e	d'ƒZ4e	d(ƒ Z5Z6e	d)ƒ Z7Z8e	d*ƒ Z9Z:e	d+ƒ Z;Z<e	d,ƒ Z=Z>e	d-ƒ Z?Z@e	d.ƒZAe	d/ƒZBdZCdZDd0ZEd1eE  ZFZGeGe4 d2  ZHZIeHd3 ZJeGd4  ZKZLd5eG ZMd6eG ZNd7eG ZOd8eE ZPd3eP ZQd9ZRe	d:ƒ ZSZTe	d;ƒ ZUZVe	d<ƒ ZWZXe	d=ƒ ZY ZZZ[ed> Z\e\d?  Z]Z^e]d?  Z_Z`d@Zad?ea ZbdAeb ZcdBec ZddCec ZedDec Zfd2Zgd3eg ZhdEeh ZidFei ZjegdG ZkegdH  ZlZmdIZndJen ZodKZpdZqdLZrdZsdM ZtZuefe+ Zvete_ Zwe	dNƒ ZxZydOZzexdP  Z{Z|eGe4 egeg  Z}dQZ~dRehd  Zd Z€ZdSegdE   Z‚ZƒeƒdT  Z„Z…dUeƒ  Z†Z‡dVZˆeˆdW Z‰deb ZŠejeb Z‹dX ZŒZepeb ZŽdYZdZZe6 Z‘Z’d[ Z“Z”d\Z•d]Z–eGe e” eC Z—eGe e• eC  Z˜Z™de” Zšd^eh eG e4  Z›Zœd_ ZZžeGe4  ZŸZ e4 Z¡Z¢d`da„ Z£dbdc„ Z¤ddde„ Z¥dS )fa  
Collection of physical constants and conversion factors.

Most constants are in SI units, so you can do
print '10 mile per minute is', 10*mile/minute, 'm/s or', 10*mile/(minute*knot), 'knots'

The list is not meant to be comprehensive, but just a convenient list for everyday use.
é    )ÚdivisionÚprint_functionÚabsolute_importNé   )Úvalueé   é   g´ÙyCxêDgPïâÖäKDg ÈNgmÁ«Cg  4&õkCg   ¢”mBg    eÍÍAg    €„.Ag     @@g      Y@g      $@gš™™™™™¹?g{®Gáz„?gü©ñÒMbP?gíµ ÷Æ°>g•Ö&è.>gê-™—q=gVçž¯Ò<g¬CÒÑ]r2<gO›
´ã’;i   i   i   @l        l           l            éF   éP   zspeed of light in vacuumgH¯¼šò×š>zPlanck constantz!Newtonian constant of gravitationz standard acceleration of gravityzelementary chargezmolar gas constantzfine-structure constantzAvogadro constantzBoltzmann constantzStefan-Boltzmann constantz)Wien wavelength displacement law constantzRydberg constantgê€Ì”ü?iX  g¦
F%uš?é   é   é   iÀ  iÐ  ià  g-Cëâ6*?zelectron masszproton masszneutron masszatomic mass constanté´   é<   g      N@é   é   im  g     Ôv@é   ià  iè  éH   g;p‚jÚÓ?i   g     ðœ@g»½×Ùß|Û=g €1-]jABzstandard atmosphereg     jø@iø  g     ˆÃ@i(ª  éç   é€   é*   g½¨þ½ëžr?é    g     Hu@gfffffq@grÇqÇá?g#Ûù~j¼@g:’ËH¿@gH¯¼šò×z>i&  gñhãˆµøä>c             C   sü   |  ¡ dkrt | ¡t }nl|  ¡ dkr4t | ¡}nT|  ¡ dkr\t | ¡d d d t }n,|  ¡ dkr|t | ¡d d }ntd| ƒ‚|  ¡ dkrž|t }nZ|  ¡ dkr°|}nH|  ¡ dkrÒ|t d d d }n&|  ¡ dkrì|d d }ntd	| ƒ‚|S )
aA  
    Convert from a temperature scale to another one among Celsius, Kelvin,
    Fahrenheit and Rankine scales.

    Parameters
    ----------
    val : array_like
        Value(s) of the temperature(s) to be converted expressed in the
        original scale.

    old_scale: str
        Specifies as a string the original scale from which the temperature
        value(s) will be converted. Supported scales are Celsius ('Celsius',
        'celsius', 'C' or 'c'), Kelvin ('Kelvin', 'kelvin', 'K', 'k'),
        Fahrenheit ('Fahrenheit', 'fahrenheit', 'F' or 'f') and Rankine
        ('Rankine', 'rankine', 'R', 'r').

    new_scale: str
        Specifies as a string the new scale to which the temperature
        value(s) will be converted. Supported scales are Celsius ('Celsius',
        'celsius', 'C' or 'c'), Kelvin ('Kelvin', 'kelvin', 'K', 'k'),
        Fahrenheit ('Fahrenheit', 'fahrenheit', 'F' or 'f') and Rankine
        ('Rankine', 'rankine', 'R', 'r').

    Returns
    -------
    res : float or array of floats
        Value(s) of the converted temperature(s) expressed in the new scale.

    Notes
    -----
    .. versionadded:: 0.18.0

    Examples
    --------
    >>> from scipy.constants import convert_temperature
    >>> convert_temperature(np.array([-40, 40.0]), 'Celsius', 'Kelvin')
    array([ 233.15,  313.15])

    )ZcelsiusÚc)ZkelvinÚk)Z
fahrenheitÚfg      @@g      @g      "@)ZrankineÚrzU%s scale is unsupported: supported scales are Celsius, Kelvin, Fahrenheit and Rankinez_'%s' scale is unsupported: supported scales are 'Celsius', 'Kelvin', 'Fahrenheit' and 'Rankine')ÚlowerÚ_npÚ
asanyarrayÚzero_CelsiusÚNotImplementedError)ÚvalZ	old_scaleZ	new_scaleZtempoZres© r"   ú8lib/python3.7/site-packages/scipy/constants/constants.pyÚconvert_temperature²   s*    *
r$   c             C   s   t  t¡|  S )a1  
    Convert wavelength to optical frequency

    Parameters
    ----------
    lambda_ : array_like
        Wavelength(s) to be converted.

    Returns
    -------
    nu : float or array of floats
        Equivalent optical frequency.

    Notes
    -----
    Computes ``nu = c / lambda`` where c = 299792458.0, i.e., the
    (vacuum) speed of light in meters/second.

    Examples
    --------
    >>> from scipy.constants import lambda2nu, speed_of_light
    >>> lambda2nu(np.array((1, speed_of_light)))
    array([  2.99792458e+08,   1.00000000e+00])

    )r   r   r   )Zlambda_r"   r"   r#   Ú	lambda2nuü   s    r%   c             C   s   t t | ¡ S )a1  
    Convert optical frequency to wavelength.

    Parameters
    ----------
    nu : array_like
        Optical frequency to be converted.

    Returns
    -------
    lambda : float or array of floats
        Equivalent wavelength(s).

    Notes
    -----
    Computes ``lambda = c / nu`` where c = 299792458.0, i.e., the
    (vacuum) speed of light in meters/second.

    Examples
    --------
    >>> from scipy.constants import nu2lambda, speed_of_light
    >>> nu2lambda(np.array((1, speed_of_light)))
    array([  2.99792458e+08,   1.00000000e+00])

    )r   r   r   )Znur"   r"   r#   Ú	nu2lambda  s    r&   )¦Ú__doc__Z
__future__r   r   r   ZmathZ_mathZcodatar   Z_cdZnumpyr   ZpiZsqrtZgoldenZgolden_ratioZyottaZzettaZexaZpetaZteraZgigaZmegaZkiloZhectoZdekaZdeciZcentiZmilliÚmicroZnanoZpicoZfemtoZattoZzeptoZkibiZmebiZgibiZtebiZpebiZexbiZzebiZyobir   Zspeed_of_lightZmu_0Z	epsilon_0ÚhZPlanckZhbarÚGZgravitational_constantÚgÚeZelementary_chargeÚRZgas_constantZalphaZfine_structureZN_AZAvogadror   Z	BoltzmannZsigmaZStefan_BoltzmannZWienZRydbergZgramZ
metric_tonZgrainZlbZpoundZblobZslinchZslugZozZounceZstoneZlong_tonZ	short_tonZ
troy_ounceZ
troy_poundZcaratZm_eZelectron_massZm_pZproton_massZm_nZneutron_massZm_uÚuZatomic_massZdegreeZarcminZ	arcminuteZarcsecZ	arcsecondZminuteZhourZdayZweekZyearZJulian_yearZinchZfootZyardZmileZmilZptZpointZsurvey_footZsurvey_mileZnautical_mileZfermiZangstromZmicronZauZastronomical_unitZ
light_yearZparsecZatmZ
atmosphereZbarZtorrZmmHgZpsiZhectareZacreZlitreZliterZgallonZ	gallon_USZfluid_ounceZfluid_ounce_USZbblZbarrelZ
gallon_impZfluid_ounce_impZkmhZmphZmachZspeed_of_soundZknotr   Zdegree_FahrenheitZeVZelectron_voltZcalorieZ
calorie_thZ
calorie_ITZergZBtu_thZBtuZBtu_ITZton_TNTZhpZ
horsepowerZdynZdyneZlbfZpound_forceZkgfZkilogram_forcer$   r%   r&   r"   r"   r"   r#   Ú<module>   sò   J