JuliaAstro / FITSIO.jl

Flexible Image Transport System (FITS) file support for Julia
http://juliaastro.org/FITSIO.jl/
MIT License
55 stars 29 forks source link

Improve show(); reorganize files #38

Closed kbarbary closed 9 years ago

kbarbary commented 9 years ago

This PR mainly improves the results of show() to be better formatted and have more information. Here's how it looks on a dummy test file:

julia> f = FITS("tmp.fits")
File: tmp.fits
Mode: "r" (read-only)
HDUs: Num  Name    Ver  Type        
      1    image1  2    Image       
      2    image2       Image       
      3    table1       Table       
      4    table2  1    ASCIITable  

ImageHDUs:

julia> f[1]
File: tmp.fits
HDU: 1 (name="image1", ver=2)
Type: Image
Datatype: Uint32 (physical: Int32)
Datasize: (10,10)

TableHDUs

julia> f[3]
File: tmp.fits
HDU: 3 (name="table1")
Type: Table
Rows: 20
Columns: Name  Size  Type               TFORM    
         col3        Uint16             1I       
         col6  (2,)  Int64              2K       
         col5        ASCIIString        10A      
         col4        Bool               1L       
         col9        Array{Float64,1}*  1PD(20)  
         col2        Float64            1D       
         col7  (2,)  ASCIIString        10A5     
         col1        Int8               1B       
         col8        ASCIIString*       1PA(20)  

         (*) = variable-length column