-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels