Function icrar::cpu::PhaseMatrixFunction

Function Documentation

std::pair<Eigen::MatrixXd, Eigen::VectorXi> icrar::cpu::PhaseMatrixFunction(const Eigen::VectorXi &a1, const Eigen::VectorXi &a2, const Eigen::VectorXb &fg, uint32_t refAnt, bool allBaselines)

Generate Phase Matrix Given the antenna lists from an MS and (optionally) reference antenna and antenna flags: If non-negative RefAnt is provided it only forms the matrix for baselines with that antenna. If True Map is provided it returns the index map for the matrix (only useful if RefAnt set).

This function generates and returns the linear matrix for the phase calibration (only)

Parameters:
  • a1 – indexes vector of 1st antenna of each baselines

  • a2 – indexes vector of 2nd antenna of each baselines

  • refAnt – the reference antenna index

  • fg – a flag vector of flagged baselines to ignore when true

  • allBaselines – whether to generate phase matrix for all baselines or just ones with reference antenna

Returns:

std::pair<Matrixd, Matrixi> for refAnt = none: first matrix is of size [baselines,stations] and seconds of size[baselines,1] for 0 <= refAnt < stations: first matrix is of size [stations,stations] and seconds of size[stations,1]