-
Notifications
You must be signed in to change notification settings - Fork 3
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
Interpolator tweak #6
Conversation
1b96b53
to
0f3da24
Compare
src/utils.jl
Outdated
Pads a given array and creates a border with edge elements. | ||
""" | ||
function pad_edges(array_in::Matrix{T}) where {T} | ||
image = zeros(size(array_in)[1] + 2, size(array_in)[2] + 2) |
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're not using the type T
. I'm pretty sure that for type-stability you really want to allocate a matrix with eltype T
test/core.jl
Outdated
@test check_diff(reproject(imgin, imgout, order = 2)[1], rp.reproject_interp(hdu2, hdu1.header, order = 2)[1]) == true | ||
@test check_diff(reproject(imgin[1], imgout[1], shape_out = (1000,1000))[1], | ||
rp.reproject_interp(hdu2, astropy.wcs.WCS(hdu1.header), shape_out = (1000,1000))[1]) == true | ||
@test isapprox(reproject(imgin, imgout, order = 0)[1]', rp.reproject_interp(hdu2, hdu1.header, order = 0)[1], nans = true, atol = 1e-4) |
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 prefer using relative tolerance, rtol
, rather than absolute tolerance. The latter doesn't say anything about the significance of the difference
90ea212
to
9a4437e
Compare
This patch adds a tweak as done and mentioned here.