spacetelescope / webbpsf

James Webb Space Telescope PSF simulation tool
https://webbpsf.readthedocs.io
BSD 3-Clause "New" or "Revised" License
119 stars 63 forks source link

Failing test: test_nircam_SAMC #30

Open mperrin opened 6 years ago

mperrin commented 6 years ago

Issue by josePhoenix Tuesday Dec 09, 2014 at 19:07 GMT Originally opened as https://github.com/mperrin/webbpsf/issues/30


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.)

mperrin commented 6 years ago

Comment by josePhoenix Thursday Dec 18, 2014 at 16:42 GMT


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.

mperrin commented 6 years ago

Comment by josePhoenix Monday Feb 09, 2015 at 23:09 GMT


Pinged Laurent about this.

mperrin commented 6 years ago

Comment by mperrin Monday Feb 09, 2015 at 23:14 GMT


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.

mperrin commented 6 years ago

Comment by josePhoenix Tuesday Feb 10, 2015 at 00:29 GMT


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)