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.,
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:
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.
This PR does the following:
FITSHeader
type and associated methods to the "high-level" interface.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.,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:
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.