Esempio n. 1
0
PyObject *PyPSFExObject_rec(struct PyPSFExObject* self, PyObject *args)
{
    double row=0, col=0;
    if (!PyArg_ParseTuple(args, (char*)"dd", &row, &col)) {
        return NULL;
    }

    PyObject *image=make_psf_image(self->psfex);
    double *data=(double*) PyArray_DATA(image);

    _psfex_rec_fill(self->psfex, row, col, data);

    return image;
}
Esempio n. 2
0
double *psfex_recp(const struct psfex *self,
                   double row,
                   double col,
                   long *nrow,
                   long *ncol)
{

    // this is the size of the reconstructed image
    (*nrow) = RECON_NROW(self);
    (*ncol) = RECON_NCOL(self);
    long npix=(*nrow)*(*ncol);
    double *data=calloc(npix, sizeof(double));
    if (!data) {
        fprintf(stderr,"could not allocate %ld doubles\n", npix);
        exit(1);
    }

    _psfex_rec_fill(self, row, col, data);

    return data;
}