Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve show(); reorganize files #38

Merged
merged 5 commits into from
May 31, 2015
Merged

Conversation

kbarbary
Copy link
Member

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  
  • file mode explanation shown ("read-only")
  • HDU name and version now printed (version column only printed if some HDUs are versioned)

ImageHDUs:

julia> f[1]
File: tmp.fits
HDU: 1 (name="image1", ver=2)
Type: Image
Datatype: Uint32 (physical: Int32)
Datasize: (10,10)
  • Name and version of HDU shown
  • Data type now shown
  • Physical data type shown if not the same as returned data type

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
  • column TFORMs now interpreted as types, sizes and a note about whether the column is variable-length.

Other changes in PR

  • Split code for high-level interface into separate files
  • Added FITSIO.libcfitsio_version() (currently not exported)
  • Added name, ver keywords to write() methods for giving new extensions a name and version.
  • Significant refactoring of header-keyword parsing, now uses Nullable in place of try/except. Sets the stage for specifying type of a keyword when fetching it.

@kbarbary kbarbary mentioned this pull request May 30, 2015
18 tasks
kbarbary added a commit that referenced this pull request May 31, 2015
Improve show(); reorganize files
@kbarbary kbarbary merged commit c597e1a into JuliaAstro:master May 31, 2015
@kbarbary kbarbary deleted the improve-show branch May 31, 2015 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant