§
    2?Äj³  ã                   ó<   — d Z ddlmZ dad„ Z G d„ de¦  «        ZdS )aù  Read FITS files.

Backend Library: `Astropy <https://www.astropy.org/>`_

.. note::
    To use this plugin you have to install its backend::

        pip install imageio[fits]

Flexible Image Transport System (FITS) is an open standard defining a
digital file format useful for storage, transmission and processing of
scientific and other images. FITS is the most commonly used digital
file format in astronomy.


Parameters
----------
cache : bool
    If the file name is a URL, `~astropy.utils.data.download_file` is used
    to open the file.  This specifies whether or not to save the file
    locally in Astropy's download cache (default: `True`).
uint : bool
    Interpret signed integer data where ``BZERO`` is the
    central value and ``BSCALE == 1`` as unsigned integer
    data.  For example, ``int16`` data with ``BZERO = 32768``
    and ``BSCALE = 1`` would be treated as ``uint16`` data.

    Note, for backward compatibility, the kwarg **uint16** may
    be used instead.  The kwarg was renamed when support was
    added for integers of any size.
ignore_missing_end : bool
    Do not issue an exception when opening a file that is
    missing an ``END`` card in the last header.
checksum : bool or str
    If `True`, verifies that both ``DATASUM`` and
    ``CHECKSUM`` card values (when present in the HDU header)
    match the header and data of all HDU's in the file.  Updates to a
    file that already has a checksum will preserve and update the
    existing checksums unless this argument is given a value of
    'remove', in which case the CHECKSUM and DATASUM values are not
    checked, and are removed when saving changes to the file.
disable_image_compression : bool, optional
    If `True`, treats compressed image HDU's like normal
    binary table HDU's.
do_not_scale_image_data : bool
    If `True`, image data is not scaled using BSCALE/BZERO values
    when read.
ignore_blank : bool
    If `True`, the BLANK keyword is ignored if present.
scale_back : bool
    If `True`, when saving changes to a file that contained scaled
    image data, restore the data to the original type and reapply the
    original BSCALE/BZERO values.  This could lead to loss of accuracy
    if scaling back to integer values after performing floating point
    operations on the data.

é   )ÚFormatNc                  óZ   — 	 ddl ma n# t          $ r t          d¦  «        ‚w xY wt          S )Né    )ÚfitszoThe FITS format relies on the astropy package.Please refer to http://www.astropy.org/ for further instructions.)Ú
astropy.ior   Ú_fitsÚImportError© ó    úEC:\Projects\Historical\venv\Lib\site-packages\imageio/plugins/fits.pyÚload_libr   C   sU   € ð
Ø,Ð,Ð,Ð,Ð,Ð,Ð,øÝð 
ð 
ð 
Ýð(ñ
ô 
ð 	
ð
øøøõ €Ls   ‚	 ‰#c                   óD   — e Zd ZdZd„ Zd„ Z G d„ dej        ¦  «        ZdS )Ú
FitsFormatzSee :mod:`imageio.plugins.fits`c                 ó   — |j         | j        v S ©N)Ú	extensionÚ
extensions©ÚselfÚrequests     r   Ú	_can_readzFitsFormat._can_readS   s   € ð Ô  D¤OÐ3Ð3r   c                 ó   — dS )NFr
   r   s     r   Ú
_can_writezFitsFormat._can_writeX   s   € àˆur   c                   ó.   — e Zd Zdd„Zd„ Zd„ Zd„ Zd„ ZdS )	úFitsFormat.ReaderFc                 ó²  — t           st          ¦   «          t          j        | j                             ¦   «         fd|i|¤Ž}g | _        t           j        t           j        t           j        f}t          t          t          |¦  «        ¦  «        |¦  «        D ]:\  }}t          ||¦  «        r%|j        dk    r| j                             |¦  «         Œ;|| _        d S )NÚcacher   )r   r   Úopenr   Úget_fileÚ_indexÚImageHDUÚ
PrimaryHDUÚCompImageHDUÚzipÚrangeÚlenÚ
isinstanceÚsizeÚappendÚ_hdulist)r   r   ÚkwargsÚhdulistÚallowed_hdu_typesÚnÚhdus          r   Ú_openzFitsFormat.Reader._open_   sÆ   € Ýð Ý‘
”
�
Ý”j ¤×!6Ò!6Ñ!8Ô!8ÐPÐPÀÐPÈÐPÐPˆGàˆDŒKÝ!&¤µÔ1AÅ5ÔCUÐ VÐÝ�e¥C¨¡L¤LÑ1Ô1°7Ñ;Ô;ð .ð .‘��3Ý˜cÐ#4Ñ5Ô5ð .ð ”x !’|�|Øœ×*Ò*¨1Ñ-Ô-Ð-øØ#ˆDŒMˆMˆMr   c                 ó8   — | j                              ¦   «          d S r   )r*   Úclose©r   s    r   Ú_closezFitsFormat.Reader._closen   s   € ØŒM×ÒÑ!Ô!Ð!Ð!Ð!r   c                 ó*   — t          | j        ¦  «        S r   )r&   r    r3   s    r   Ú_get_lengthzFitsFormat.Reader._get_lengthq   s   € Ý�t”{Ñ#Ô#Ð#r   c                 óž   — |dk     s|t          | j        ¦  «        k    rt          d¦  «        ‚| j        | j        |                  j        }|i fS )Nr   z*Index out of range while reading from fits)r&   r    Ú
IndexErrorr*   Údata)r   ÚindexÚims      r   Ú	_get_datazFitsFormat.Reader._get_datat   sM   € à�qŠyˆy˜E¥S¨¬Ñ%5Ô%5Ò5Ð5Ý Ð!MÑNÔNÐNØ”˜tœ{¨5Ô1Ô2Ô7ˆBà�r�6ˆMr   c                 ó    — t          d¦  «        ‚)Nz+The fits format does not support meta data.)ÚRuntimeError)r   r:   s     r   Ú_get_meta_dataz FitsFormat.Reader._get_meta_data|   s   € åÐLÑMÔMÐMr   N)F)Ú__name__Ú
__module__Ú__qualname__r0   r4   r6   r<   r?   r
   r   r   ÚReaderr   ^   si   € € € € € ð	$ð 	$ð 	$ð 	$ð	"ð 	"ð 	"ð	$ð 	$ð 	$ð	ð 	ð 	ð	Nð 	Nð 	Nð 	Nð 	Nr   rC   N)r@   rA   rB   Ú__doc__r   r   r   rC   r
   r   r   r   r   P   sn   € € € € € Ø)Ð)ð4ð 4ð 4ð
ð ð ð Nð  Nð  Nð  Nð  N�”ñ  Nô  Nð  Nð  Nð  Nr   r   )rD   Úcorer   r   r   r   r
   r   r   ú<module>rF      sv   ðð8ð 8ðt Ð Ð Ð Ð Ð à€ð
ð 
ð 
ð.Nð .Nð .Nð .Nð .N�ñ .Nô .Nð .Nð .Nð .Nr   