This invention discloses a design of an array of micron-sized spectrometer units that can measure the spectrum of incoming light in the wavelength range of 200 nm to 2000 nm, with a spatial resolution comparable to the size of a single spectrometer unit. Each spectrometer unit is composed of a set of distinct photodetectors made of single-wall carbon nanotubes of defined atomic structures, placed in parallel with tube-to-tube separations controlled at nanometer precision by DNA origami technology. A high-density array of identical spectrometers can be constructed by placing DNA origami/carbon nanotube complexes in photolithographically-defined locations, resulting in a system we call Nanotube Spectrometer Array (NSA). NSA is expected to greatly enhance the power of spectral imaging in many fields of science and technology.