################ 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 :doc:`SKA Low MCCS Daq `, and for the station and tile commands behind it, :doc:`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: .. code-block:: text correlation_burst___