sample_layer

toasty.toast.sample_layer(pio, mode, sampler, depth, cli_progress=False)[source]

Generate a layer of the TOAST tile pyramid through direct sampling.

Parameters
piotoasty.pyramid.PyramidIO

A PyramidIO instance to manage the I/O with the tiles in the tile pyramid.

modetoasty.image.ImageMode

The image mode of this data source.

samplercallable

The sampler callable that will produce data for tiling.

depthint

The depth of the layer of the TOAST tile pyramid to generate. The number of tiles in each layer is 4**depth. Each tile is 256×256 TOAST pixels, so the resolution of the pixelization at which the data will be sampled is a refinement level of 2**(depth + 8).

cli_progressoptional boolean, defaults False

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