poppy icon indicating copy to clipboard operation
poppy copied to clipboard

GaussianAperture ignores pupil_diam

Open retroexpress opened this issue 3 years ago • 2 comments

It seems the pupil aperture is always 3*FWHM when I generate a Gaussian aperture, even when specified otherwise. Here are the plots for pupil_diam=0.01 and 1:

npix = 1024
wf = poppy.FresnelWavefront(0.1*u.m,wavelength=1550e-9,npix=npix,oversample=4)
wf *= poppy.GaussianAperture(w=2.28*15/2*u.mm,pupil_diam=1)

pupil0 01 pupil1

This is an awesome software package BTW.

retroexpress avatar Dec 07 '21 05:12 retroexpress

Hi @retroexpress - I just wanted to say, I/we did see this issue report. Apologies but we won't be able to look into it in any detail for some time (weeks, possibly months) - all our efforts right now are focused on supporting the immanent launch and commissioning of the Webb Space Telescope.

That said I am not quite sure what exactly is the issue you're reporting. In the example code given, the wavefront size is set when it's created:

wf = poppy.FresnelWavefront(0.1*u.m,wavelength=1550e-9,npix=npix,oversample=4)

That sets the array size and extent, independent of any optics.

To clarify, the pupil_diam parameter of an optic such as the GaussianAperture is only relevant in cases where there isn't a sampling defined by some Wavefront. For instance, if you try to display that aperture on its own via the .display() method, it needs to pick some pupil size to sample and display the optic on. But in the case you show here, the sampling is set first on the Wavefront object.

mperrin avatar Dec 16 '21 15:12 mperrin

Hi Marshall, thanks for the reply. I understand you have some pretty big fish to fry for the foreseeable future so I really appreciate you taking the time. The issue I was reporting was that size of the aperture of the gaussian always seems fixed at 3FWHM, regardless of what I specify. Is pupil_diam not what is specifying the size of the circle in the phase plots? It certainly looks to be 3FWHM and I don't see how that could be coming from setting the wavefront size and sampling...

retroexpress avatar Dec 21 '21 02:12 retroexpress