You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to create FITS files where the first HDU is empty (only containing a header). Given the structure of fits_create_img I did not find a way to do this (please let me know if I overlooked something!). So I extended the code with the following:
function fits_create_empty_hdu(f::FITSFile)
status = Ref{Cint}(0)
naxesr = C_NULL
N = 0
bitpix = bitpix_from_type(Int16)
ccall(
(:ffcrimll, libcfitsio),
Cint,
(Ptr{Cvoid}, Cint, Cint, Ptr{Int64}, Ref{Cint}),
f.ptr,
bitpix,
N,
naxesr,
status,
)
fits_assert_ok(status[])
end
and a small fits_create_img wrapper
function fits_create_img(f::FITSFile, a::Nothing)
status = fits_create_empty_hdu(f)
end
This appears to work ok but I am not sure whether this is superfluous. If it is useful, I'm happy to create a PR with this, but I must confess I am a tad uncertain about the logic of the runtests.jl so if you have any hints on how to write a test conforming to the code preferences, I'd be happy to hear them!
The text was updated successfully, but these errors were encountered:
Hi,
I need to create FITS files where the first HDU is empty (only containing a header). Given the structure of fits_create_img I did not find a way to do this (please let me know if I overlooked something!). So I extended the code with the following:
and a small
fits_create_img
wrapperThis appears to work ok but I am not sure whether this is superfluous. If it is useful, I'm happy to create a PR with this, but I must confess I am a tad uncertain about the logic of the
runtests.jl
so if you have any hints on how to write a test conforming to the code preferences, I'd be happy to hear them!The text was updated successfully, but these errors were encountered: