-
Notifications
You must be signed in to change notification settings - Fork 13
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
Make it easier to specify how the PSF profile should be centered on an image #73
Comments
works for me |
Why is this needed? Can't the user just say (int(x), int(y)) to centre in a pixel? I don't understand the `center=pos` option. Does it mean calculate the PSF at the specified position, but draw it as if it were at `pos`?
|
Yes, that is the current workaround.
But it feels slightly clunky compared to
Well, you might not want the image you are drawing onto to have the same meanings of (x,y) as the original image where the interpolation is defined. For instance, you might have the image on which you are rendering the PSF be centered at (0,0) for convenience of some measuring code. Furthermore, you might be concerned about some pixelization effects in your code, so maybe you don't always want the PSF centered in the center of the central pixel. Maybe you want to dither around by a random sub-pixel offset relative to the center. Then you would do
Anyway, if you don't have a use for it yourself, you don't need to use it (natch). But in some DES work we've been doing, there was some confusion on how Piff was working here, so this is intended to make it easier for the user to be clear about what they are asking Piff to do wrt the center of the rendering. |
FYI, I'll mostly be leveraging the work I did on this GalSim PR where I added a |
Currently
psf.draw(x,y)
centers the PSF profile at the sub-pixel values of the provided x,y positions.This is sometimes a desirable feature, but not always. We should make it easier for the user to specify how they want the PSF image centered. I'm proposing a new
center
keyword argument to the draw command with the following options:The text was updated successfully, but these errors were encountered: