  We introduce CALAMITY, a precision bandpass calibration method for radio
interferometry. CALAMITY can solve for direction independent gains with
arbitrary frequency structure to the high precision required for 21 cm
cosmology with minimal knowledge of foregrounds or antenna beams and does not
require any degree of redundancy (repeated identical measurements of the same
baseline).
  We have achieved this through two key innovations. Firstly, we model the
foregrounds on each baseline independently using a flexible and highly
efficient set of basis functions that have minimal overlap with 21 cm modes and
enforce spectral smoothness in the calibrated foregrounds. Secondly, we use an
off-the-shelf GPU accelerated API (TENSORFLOW) to solve for per-baseline
foregrounds simultaneously with per-frequency antenna gains in a single
optimization loop. GPU acceleration is critical for our technique to be able to
solve for the large numbers of foreground and gain parameters simultaneously
across all frequencies for an interferometer with $\gtrsim 10$ antennas in a
reasonable amount of time. In this paper, we give an overview of our technique
and using realistic simulations and demonstrate its performance in solving for
and removing pathological gain structures to the level necessary to measure
fluctuations in the 21 cm emission field from Hydrogen gas during the Cosmic
Dawn and Reionization. If you want to start using CALAMITY now, you can find a
tutorial notebook at
https://github.com/aewallwi/calamity/blob/main/examples/Calamity_Tutorial.ipynb .
