class toasty.toast.ToastSampler(pio, sampler, clobber, format=None)[source]

Bases: object

A utility for performing TOAST sampling on a Pyramid.


Handle for image I/O on the pyramid


The sampler callable that will produce data for tiling.


If true, data in any existing tiles will be ignored and destroyed. Otherwise, data from existing tiles will be read and updated. The “clobber” mode is faster but will give incorrect results if other sampling operations will be run on this pyramid.

formatoptional str

If provided, override the default data storage format of pio with the named format, one of the values in toasty.image.SUPPORTED_FORMATS.


This class provides a visit_callback() method that can be passed to the toasty.pyramid.Pyramid.visit_leaves() function. This class preserves some state between calls to help speed up processing.

Methods Summary

visit_callback(pos, tile)

Methods Documentation

visit_callback(pos, tile)[source]