Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getindex(FITS, String) does not work #141

Closed
aplavin opened this issue Aug 3, 2020 · 5 comments · Fixed by #142
Closed

getindex(FITS, String) does not work #141

aplavin opened this issue Aug 3, 2020 · 5 comments · Fixed by #142

Comments

@aplavin
Copy link
Contributor

aplavin commented Aug 3, 2020

In version 0.16 this getindex method stopped working (works in 0.15):

function getindex(f::FITS, name::AbstractString, ver::Int=0)

It gives the following stacktrace:

  UndefVarError: fits_movnam_hdu not defined
  Stacktrace:
   [1] getindex(::FITSIO.FITS, ::String, ::Int64) at /home/runner/.julia/packages/FITSIO/KYCVW/src/fits.jl:113
   [2] getindex at /home/runner/.julia/packages/FITSIO/KYCVW/src/fits.jl:112 [inlined]

The fits_movnam_hdu function is indeed used here:

fits_movnam_hdu(f.fitsfile, name, ver)

But I cannot find it defined anywhere in the FITSIO.jl repo. Was it just removed at some point? Everything is fine with version 0.15.

@giordano
Copy link
Member

giordano commented Aug 3, 2020

Was it just removed at some point?

It was moved to CFITSIO.jl: https://github.com/JuliaAstro/CFITSIO.jl/blob/9a1acf6c9ee278849a929d549c884076820a03d0/src/CFITSIO.jl#L812-L830

@aplavin
Copy link
Contributor Author

aplavin commented Aug 3, 2020

Then I guess the reason why FITSIO.jl getindex method got broken is because fits_movnam_hdu is not imported here:
https://github.com/JuliaAstro/FITSIO.jl/blob/master/src/FITSIO.jl#L38-L73
Right?

@giordano
Copy link
Member

giordano commented Aug 3, 2020

Probably

@aplavin
Copy link
Contributor Author

aplavin commented Aug 3, 2020

I created a PR #142 which imports the three functions required by this getindex method.

@giordano giordano linked a pull request Aug 3, 2020 that will close this issue
@giordano
Copy link
Member

giordano commented Aug 3, 2020

I guess we can close this issue now?

@aplavin aplavin closed this as completed Aug 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants