U
    d»{jó	  ã                   @   sj   d Z ddlmZ ddlmZmZ g Zdd„ Zdd„ Zdd	„ Z	e 
d
ee¡ e d
ee¡ e d
ee	¡ dS )zÝ
The following are private functions. These functions are registered into
:meth:`~astropy.cosmology.Cosmology.to_format` and
:meth:`~astropy.cosmology.Cosmology.from_format` and should only be accessed
via these methods.
é    )Úconvert_registry)Ú_COSMOLOGY_CLASSESÚ	Cosmologyc                K   sH   |  d¡}t|tƒrt| }|dk	rDt| |ƒsDtd| › d|› d�ƒ‚| S )a¸  Return the |Cosmology| unchanged.

    Parameters
    ----------
    cosmo : `~astropy.cosmology.Cosmology`
        The cosmology to return.
    **kwargs
        This argument is required for compatibility with the standard set of
        keyword arguments in format `~astropy.cosmology.Cosmology.from_format`,
        e.g. "cosmology". If "cosmology" is included and is not `None`,
        ``cosmo`` is checked for correctness.

    Returns
    -------
    `~astropy.cosmology.Cosmology` subclass instance
        Just ``cosmo`` passed through.

    Raises
    ------
    TypeError
        If the |Cosmology| object is not an instance of ``cosmo`` (and
        ``cosmology`` is not `None`).
    Ú	cosmologyNz
cosmology z is not an z
 instance.)ÚgetÚ
isinstanceÚstrr   Ú	TypeError)ÚcosmoÚkwargsr   © r   ú]/var/www/html/bwave/python/venv/lib/python3.8/site-packages/astropy/cosmology/io/cosmology.pyÚfrom_cosmology   s    

r   c                 G   s   | S )a"  Return the |Cosmology| unchanged.

    Parameters
    ----------
    cosmo : `~astropy.cosmology.Cosmology`
        The cosmology to return.
    *args
        Not used.

    Returns
    -------
    `~astropy.cosmology.Cosmology` subclass instance
        Just ``cosmo`` passed through.
    r   )r
   Úargsr   r   r   Úto_cosmology2   s    r   c                 O   s&   d}| dkr"t |d tƒo |dk}|S )z^Identify if object is a `~astropy.cosmology.Cosmology`.

    Returns
    -------
    bool
    FÚreadé   )Núastropy.cosmology)r   r   )ÚoriginÚformatr   r   Zitisr   r   r   Úcosmology_identifyD   s    ÿr   r   N)Ú__doc__Zastropy.cosmology.connectr   Zastropy.cosmology.corer   r   Ú__all__r   r   r   Zregister_readerZregister_writerZregister_identifierr   r   r   r   Ú<module>   s   "