Photometry.jl
Photometry.jl copied to clipboard
RectangularAperture of size 1 gives weights of 0
Hello,
I was trying to use Photometry.jl to generate an aperture around a single pixel, so that it would just extract the value from that one pixel. (I know this is redundant since I could just index that one pixel, but for the sake of consistency I wanted to be able to do this as well). However, it seems like there is a bug in Photometry.jl where trying to generate a rectangular aperture with a width/height of exactly 1 causes all of the weights to be 0:
julia> using Photometry
julia> ap = RectangularAperture(10,10,1.,1.,0.)
2×2 RectangularAperture{Float64} with indices 9:10×9:10:
0.0 0.0
0.0 0.0
I would expect it to just give an aperture with indices of 10:10x10:10 with a weight of 1.0. And if I change the width/height to a value slightly above 1, it seems to work as expected:
julia> ap = RectangularAperture(10,10,1+eps(),1+eps(),0.)
2×2 RectangularAperture{Float64} with indices 9:10×9:10:
0.0 0.0
0.0 1.0