There is a bug in the LyotCoronagraph if it is used with an OpticalElement as the focal plane mask. The class tries to automatically guess the coronagraphic focal plane on which the OpticalElement is defined. This is necessary for the Fraunhofer propagation from the pupil to the focal plane. However, when an OpticalElement is used, it tries to get it from the element.input_grid. This does not return the input grid but a function that needs to be evaluated to get the actual input grid. I have attached a minimal working example.
The second approach has been implemented in #217. That has solved this issue for me. @ehpor do you want to keep this issue open to keep track of the original issue?
There is a bug in the LyotCoronagraph if it is used with an OpticalElement as the focal plane mask. The class tries to automatically guess the coronagraphic focal plane on which the OpticalElement is defined. This is necessary for the Fraunhofer propagation from the pupil to the focal plane. However, when an OpticalElement is used, it tries to get it from the element.input_grid. This does not return the input grid but a function that needs to be evaluated to get the actual input grid. I have attached a minimal working example.
A proposed work around is to add an optional parameter where you explicitly pass the focal plane mask.