ziotom78 / Healpix.jl

Healpix library written in Julia
GNU General Public License v2.0
51 stars 18 forks source link

CFITSIO changes, headers, and polarized map writing #47

Closed xzackli closed 3 years ago

xzackli commented 3 years ago

The following errors,

using Healpix
nside_out = 256
m = PolarizedMap{Float64, NestedOrder, Vector{Float64}}(64)
saveToFITS(m, "test.fits")
ERROR: MethodError: no method matching saveToFITS(::Map{Float64, NestedOrder, Vector{Float64}}, ::FITSFile, ::Int64; write_keywords=false)
Closest candidates are:
  saveToFITS(::Map{T, NestedOrder, AA} where AA<:AbstractVector{T}, ::FITSFile, ::Any) where T<:Number at /home/zequnl/.julia/dev/Healpix/src/map_io.jl:124 got unsupported keyword argument "write_keywords"
  saveToFITS(::Map{T, RingOrder, AA} where AA<:AbstractVector{T}, ::FITSFile, ::Any) where T<:Number at /home/zequnl/.julia/dev/Healpix/src/map_io.jl:117 got unsupported keyword argument "write_keywords"
  saveToFITS(::Map{T, O, AA} where AA<:AbstractVector{T}, ::AbstractString; typechar, unit, extname) where {T<:Number, O<:Order} at /home/zequnl/.julia/dev/Healpix/src/map_io.jl:131 got unsupported keyword argument "write_keywords"
Stacktrace:
 [1] saveToFITS(map::PolarizedMap{Float64, NestedOrder, Vector{Float64}}, fileName::String; typechar::String, unit::String, extname::String)
   @ Healpix ~/.julia/dev/Healpix/src/map_io.jl:170
 [2] saveToFITS(map::PolarizedMap{Float64, NestedOrder, Vector{Float64}}, fileName::String)
   @ Healpix ~/.julia/dev/Healpix/src/map_io.jl:157
 [3] top-level scope
   @ REPL[24]:1

Also, I think the FITSIO packages need to be replaced with CFITSIO.jl, see the warning in https://juliaastro.github.io/FITSIO.jl/stable/.

ziotom78 commented 3 years ago

Done, now the code only uses CFITSIO.jl.