  Spatially varying spectral modulation can be implemented using a liquid
crystal spatial light modulator (SLM) since it provides an array of liquid
crystal cells, each of which can be purposed to act as a programmable spectral
filter array. However, such an optical setup suffers from strong optical
aberrations due to the unintended phase modulation, precluding spectral
modulation at high spatial resolutions. In this work, we propose a novel
computational approach for the practical implementation of phase SLMs for
implementing spatially varying spectral filters. We provide a careful and
systematic analysis of the aberrations arising out of phase SLMs for the
purposes of spatially varying spectral modulation. The analysis naturally leads
us to a set of "good patterns" that minimize the optical aberrations. We then
train a deep network that overcomes any residual aberrations, thereby achieving
ideal spectral modulation at high spatial resolution. We show a number of
unique operating points with our prototype including dynamic spectral
filtering, material classification, and single- and multi-image hyperspectral
imaging.
