1. A spectral imager comprising: (1) an optical system comprising; (i) an imaging element that receives light from a scene, wherein the light comprises a plurality of spectral components, and wherein the imaging element images the scene onto a first coded aperture located at a first image plane; and (ii) the first coded aperture, wherein the first coded aperture has an aperture pattern, and wherein the aperture pattern is based on the number of spectral components in the plurality of spectral components; wherein the optical system provides a plurality of images of the scene on a second image plane, and wherein each of the plurality of images is uniquely characterized by a different one of the plurality of spectral components, and further wherein the plurality of images are interspersed on the second image plane; and (2) a photodetector array located at the second image plane, wherein the photodetector array receives the plurality of images, and wherein each photodetector of the photodetector array receives light that is characterized by only one of the plurality of spectral components.