make_agnostic_forward

hcipy.optics.make_agnostic_forward(forward)

A decorator for a forward function on an AgnosticOpticalElement.

Any derived class should use this decorator on any forward-type function. This allows the function to have access to instance data, in addition to agnostic properties.

Parameters
forwardfunction

The modified forward-type function.

Returns
function

The new forward-type function that calls the old function with added instance data.