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

Ability to set wcsprm values in Julia #43

Closed rgiordan closed 9 years ago

rgiordan commented 9 years ago

I'd like to be able to safely modify wcsprm structs (as returned by WCSLIB.jl's wcspih function) in julia. For example, I'd like to be able to set the crpix field (the pixel reference point) when I subset an image.

However, the field is a C pointer:

julia> blob[1].wcs.crpix Ptr{Float64} @0x000000000f550a50

...so the only way to modify it is the aptly-named unsafe_store!. This isn't great -- for example, this seems to mean that deepcopy of types containing a wcsprm object doesn't actually deeply copy the object.

Is there any hope for changing some of these fields to julia values rather than C pointers?

kbarbary commented 9 years ago

Did you mean to open this issue in WCSLIB.jl?

rgiordan commented 9 years ago

I certainly did, I'm sorry.