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

Obtain eltype without reading the array #147

Closed jishnub closed 3 years ago

jishnub commented 3 years ago

Since images have the element type in the header (and this is something that CFITSIO converts to a Julia type), it should be possible to obtain the element type of an image HDU using something like this :

julia> FITS("V_kw.fits", "r") do f
           eltype(f[1])
       end

Currently this returns Any, but a suitable method may be added to return the correct element type.