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

RectangularAperture of size 1 gives weights of 0 #54

Open
Michael-Reefe opened this issue Aug 21, 2023 · 0 comments
Open

RectangularAperture of size 1 gives weights of 0 #54

Michael-Reefe opened this issue Aug 21, 2023 · 0 comments

Comments

@Michael-Reefe
Copy link

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
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

No branches or pull requests

1 participant