mperrin / poppy

Physical Optics Propagation in Python
BSD 3-Clause "New" or "Revised" License
175 stars 41 forks source link

Support for intermediate planes? #268

Open joncox123 opened 4 years ago

joncox123 commented 4 years ago

The docs state that you plan to add support for modeling propagation to intermediate planes. For example, if you want to compute the field some distance behind the image plane. Has this support been added? If not, do you have a timeline?

douglase commented 4 years ago

Yep, you can return intermediate planes if you set return_intermediates=True when you call the calc_psf function: https://poppy-optics.readthedocs.io/en/latest/api/poppy.Instrument.html#poppy.Instrument.calc_psf

There are examples here for a Fresnel system, this will let you model diffraction at any plane in the system: https://github.com/spacetelescope/poppy/blob/stable/notebooks/Fresnel_Propagation_Demo.ipynb

and there are examples here of returning intermediate pupil and image planes for a Fraunhofer system: https://github.com/spacetelescope/poppy/blob/stable/notebooks/MatrixFTCoronagraph_demo.ipynb

Is that what you were looking for?

(development has moved to https://github.com/spacetelescope/poppy/ but this feature is available for the versions in either repository).