Skip to content

Large images from get_rec when PSF_SAMP < 1 #3

@rmjarvis

Description

@rmjarvis

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions