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

Large images from get_rec when PSF_SAMP < 1 #3

Open
rmjarvis opened this issue Jan 10, 2015 · 0 comments
Open

Large images from get_rec when PSF_SAMP < 1 #3

rmjarvis opened this issue Jan 10, 2015 · 0 comments

Comments

@rmjarvis
Copy link

When PSF_SAMP < 1, the code for make_psf_image is wrong:

static PyObject *make_psf_image(const struct psfex *self)
{
    PyObject *image=NULL;
    int ndims=2;
    npy_intp dims[2];
    dims[0] = PSFEX_NROW(self);
    dims[1] = PSFEX_NCOL(self);
    image = PyArray_ZEROS(ndims, dims, NPY_FLOAT64, 0);
    return image;
}

The dims array should really be multiplied by self->psfex->pixstep, and then rounded up (maybe with an extra +1 to be safe).

When PSF_SAMP < 1, the current code isn't really wrong, just wasteful. But if PSF_SAMP > 1, your code will lose information at the edges of the PSF, so that's a bug.

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