sample_layer_filtered¶
- toasty.toast.sample_layer_filtered(pio, tile_filter, sampler, depth, coordsys=ToastCoordinateSystem.ASTRONOMICAL, parallel=None, cli_progress=False)[source]¶
Populate a subset of a layer of the TOAST tile pyramid through direct sampling.
- Parameters:
- pio
toasty.pyramid.PyramidIO
A
PyramidIO
instance to manage the I/O with the tiles in the tile pyramid.- tile_filtercallable
A tile filtering function, suitable for passing to
toasty.toast.generate_tiles_filtered()
.- 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 of2**(depth + 8)
.- coordsysoptional
ToastCoordinateSystem
The TOAST coordinate system to use. Default is
ToastCoordinateSystem.ASTRONOMICAL
.- 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.
- pio