mperrin / webbpsf

James Webb Space Telescope PSF simulation tool - NOTE THIS VERSION OF REPO IS SUPERCEDED BY spacetelescope/webbpsf
BSD 3-Clause "New" or "Revised" License
16 stars 15 forks source link

Failing test: test_nircam_SAMC #30

Closed josePhoenix closed 6 years ago

josePhoenix commented 9 years ago

This test is failing because the precision is less than desired on some machines. The difference between the same PSF calculated with the SAM coronograph method and with the no_sam option is supposed to be less than 1e-7.

Can we make the cutoff less stringent?

(Also, it looks like the code path for the SAM method in the test doesn't check that SAM was actually used. It apparently was, if there's a discrepancy, but maybe there should be a way to signal that in the PSF returned. If there is already, it should be checked.)

josePhoenix commented 9 years ago

Per discussion with Marshall, this is more subtle than just changing the cutoff. Laurent is going to provide some analytical solutions on a square aperture to sanity-check our SAM calculation in a separate test.

Clearing the milestone for now.

josePhoenix commented 9 years ago

Pinged Laurent about this.

mperrin commented 9 years ago

Laurent is on travel to California the rest of this week, so I don't expect much action on this any time in the next few days. I would suggest that since this is just a matter of more careful testing it's low enough priority to wait until the next release after this one.

josePhoenix commented 9 years ago

I guess what worries me is the structure in the image showing the difference between the two algorithms. For sufficiently high oversampling, the morphology of the PSF does look very similar. The residuals don't look like numerical noise to me, though. (But since the semi-analytic algorithm is pretty much a black box to me it's possible these patterns are totally expected.)

Here's an image with what I'm seeing for oversampling=16, if I normalize the outputs such that the intensity sums to 1 in each PSF:

screen shot 2015-02-09 at 7 28 37 pm

(example code)

mperrin commented 6 years ago

Issues migrated to https://github.com/spacetelescope/webbpsf/issues. Please see the copies in that repo from now on.