Optical device images the sun on a mask that transmits it or prevents its transmission to a photodetector behind the mask depending on image position on the mask. The device uses a pinhole as the image former to provide a large field of view and diffraction-limited resolution