-
Notifications
You must be signed in to change notification settings - Fork 9
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
Conversation
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? |
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
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. |
There was a problem hiding this 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
src/AstroImages.jl
Outdated
@@ -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) |
There was a problem hiding this comment.
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 FITS
es, instead of reading a FITS
passed as input. This makes the code harder to follow, and perhaps more error-prone
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
@giordano can this be merged now? |
No description provided.