make_agnostic_backward

hcipy.optics.make_agnostic_backward(backward)

A decorator for a backward function on an AgnosticOpticalElement.

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

Parameters
backwardfunction

The modified backward-type function.

Returns
function

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