
&]\c           @` 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 j 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" dc Z# dd Z$ de Z% df Z& dg Z' dh Z( di Z) dj Z* e	 d#  Z+ Z, d$ e Z- d e- e+ e+ Z. e	 d%  Z/ Z0 e/ d e Z1 e	 d&  Z2 Z3 e	 d'  Z4 e	 d(  Z5 Z6 e	 d)  Z7 Z8 e	 d*  Z9 Z: e	 d+  Z; Z< e	 d,  Z= Z> e	 d-  Z? Z@ e	 d.  ZA e	 d/  ZB d ZC d ZD d0 ZE d1 eE ZF ZG eG e4 d2 ZH ZI eH d3 ZJ eG d4 ZK ZL d5 eG ZM d6 eG ZN d7 eG ZO d8 eE ZP d3 eP ZQ d9 ZR e	 d:  ZS ZT e	 d;  ZU ZV e	 d<  ZW ZX e	 d=  ZY ZZ Z[ e d> Z\ e\ d  Z] Z^ e] d  Z_ Z` d? Za d  ea Zb d@ eb Zc dA ec Zd dB ec Ze dC ec Zf d2 Zg d3 eg Zh dD eh Zi dE ei Zj eg dF Zk eg dG Zl Zm dk Zn dJ en Zo dK Zp d Zq dL Zr d Zs dM Zt Zu ef e+ Zv et e_ Zw e	 dN  Zx Zy dO Zz ex dP Z{ Z| eG e4 eg eg Z} dQ Z~ dR eh d Z d Z Z dS eg dD Z Z e dT Z Z dU e Z Z dV Z e dW Z d eb Z ej eb Z dX Z Z ep eb Z dY Z dl Z e6 Z Z d[ Z Z d\ Z d] Z eG e e eC Z eG e e eC Z Z d e Z d^ eh eG e4 Z Z d_ Z Z eG e4 Z Z e4 Z Z d`   Z da   Z db   Z d S(m   s  
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.
i    (   t   divisiont   print_functiont   absolute_importNi   (   t   valuei   i   gyCxDgPKDg NgmCg  4&kCg   mBg    eAg    .Ag     @@g      Y@g      $@g?g{Gz?gMbP?gư>g&.>g-q=gV瞯<gC]r2<gO
;i
   i   i   i(   i2   i<   iF   iP   s   speed of light in vacuumgHך>s   Planck constants!   Newtonian constant of gravitations    standard acceleration of gravitys   elementary charges   molar gas constants   fine-structure constants   Avogadro constants   Boltzmann constants   Stefan-Boltzmann constants)   Wien wavelength displacement law constants   Rydberg constantg̔?iX  g
F%u?i   i   i   i  i  i  g-C6*?s   electron masss   proton masss   neutron masss   atomic mass constanti   g      N@i   i   im  g     v@i   i  i  iH   g     @ia  i  g     @g|=g 1-]jABs   standard atmosphereg     j@i  g     @i(  i   i   i*   gr?i   g     Hu@gfffffq@g?g#~j@g:H@gHz>i&  gh㈵>c         C` sX  | j    d k r( t j |   t } n | j    d k rL t j |   } np | j    d k r t j |   d d d	 t } n< | j    d k r t j |   d d	 } n t d |   | j    d k r | t } ny | j    d k r | } n^ | j    d k r!| t d	 d d } n3 | j    d k rD| d	 d } n t d |   | S(   sA  
    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])

    t   celsiust   ct   kelvint   kt
   fahrenheitt   fg      @@g      @g      "@t   rankinet   rsU   %s scale is unsupported: supported scales are Celsius, Kelvin, Fahrenheit and Rankines_   '%s' scale is unsupported: supported scales are 'Celsius', 'Kelvin', 'Fahrenheit' and 'Rankine'(   R   R   (   R   R   (   R   R	   (   R
   R   (   R   R   (   R   R   (   R   R	   (   R
   R   (   t   lowert   _npt
   asanyarrayt   zero_Celsiust   NotImplementedError(   t   valt	   old_scalet	   new_scalet   tempot   res(    (    s8   lib/python2.7/site-packages/scipy/constants/constants.pyt   convert_temperature   s*    *"
	
c         C` s   t  j t  |  S(   s1  
    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   (   t   lambda_(    (    s8   lib/python2.7/site-packages/scipy/constants/constants.pyt	   lambda2nu   s    c         C` s   t  t j |   S(   s1  
    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   (   t   nu(    (    s8   lib/python2.7/site-packages/scipy/constants/constants.pyt	   nu2lambda  s    i   i   i   @I       I       I       l            l               g;pjځ?grq?(   t   __doc__t
   __future__R    R   R   t   matht   _matht   codataR   t   _cdt   numpyR   t   pit   sqrtt   goldent   golden_ratiot   yottat   zettat   exat   petat   terat   gigat   megat   kilot   hectot   dekat   decit   centit   millit   microt   nanot   picot   femtot   attot   zeptot   kibit   mebit   gibit   tebit   pebit   exbit   zebit   yobiR   t   speed_of_lightt   mu_0t	   epsilon_0t   ht   Planckt   hbart   Gt   gravitational_constantt   gt   et   elementary_charget   Rt   gas_constantt   alphat   fine_structuret   N_At   AvogadroR   t	   Boltzmannt   sigmat   Stefan_Boltzmannt   Wient   Rydbergt   gramt
   metric_tont   graint   lbt   poundt   blobt   slincht   slugt   ozt   ouncet   stonet   long_tont	   short_tont
   troy_ouncet
   troy_poundt   caratt   m_et   electron_masst   m_pt   proton_masst   m_nt   neutron_masst   m_ut   ut   atomic_masst   degreet   arcmint	   arcminutet   arcsect	   arcsecondt   minutet   hourt   dayt   weekt   yeart   Julian_yeart   incht   foott   yardt   milet   milt   ptt   pointt   survey_foott   survey_milet   nautical_milet   fermit   angstromt   micront   aut   astronomical_unitt
   light_yeart   parsect   atmt
   atmospheret   bart   torrt   mmHgt   psit   hectaret   acret   litret   litert   gallont	   gallon_USt   fluid_ouncet   fluid_ounce_USt   bblt   barrelt
   gallon_impt   fluid_ounce_impt   kmht   mpht   macht   speed_of_soundt   knotR   t   degree_Fahrenheitt   eVt   electron_voltt   caloriet
   calorie_tht
   calorie_ITt   ergt   Btu_tht   Btut   Btu_ITt   ton_TNTt   hpt
   horsepowert   dynt   dynet   lbft   pound_forcet   kgft   kilogram_forceR   R   R   (    (    (    s8   lib/python2.7/site-packages/scipy/constants/constants.pyt   <module>   s   	































	J	