The base class for all HDUs. It‘s possible to use this on its own, but really it‘s intended to be abstract.
Initialize a new HDU in the specified file at the specified position (zero-based). This doesn‘t actually write bytes to file—use HDU#create for that.
fits = File.open('m31.fits', 'rw') do |f| hdu = HDU.new(f, 2) end
Get the type of HDU. Possibilities are: :image, :ascii_tbl, :binary_tbl, :other
Get the position of the HDU.
puts hdu.position # 2 -> this is the third HDU in the file
[Validate]