  Optical spectrometers have propelled scientific and technological
advancements in a wide range of fields. While sophisticated systems with
excellent performance metrics are serving well in controlled laboratory
environments, many applications require systems that are portable, economical,
and robust to optical misalignment. Here, we propose and demonstrate a
spectrometer that uses a planar one-dimensional photonic crystal cavity as a
dispersive element and a reconstructive computational algorithm to extract
spectral information from spatial patterns. The simple fabrication and planar
architecture of the photonic crystal cavity render our spectrometry platform
economical and robust to optical misalignment. The reconstructive algorithm
allows miniaturization and portability. The intensity transmitted by the
photonic crystal cavity has a wavelength-dependent spatial profile. We generate
the spatial transmittance function of the system using finite-difference
time-domain method and also estimate the dispersion relation. The transmittance
function serves as a transfer function in our reconstructive algorithm. We show
accurate estimation of various kinds of input spectra. We also show that the
spectral resolution of the system depends on the cavity linewidth that can be
improved by increasing the number of periodic layers in distributed Bragg
mirrors. Finally, we experimentally estimate the center wavelength and
linewidth of the spectrum of an unknown light emitting diode. The estimated
values are in good agreement with the values measured using a commercial
spectrometer.
