a
    BCCfˆ(  ã                   @  s0  d Z ddlmZ ddlZddlmZmZ ddlm	Z
 ddlZerLddlmZ g d¢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#Z-d$Z.d%Z/d&Z0d'Z1d	d( Z2d	d) Z3e
d*ƒ Z4Z5e
d+ƒZ6e
d,ƒZ7e
d-ƒ Z8Z9e8d	e  Z:e
d.ƒ Z;Z<e
d/ƒZ=e
d0ƒ Z>Z?e
d1ƒ Z@ZAe
d2ƒ ZBZCe
d3ƒ ZDZEe
d4ƒ ZFZGe
d5ƒ ZHZIe
d6ƒZJe
d7ƒZKdZLdZMd8ZNd9eN  ZOZPePe= d:  ZQZReQd; ZSePd<  ZTZUd=eP ZVd>eP ZWd?eP ZXd@eN ZYd;eY ZZdAZ[e
dBƒ Z\Z]e
dCƒ Z^Z_e
dDƒ Z`Zae
dEƒ Zb ZcZdedF ZeeedG  ZfZgefdG  ZhZidHZjdGej ZkdIek ZldJel ZmdKel ZndLel Zod:Zpd;ep ZqdMeq ZrdNer ZsepdO ZtepdP  ZuZvdQZwdRew ZxdSZydZzdTZ{dZ|dU Z}Z~eoe4 Ze}eh Z€e
dVƒ ZZ‚dWZƒedX  Z„Z…ePe= epep  Z†dYZ‡dZeqd	  Zˆd Z‰ZŠd[epdM   Z‹ZŒeŒd\  ZZŽd]eŒ  ZZd^Z‘e‘d_ Z’dek Z“esek Z”d` Z•Z–eyek Z—daZ˜dbZ™e? ZšZ›dc ZœZddZždeZŸePe™ e eL Z ePe™ ež eL  Z¡Z¢de Z£dfeq eP e=  Z¤Z¥dg Z¦Z§ePe=  Z¨Z©e= ZªZ«dhdididjdkœdldm„Z¬dhdjdnœdodp„Z­dhdjdqœdrds„Z®dS )ta  
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 convenient for everyday use.
é    )ÚannotationsN)ÚTYPE_CHECKINGÚAnyé   )Úvalue)žÚAvogadroÚ	BoltzmannÚBtuÚBtu_ITÚBtu_thÚGÚJulian_yearÚN_AÚPlanckÚRÚRydbergÚStefan_BoltzmannÚWienÚacreÚalphaÚangstromÚarcminÚ	arcminuteÚarcsecÚ	arcsecondÚastronomical_unitÚatmÚ
atmosphereÚatomic_massÚattoÚauÚbarÚbarrelÚbblÚblobÚcÚcalorieÚ
calorie_ITÚ
calorie_thÚcaratÚcentiÚconvert_temperatureÚdayÚdeciÚdegreeÚdegree_FahrenheitÚdekaÚdynÚdyneÚeÚeVÚelectron_massÚelectron_voltÚelementary_chargeÚ	epsilon_0ÚergÚexaÚexbiÚfemtoÚfermiÚfine_structureÚfluid_ounceÚfluid_ounce_USÚfluid_ounce_impÚfootÚgÚgallonÚ	gallon_USÚ
gallon_impÚgas_constantÚgibiÚgigaÚgoldenÚgolden_ratioÚgrainÚgramÚgravitational_constantÚhÚhbarÚhectareÚhectoÚ
horsepowerÚhourÚhpÚinchÚkÚkgfÚkibiÚkiloÚkilogram_forceÚkmhÚknotÚ	lambda2nuÚlbÚlbfÚ
light_yearÚliterÚlitreÚlong_tonÚm_eÚm_nÚm_pÚm_uÚmachÚmebiÚmegaÚ
metric_tonÚmicroÚmicronÚmilÚmileÚmilliÚminuteÚmmHgÚmphÚmu_0ÚnanoÚnautical_mileÚneutron_massÚ	nu2lambdaÚounceÚozÚparsecÚpebiÚpetaÚpiÚpicoÚpointÚpoundÚpound_forceÚproton_massÚpsiÚptÚquectoÚquettaÚronnaÚrontoÚ	short_tonÚsigmaÚslinchÚslugÚspeed_of_lightÚspeed_of_soundÚstoneÚsurvey_footÚsurvey_mileÚtebiÚteraÚton_TNTÚtorrÚ
troy_ounceÚ
troy_poundÚuÚweekÚyardÚyearÚyobiÚyoctoÚyottaÚzebiÚzeptoÚzero_CelsiusÚzettaé   é   gêŒ 9Y>)Fg„þäqÙ‰Eg´Ù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›
´ã’;g§Ž¨™ÂWó:g<ò6šÎS:g ÂëþKH´9i   i   i   @l        l           l            éF   éP   zspeed of light in vacuumzvacuum mag. permeabilityzvacuum electric permittivityz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  6-]jABzstandard atmosphereg     jø@iø  g     ˆÃ@i(ª  éç   é€   é*   g½¨þ½ëžr?é    g     Hu@gfffffq@grÇqÇá?g#Ûù~j¼@g:’ËH¿@gH¯¼šò×z>i&  gñhãˆµøä>znpt.ArrayLikeÚstrr   )ÚvalÚ	old_scaleÚ	new_scaleÚreturnc                 C  sü   |  ¡ dv rt | ¡t }nl|  ¡ dv r4t | ¡}nT|  ¡ dv r\t | ¡d d d t }n,|  ¡ dv r|t | ¡d d }ntd| ƒ‚|  ¡ dv rž|t }nZ|  ¡ dv r°|}nH|  ¡ dv rÒ|t d d d }n&|  ¡ dv rì|d d }ntd	| ƒ‚|S )
a]  
    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
    >>> import numpy as np
    >>> convert_temperature(np.array([-40, 40]), 'Celsius', 'Kelvin')
    array([ 233.15,  313.15])

    )Zcelsiusr%   )ZkelvinrW   )Z
