Create a sampler function for all-sky data in a “plate carrée” projection.

In this projection, the X and Y axes of the image correspond to the longitude and latitude spherical coordinates, respectively. Both axes map linearly, the X axis to the longitude range [2pi, 0] (i.e., longitude increases to the left), and the Y axis to the latitude range [pi/2, -pi/2]. Therefore the point with lat = lon = 0 corresponds to the image center and data[0,0] is the pixel touching lat = pi/2, lon=pi, one of a row adjacent to the North Pole. Typically the image is twice as wide as it is tall.

dataarray-like, at least 2D

The map to sample in plate carrée projection.

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