
    HR-e                     j    d Z ddlZddlmc mZ ddlmZmZ d                                Z	d Z
ddZdS )a  
``fitsinfo`` is a command-line script based on astropy.io.fits for
printing a summary of the HDUs in one or more FITS files(s) to the
standard output.

Example usage of ``fitsinfo``:

1. Print a summary of the HDUs in a FITS file::

    $ fitsinfo filename.fits

    Filename: filename.fits
    No.    Name         Type      Cards   Dimensions   Format
    0    PRIMARY     PrimaryHDU     138   ()
    1    SCI         ImageHDU        61   (800, 800)   int16
    2    SCI         ImageHDU        61   (800, 800)   int16
    3    SCI         ImageHDU        61   (800, 800)   int16
    4    SCI         ImageHDU        61   (800, 800)   int16

2. Print a summary of HDUs of all the FITS files in the current directory::

    $ fitsinfo *.fits
    N)__version__logz
Print a summary of the HDUs in a FITS file(s).

This script is part of the Astropy package. See
https://docs.astropy.org/en/latest/io/fits/usage/scripts.html#module-astropy.io.fits.scripts.fitsinfo
for further documentation.
c                     	 t          j        |            dS # t          $ r,}t          j        t          |                     Y d}~dS d}~ww xY w)z
    Print a summary of the HDUs in a FITS file.

    Parameters
    ----------
    filename : str
        The path to a FITS file.
    N)fitsinfoOSErrorr   errorstr)filenamees     @lib/python3.11/site-packages/astropy/io/fits/scripts/fitsinfo.pyfitsinfor   (   sd    	(   	#a&&s    
A!A		Ac                 d   t          j        t          t           j                  }|                    dddt
                      |                    ddd	           |                    |           } t          | j                  D ](\  }}|d
k    rt                       t          |           )dS )z2The main function called by the `fitsinfo` script.)descriptionformatter_classz	--versionversionz	%(prog)s )actionr   r   +z8Path to one or more FITS files. Wildcards are supported.)nargshelpr   N)argparseArgumentParserDESCRIPTIONRawDescriptionHelpFormatteradd_argumentr   
parse_args	enumerater   printr   )argsparseridxr   s       r   mainr"   7   s    $1U  F I/H;/H/H     G    
 T""D"4=11  X77GGG     )N)__doc__r   astropy.io.fitsior   astropyr   r   stripr   r   r"    r#   r   <module>r*      s    0           $ $ $ $ $ $ $ $ 
EGG        r#   