fahrenheitÚfé    r¥   é	   )ZrankineÚrzV%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Ú
asanyarrayr£   ÚNotImplementedError)r·   r¸   r¹   ZtempoÚres© rÄ   úV/var/www/html/django/DPS/env/lib/python3.9/site-packages/scipy/constants/_constants.pyr+   ä   s.    -þ
þr+   )Úlambda_rº   c                 C  s   t t | ¡ S )aL  
    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
    >>> import numpy as np
    >>> lambda2nu(np.array((1, speed_of_light)))
    array([  2.99792458e+08,   1.00000000e+00])

    ©r%   rÀ   rÁ   )rÆ   rÄ   rÄ   rÅ   r^   1  s    r^   )Únurº   c                 C  s   t t | ¡ S )aL  
    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
    >>> import numpy as np
    >>> nu2lambda(np.array((1, speed_of_light)))
    array([  2.99792458e+08,   1.00000000e+00])

    rÇ   )rÈ   rÄ   rÄ   rÅ   ry   O  s    ry   )¯Ú__doc__Ú
__future__r   ÚmathZ_mathÚtypingr   r   Z_codatar   Z_cdÚnumpyrÀ   Znumpy.typingZnptÚ__all__r   ÚsqrtrJ   rK   rˆ   r‰   r    r¤   r:   r~   r•   rI   rk   rZ   rR   r0   r-   r*   rq   rm   rv   r€   r<   r   r¢   rŸ   rŠ   r‡   rY   rj   rH   r”   r}   r;   r¡   rž   r%   r   ru   r8   rO   r   rP   r   rN   rC   r3   r7   r   rG   r   r>   r   r   rW   r   rŒ   r   r   r   rM   rl   rL   r_   r‚   r$   r   rŽ   r{   rz   r‘   rd   r‹   r˜   r™   r)   re   r5   rg   r„   rf   rx   rh   rš   r   r.   r   r   r   r   rr   rT   r,   r›   r   r   rV   rB   rœ   rp   ro   r†   r   r’   r“   rw   r=   r   rn   r    r   ra   r|   r   r   r!   r—   rs   r…   rQ   r   rc   rb   rD   rE   r?   r@   r#   r"   rF   rA   r\   rt   ri   r   r]   r£   r/   r4   r6   r&   r(   r'   r9   r   r	   r
   r–   rU   rS   r1   r2   r`   rƒ   rX   r[   r+   r^   ry   rÄ   rÄ   rÄ   rÅ   Ú<module>   s  	'M