U
    e»{jÍ  ã                   @   sF   d Z eƒ Zdd„ Zeƒ  ddlmZ e dk	r:e eeƒ ƒ7 Z dd„ ZdS )u@  
This package defines units used in the CDS format, both the units
defined in `Centre de DonnÃ©es astronomiques de Strasbourg
<http://cds.u-strasbg.fr/>`_ `Standards for Astronomical Catalogues 2.0
<http://vizier.u-strasbg.fr/vizier/doc/catstd-3.2.htx>`_ format and the `complete
set of supported units <https://vizier.u-strasbg.fr/viz-bin/Unit>`_.
This format is used by VOTable up to version 1.2.

These units are not available in the top-level `astropy.units`
namespace.  To use these units, you must import the `astropy.units.cds`
module::

    >>> from astropy.units import cds
    >>> q = 10. * cds.lyr  # doctest: +SKIP

To include them in `~astropy.units.UnitBase.compose` and the results of
`~astropy.units.UnitBase.find_equivalent_units`, do::

    >>> from astropy.units import cds
    >>> cds.enable()  # doctest: +SKIP
c               W   C   st  ddl } ddlm} ddlm} ddlm} |j|j }dd„ |D ƒ}d	g|j	d
fdg|j
ddgfdg|jdfdg|jdddgfdg|jdfdg|jdfddgddgf|jdfddg|jdfddg|jd fd!g|jd"fd#d$g|jd%fd&g|jd&fd'g|jd'fd(g|jd(fd)g|jd)fd*g|jd+fdg|jd,d-gfd.gd/|j d0fd1g|jd2fd3g|jd4fd5g|jd6fdg|jd7dgfd8d9gd:gf|jd:fd;g|jd<fd=g|j d>d?gfd@g|j!dAfdBg|j"dBfdCg|j#dDfdEg|j$dFfdGg|j%dHfdIg|j&dJfdKg|j%dLfdMdNg|j'dOfdPg|j(dQfdRg|j)dSd-gfdTg|j)dSfdUg|j)dVfdWg|j*dXfdYgdZ|j+ dYfd[g|jd\fd]g|jd7d^gfd_d`g|j,dafdbg|j-dcfddg|j.defdfg|j/dgfdhg|j0didgfdjg|j1dkfdldmg|j2dnfdog|j3dpfd?g|j+dqfdrg|j4dsfdtg|j5dufdvg|j6dwfdxg|jd7fdygdz|j7 d{fd|g|j8d}fd~g|j9dfd€d�g|j:d‚fdƒd„gg f|j;d…fd†g|j<d‡fdˆg|j=d‰fdŠg|j>dŠfd‹g|j7dŒfd�g|j?dŽfd�g|j@d�fd‘g| A| jB¡d’fd“g|jCd”fd•g| Ad–¡d—fd˜g|jDd™fdšg|jEd›fdœg|jFd�fdžg|jGdŸfd d¡g|jHd¢fd£g|jId¤fd¥g|jJd¦fd§d¨g|jKd©fdªg|jLd«fd¬g|jMd­fd®g|jNd¯fd°gd±|jO d²dgfd³g|jPd´dµdgfd¶g|jQd·fd¸g|jRd¹fdºg|jSd»fd¼g|j
dfgU}|D ]F}tT|ƒd½k�rÜ|\}}}	g }
n|\}}}	}
|jU|||tV|	|
d¾� �qº|jUd¿g|jWdÀtVdÁ� |jUdÂg|jXdÃtVdÁ� |jUdÄdÅg|jYdÆtVdÁ� |jUdÇg|jZdÈtVdÁ� |jUdÉg|tVdÊdË� dS )ÌzInitialize CDS units module.é    N)Úunits)Úsié   )Úcorec                 S   s   g | ]\}}}|||f‘qS © r   )Ú.0ÚshortÚlongÚfactorr   r   úP/var/www/html/bwave/python/venv/lib/python3.8/site-packages/astropy/units/cds.pyÚ
<listcomp>,   s     z&_initialize_module.<locals>.<listcomp>ÚAZAmpereÚaÚyearÚPÚa0zBohr radiusÚalz
Light yearÚcÚdÚlyrÚalphazFine structure constantÚAAõ   Ã…ZAngstromZ	AngstroemZarcminZarcmzminute of arcZarcsecZarcszsecond of arcÚatmZ
atmosphereZAUÚauzastronomical unitÚbarÚbarnÚbitÚbyteÚCZCoulombzspeed of lightÚpÚcalg®¶bÙ½@ZcalorieÚcdZcandelaÚctÚcountÚDzDebye (dipole)z
Julian dayÚdegõ   Â°ÚdegreeÚdynZdyneÚezelectron chargeÚmÚeps0zelectric constantÚergÚeVzelectron voltÚFZFaradÚGzGravitation constantÚgZgramÚgaussZGaussZgeoMassZMgeoz
Earth massÚHZHenryÚhÚhourÚhrz\hzPlanck constantÚHzZHertzZinchg¦
F%uš?ÚJZJouleZJDÚMZjovMassZMjupzJupiter massÚJyZJanskyÚKZKelvinÚkZ	BoltzmannÚlZlitreÚlmZlumenZLsunÚsolLumzsolar luminosityÚlxZluxZmeterÚmagZ	magnitudeÚmezelectron massÚminÚminuteZMJDZmmHgg%‚iÿPª`@zmillimeter of mercuryÚmolZmoleÚmpzproton massZMsunÚsolMassz
solar massÚmu0u   Âµ0zmagnetic constantÚmuBzBohr magnetonÚNZNewtonÚOhmÚPaZPascalÚpcZparsecÚphZphotonÚpiu   Ï€ÚpixZpixelÚppmg�íµ ÷Æ°>zparts per millionÚRzgas constantZradÚradianZRgeozEarth equatorial radiusZRjupzJupiter equatorial radiusZRsunÚsolRadzsolar radiusÚRyZRydbergÚSZSiemensÚsÚsecÚsecondÚsrZ	steradianÚSunz
solar unitÚTZTeslaÚtg     @�@zmetric tonneÚuzatomic massÚdaÚVZVoltÚWZWattÚWbZWeberÚyré   )ÚprefixesÚ	namespaceÚdocZexclude_prefixesu   Âµaszmicrosecond of arc)rg   rf   Zmaszmillisecond of arcz---ú-zdimensionless and unscaledú%ÚpercentZCrabzCrab (X-ray) flux)re   rf   rg   )[ÚnumpyZastropyr   Zastropy.constantsr   Ú r   Zsi_prefixesZbinary_prefixesr   r   r   r   r   r   Z	arcminuteZ	arcsecondr   r   r   r   r   r   r   r   r8   r"   r#   r%   r   r(   r)   r*   r,   r-   r.   r/   r0   r1   ZM_earthr3   r4   r7   r+   ZM_jupr:   r;   Zk_Br=   r>   r?   r@   rA   Zm_erD   rL   rE   Zm_prG   rH   rI   rJ   rK   rM   rN   ZUnitrO   rP   rR   rS   ZR_earthZR_juprT   rU   rV   rW   rZ   r[   r\   Zkgr^   r`   ra   rb   ÚlenZdef_unitÚ_nsZmicroarcsecondZmilliarcsecondZdimensionless_unscaledrj   )Únpr^   Z_sir   re   ÚmappingÚentryÚnamesÚunitrg   Úexcludesr   r   r   Ú_initialize_module   sæ    «X
ú
	üru   r   )Úgenerate_unit_summaryNc                  C   s"   ddl } ddlm} ||  t¡ƒS )aq  
    Enable CDS units so they appear in results of
    `~astropy.units.UnitBase.find_equivalent_units` and
    `~astropy.units.UnitBase.compose`.  This will disable
    all of the "default" `astropy.units` units, since there
    are some namespace clashes between the two.

    This may be used with the ``with`` statement to enable CDS
    units only temporarily.
    r   Nr   )Úset_enabled_units)Úinspectr   rw   Ú	getmoduleÚenable)rx   rw   r   r   r   rz   µ   s    rz   )Ú__doc__Úglobalsrn   ru   Úutilsrv   Z_generate_unit_summaryrz   r   r   r   r   Ú<module>   s    