fn renderer(
    observer: GridObserverWrapper<'_>,
    adapter: &PyAny,
    callback: PyObject,
    finalize: Option<bool>
) -> SystemWrapper
Expand description

Renders grid output to RGB images and passes them back to Python through a callback function

Parameters:

observer - a grid observer to get data from the model

adapter - an image adapter to transform observer output into a tree band RGB pixels

callback - a Python function used to pass the image back to Python as a NumPy array

finalize - whether callback is invoked only after the last time step