  The next technological breakthrough in millimeter-submillimeter astronomy is
3D imaging spectrometry with wide instantaneous spectral bandwidths and wide
fields of view. The total optimization of the focal-plane instrument, the
telescope, the observing strategy, and the signal-processing software must
enable efficient removal of foreground emission from the Earth's atmosphere,
which is time-dependent and highly nonlinear in frequency. Here we present
TiEMPO: Time-Dependent End-to-End Model for Post-process Optimization of the
DESHIMA Spectrometer. TiEMPO utilizes a dynamical model of the atmosphere and
parametrized models of the astronomical source, the telescope, the instrument,
and the detector. The output of TiEMPO is a time-stream of sky brightness
temperature and detected power, which can be analyzed by standard
signal-processing software. We first compare TiEMPO simulations with an on-sky
measurement by the wideband DESHIMA spectrometer and find good agreement in the
noise power spectral density and sensitivity. We then use TiEMPO to simulate
the detection of a line emission spectrum of a high-redshift galaxy using the
DESHIMA 2.0 spectrometer in development. The TiEMPO model is open source. Its
modular and parametrized design enables users to adapt it to design and
optimize the end-to-end performance of spectroscopic and photometric
instruments on existing and future telescopes.
