JuliaAstro/FITSIO.jl — pull request #11 by kbarbary (2014-06-17 23:16:31+00:00)
Title: Add FITSHeader type and associated methods

This PR does the following:

* adds a `FITSHeader` type and associated methods to the "high-level" interface.
* organizes the documentation and extends the high-level usage guide.

`FITSHeader` is sort of like an ordered dictionary, but it also stores comments for each item. It makes it possible to read a header, access the values as if it were a dictionary, and write it back while keeping all the comments. e.g.,

```julia
header = readheader(f[1])
header["KEYWORD"] # returns value
header["KEYWORD"] = 1 # set value
setcomment!(header, "KEYWORD", "this is a comment") # set the comment field
```

Later on you can write the header back to a file (in a new extension) and all the original comments (and any changes) will be reflected:

```julia
write(f, data; header=header) # writes header, then image data to disk
```

Apologies for smashing everything into a single commit; my development on this was quite scattered. It's a bit hard to see what's going on from the diff; I can upload the built docs somewhere if anyone wants to see it before merging.