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

Downsampling with PSF #1

Open
bluetooth12 opened this issue Sep 22, 2019 · 1 comment
Open

Downsampling with PSF #1

bluetooth12 opened this issue Sep 22, 2019 · 1 comment

Comments

@bluetooth12
Copy link

Hello, I have two sets of images: One at a high resolution and one at a low resolution. I want both sets of images to be at the same resolution and, to do so, I need to downsample the high resolution image with a PSF. The result should be a blurred image that is "zoomed-out" so that the high resolution image looks like the low resolution image. Can your code do this? If not, can you suggest a resource I could use (paper/code) to achieve this result?

@dstndstn
Copy link
Owner

Hi,

I think you want to do this in two steps. First, convolve the high-resolution image by a kernel that will take the high-resolution PSF to the low-resolution PSF. Next, resample the high-resolution image to the pixel grid of the low-resolution image.

The first step you can do using, eg, scipy.ndimage
https://docs.scipy.org/doc/scipy-0.16.1/reference/ndimage.html

The second step you could do using my code, eg, astrometry.util.resample's resample_with_wcs.
https://github.com/dstndstn/astrometry.net/blob/master/util/resample.py#L16

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

2 participants