toasty.samplers Module¶
“Sampler” functions that fetch image data as a function of sky coordinates.
The Sampler Protocol¶
A sampler is a callable object that obeys the following signature: func(lon,
lat) -> data
, where lon and lat are 2D numpy arrays of spherical
coordinates measured in radians, and the returned data array is a numpy
array of at least two dimensions whose first two axes have the same shape as
lon and lat. The data array gives the map values sampled at the
corresponding coordinates. Its additional dimensions can be used to encode
color information: one standard is for data to have a dtype of
np.uint8
and a shape of (ny, nx, 3)
, where the final axis samples
RGB colors.
Functions¶
|
Create a sampler function for all-sky data in a “plate carrée” projection. |
Create a sampler function for all-sky data in a “plate carrée” projection using Galactic coordinates. |
|
Create a sampler function for all-sky data in a “plate carrée” projection using ecliptic coordinates. |
|
Create a sampler function for planetary data in a “plate carrée” projection. |
|
Create a sampler function for planetary data in a “plate carrée” projection where the |
|
Create a sampler function for data in a “plate carrée” projection where the |
|
|
Create a sampler for HEALPix data read from a FITS file. |
|
Create a sampler for HEALPix image data. |
Classes¶
|
Setup for TOAST sampling of a chunked plate-carree image. |
|
Create a sampler for data with a generic WCS specification. |