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

PSF stamp size wrt to PSF_SAMP #11

Open
MorganSchmitz opened this issue Jan 7, 2018 · 0 comments
Open

PSF stamp size wrt to PSF_SAMP #11

MorganSchmitz opened this issue Jan 7, 2018 · 0 comments

Comments

@MorganSchmitz
Copy link

This is closely related to #3, i.e. to the size of the PSF images from get_rec when PSFEx is run with PSF_SAMP different than 1.

The size of the PSF images (in number of pixels) is currently multiplied by PSF sampling (since bc2ef47).

Two concerns with this:

  1. Shouldn't the size be multiplied by 1/PSF_SAMP (i.e. self->pixstep) instead?
  2. The PSFEx parameter PSF_SIZE determines the size (in pixels) of the postage stamps in which the PSF model components are stored; I believe this is what determines the original size of the PSF images returned here, through self->masksize, before accounting for PSF sampling and handling odd/even number of pixels:

    psfex/src/psfex.c

    Lines 59 to 63 in 70843e6

    // and set the reconstruction size, using psf sampling factor. Make sure it's odd
    self->reconsize[0] = (long) ceil((float) self->masksize[0] * (float) psf_samp);
    if ((self->reconsize[0] % 2) == 0) { self->reconsize[0]++; }
    self->reconsize[1] = (long) ceil((float) self->masksize[1] * (float) psf_samp);
    if ((self->reconsize[1] % 2) == 0) { self->reconsize[1]++; }

    Suppose this parameter was fixed when running PSFEx, say at the same value as that chosen for the postage stamp sizes of a preceding SExtractor run, and PSF_SAMP was chosen smaller than 1. Wasn't the potential extra information (by the edges) already lost anyway?

Here is an example:
PSFEx is ran on a SExtractor catalog obtained from real data and containing stamps of 41x41 pixels, with different PSF_SIZE and PSF_SAMPLING values. Here are the PSF images we get from get_rec at an arbitrary location, with pixel values below 1e-12 shown in black:

  • PSF_SIZE also set to 41,41:
    reconstructions

  • PSF_SIZE set to 83,83:
    reconstructions_biggerstamps

Note images contain different number of pixels.
Beside the obvious artefacts due to small/slightly negative pixel values, the black areas show parts of the image where no information could be extrapolated.

(c) in both cases illustrates point 1.: the produced images are bigger, but contain no additional information. Conversely, images are smaller than they could be in both (a) cases.

And here are the same plots, for the actual (first) PSFEx component:

  • PSF_SIZE set to 41,41:
    psfexfirstcomponent

  • PSF_SIZE set to 83,83:
    psfexfirstcomponent_biggerstamps

From my understanding, these components are the only sources of information used when running get_rec. Isn't the extra information PSFEx could provide already lost if it was run with excessively small PSF_SIZE values?

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