AntennaGainInjector: time-correlated, channel-constant antenna gains (and the injected gains returned) for self-calibration simulations

Summary

AntennaGainInjector is the injector for antenna-based errors (the ones self-calibration solves), but it draws each antenna's gain independently for every integration and every channel. Real gains are smooth in time (atmospheric phase has a structure function; electronics drift slowly) and nearly constant across a spectral window. So a simulation can't yet produce the gains self-calibration is tested on, and per-channel independent gains decorrelate the data within a spectral window in a way no per-window solve can undo.

Proposal

Options on AntennaGainInjector (or a sibling injector):

  • Time correlation: e.g. a coherence time or a phase structure function D(τ) (a Gaussian process, or a random walk plus slow sinusoids), and a constant per-antenna offset.
  • Frequency structure: constant across a spectral window by default for antenna gains, with the per-channel variation left to BandpassNoiseInjector; optionally a delay, i.e. a phase slope across frequency.
  • Return the injected gains (per antenna, time and spectral window), so tests can compare what a calibration recovers with what was injected. Today they have to be reconstructed by applying the seeded injector to unit visibilities.

Documentation

GainNoiseInjector and PhaseNoiseInjector are per visibility (per baseline): those errors don't factor into antenna gains, so self-calibration can't remove them. That's worth stating in their docstrings, together with AntennaGainInjector being the antenna-based one (#374 (closed) notes these classes have no class docstring).

Context

In Wenuray's tutorial, the gains change every 30 s integration, so only solint="int" can follow them; that works, but realistic self-calibration schedules (long to short solution intervals, #127 in Wenuray) need time-correlated gains to be demonstrated.

Related: #48 (chaining injectors as a pipeline step), #374 (closed).