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

edit BUNIT #50

Closed andferrari closed 8 years ago

andferrari commented 8 years ago

Hi!, If I create a header with the reserved key BUNIT and I save the file, the key BUNIT is not written in the header of the file. Am I wrong somewhere ?

Thanks in advance

kbarbary commented 8 years ago

No, this is a problem with FITSIO.jl. BUNIT is included in the "reserved keywords" which are stripped when writing new headers. The reserved keywords are listed here. Most of these it makes sense to strip, because there are specific APIs for specifying them. For example, SIMPLE, EXTEND and BITPIX are written automatically when creating a new image - you wouldn't want to write them manually. However, this isn't the case for BUNIT - there's no other way to define it than the way you're doing. So I think BUNIT should simply be removed from the list of reserved keywords.

kbarbary commented 8 years ago

Closed by #51