An optical signal is compressively sampled. An optical component with a
plurality of transmissive elements and a plurality of opaque elements is
created. The location of the plurality of transmissive elements and the
plurality of opaque elements is determined by a transmission function. A
spectrum of the optical signal is dispersed across the optical component.
Signals transmitted by the plurality of transmissive elements are
detected in a single time step at each sensor of a plurality of sensors
dispersed spatially with respect to the optical component. Each sensor of
the plurality of sensors produces a measurement resulting in a number of
measurements for the single time step. A number of estimated optical
signal values is calculated from the number of measurements and the
transmission function. The transmission function is selected so that the
number of measurements is less than the number of estimated optical
signal values.