A spectrum of electromagnetic radiation is detected by spatially dispersing radiation of varying wavelengths onto micromechanical sensors. As the micromechanical sensors absorb radiation, the sensors bend and/or undergo a shift in the resonance characteristics. The device can be used as a spectrometer or a temperature sensing device. A temperature sensor using micromechanical sensors can accurately and quickly measure the temperature of a remote object by sensing a spectrum of infrared radiation emitted by the object. The temperature sensor can measure temperature without knowing the emissivity of the object or the distance of the object from the detector.
 This invention was made with Government support under contract DE-AC05-96OR22464 awarded by the U.S. Department of Energy to Lockheed Martin Energy Systems, Inc. and the Government has certain rights in this invention.