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

relax types of arguments to read #168

Closed jishnub closed 2 years ago

jishnub commented 2 years ago

Accept Integer indices (other than Int) in read, so now these work:

julia> filename = tempname();

julia> FITSIO.fitswrite(filename, collect(reshape(1:100, 10, 10)));

julia> f = FITS(filename, "r");

julia> read(f[1], Int8(1):Int8(2), :)
2×10 Matrix{Int64}:
 1  11  21  31  41  51  61  71  81  91
 2  12  22  32  42  52  62  72  82  92

julia> read(f[1], Int8(1):Int8(2), big(3))
2-element Vector{Int64}:
 21
 22
codecov[bot] commented 2 years ago

Codecov Report

Merging #168 (ebfacf8) into master (c8593d9) will not change coverage. The diff coverage is 100.00%.

:exclamation: Current head ebfacf8 differs from pull request most recent head 48e61be. Consider uploading reports for the commit 48e61be to get more accurate results Impacted file tree graph

@@           Coverage Diff           @@
##           master     #168   +/-   ##
=======================================
  Coverage   91.20%   91.20%           
=======================================
  Files           5        5           
  Lines         614      614           
=======================================
  Hits          560      560           
  Misses         54       54           
Impacted Files Coverage Δ
src/image.jl 94.89% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c8593d9...48e61be. Read the comment docs.

giordano commented 2 years ago

There is now a conflict

jishnub commented 2 years ago

Fixed now, but there may be more if other PRs are merged :smiley: