toasty.merge.cascade_images(pio, start, merger, parallel=None, cli_progress=False, tile_filter=None)[source]

Downsample image tiles all the way to the top of the pyramid.

This function will walk the tiles in the tile pyramid, merging child tile images and writing new tile images at shallower levels of the pyramid.


An object managing I/O on the tiles in the pyramid.

startnonnegative integer

The depth at which to start the cascade process. It is assumed that the tiles at this depth are already populated by some other means. This function will create new tiles at shallower depths.

mergera merger function

The method used to create a parent tile from its child tiles. This is a callable that follows the Merger Protocol.

parallelinteger or None (the default)

The level of parallelization to use. If unspecified, defaults to using all CPUs. If the OS does not support fork-based multiprocessing, parallel processing is not possible and serial processing will be forced. Pass 1 to force serial processing.

cli_progressoptional boolean, defaults False

If true, a progress bar will be printed to the terminal.


A tile filtering function, suitable for passing to toasty.toast.generate_tiles_filtered().