Data Acquisition

Calibrating a channel needs a correlation matrix for that channel. The control devices neither produce nor collect that data themselves: they configure the DAQ (Data Acquisition) to run a correlator, start the TPM firmware sending channelised samples for the requested channels, and then record the files that appear.

This page describes that exchange only from the control side. For how the correlator and the file writer themselves work, see SKA Low MCCS Daq, and for the station and tile commands behind it, SKA Low MCCS SPSHW.

Setting up the DAQ

MccsStation.ConfigureStationForCalibration prepares the station for an acquisition: it passes any DAQ configuration overrides through to SpsStation, which configures the DAQ and starts its correlator consumer. Overrides are supplied as the daq_config parameter of GenerateCalibrationSolution; the defaults are otherwise used.

Acquiring a channel range

MccsStation.AcquireDataForCalibration starts a single acquisition for the whole channel range. Neither it nor SpsStation steps through the channels: SpsStation points the tiles at the DAQ with SetLmcDownload and starts them with SendDataSamples, and from then on the TPM firmware round-robins through the requested channels on its own, sending each one in turn with no further instruction from MCCS.

Their part after that is simply to record what arrives. The DAQ correlates the samples for each channel and writes the result to a HDF5 file, named for the channel it belongs to:

correlation_burst_<channel>_<date>_<time>_0.hdf5

The directory the files are written to is recorded against the sweep in the calibration database, so the files behind a solution can be found later.

MccsStation does not drive the acquisition; it tracks the SpsStation command and reports its outcome. SpsStation gives up on an acquisition itself once no correlator file has arrived for ten seconds, so a stalled sweep normally ends there rather than at a timeout in MCCS.

The shared data volume

The DAQ does not hand its files back to the devices that asked for them. It writes them into a shared volume, and the devices that need them read that same volume: the DAQ, SpsStation, MccsStationCalibrator and MccsCalibrationSolver device servers all have it mounted, so a file the DAQ has just finished writing is readable by the calibrator and the solver without being copied anywhere.

The volume is not mounted at the same place in every pod, so paths are passed between devices relative to the volume root rather than as absolute paths. The calibrator strips its own mount point from the path the DAQ reported before handing the file to the solver, which resolves it under its own root.

Which volume is used comes from the platform specification, and it is mounted by the helmfile templates in ska-low-helmfile-templates.

The embedded element pattern volume

The solver mounts a second volume, separate from the data volume, holding the embedded element pattern files its model is built from.

Learning that a file is ready

Each time the DAQ finishes writing a file, it reports a dataReceivedResult event, which propagates up through SpsStation and MccsStation to MccsStationCalibrator. The event carries the data mode and the name of the file that was written, and only correlator and tc_correlator modes are of interest to calibration.

Acquisition and solving overlap: GenerateCalibrationSolution starts the acquisition without waiting for it, then solves each channel as its file is announced, taking the channel number from the file name. See Generating a Solution for the sweep as a whole.