WcsSampler

class toasty.samplers.WcsSampler(data, wcs)[source]

Bases: object

Create a sampler for data with a generic WCS specification.

The sampler returns values in float32, regardless of input data type.

Parameters:
dataarray

The image data.

wcsastropy.wcs.WCS

A WCS data structure describing the data.

Returns:
A function that samples the data; the call signature is
vec2pix(lon, lat)-> data, where the inputs and output are 2D arrays
and lon and lat are in radians.

Methods Summary

filter()

Get a TOAST tile-filter function for the specified chunk.

sampler()

Methods Documentation

filter()[source]

Get a TOAST tile-filter function for the specified chunk.

Returns:
A callable object, filter(tile) -> bool, suitable for use as a tile
filter function.
sampler()[source]