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

Muti File support #21

Merged
merged 5 commits into from
Aug 7, 2019
Merged

Muti File support #21

merged 5 commits into from
Aug 7, 2019

Conversation

aquatiko
Copy link
Member

No description provided.

src/AstroImages.jl Outdated Show resolved Hide resolved
src/AstroImages.jl Outdated Show resolved Hide resolved
@aquatiko
Copy link
Member Author

Also, here I am adding things in an empty array and then converting to a tuple. Is there a way to push these directly to a tuple?

src/AstroImages.jl Outdated Show resolved Hide resolved
@codecov-io
Copy link

codecov-io commented Jul 30, 2019

Codecov Report

Merging #21 into master will increase coverage by 3.75%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #21      +/-   ##
==========================================
+ Coverage   94.91%   98.66%   +3.75%     
==========================================
  Files           3        3              
  Lines          59       75      +16     
==========================================
+ Hits           56       74      +18     
+ Misses          3        1       -2
Impacted Files Coverage Δ
src/AstroImages.jl 100% <100%> (+4.25%) ⬆️

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 0827e23...e0f45f1. Read the comment docs.

@aquatiko aquatiko changed the title [WIP]Muti File support Muti File support Jul 31, 2019
@giordano
Copy link
Member

Tests are not passing on Windows, with any Julia version. WebIO cannot be built, but this looks unrelated to the actual errors reported down in the log.

Copy link
Member

@giordano giordano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The non-closed FITS might be the culprit of failure on AppVeyor

@@ -8,7 +8,11 @@ export load, AstroImage

_load(fits::FITS, ext::Int) = read(fits[ext])
_load(fits::FITS, ext::NTuple{N, Int}) where {N} = ntuple(i-> read(fits[ext[i]]), N)
_load(fits::NTuple{N, String}) where {N} = ntuple(i-> FITS(fits[i]), N)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method has a different semantic compared to the other _load methods: it returns a bunch of FITSes, instead of reading a FITS passed as input. This makes the code harder to follow, and perhaps more error-prone

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed!!

error("There are no ImageHDU extensions in \"$file\"")
end
out = AstroImage(Gray, fits, ext)
close(fits)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that by removing this method you're not closing the FITS file any more, are you?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You were right, this along with a couple more things were causing appvyeor to fail.

@aquatiko
Copy link
Member Author

aquatiko commented Aug 7, 2019

@giordano can this be merged now?

@giordano giordano merged commit 6d38397 into JuliaAstro:master Aug 7, 2019
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 this pull request may close these issues.

None yet

3 participants