Measurement Set Reading ======================= Everything that knows the Measurement Set format. Named for the format rather than generically, so that a second input format becomes a sibling module with its own name. Reading declarations rather than assuming them ---------------------------------------------- An MS records several properties that are easy to assume and expensive to get wrong. TABASCAL reads them from the file: **Correlations.** The ``POLARIZATION`` subtable's ``CORR_TYPE`` lists which correlations the MS actually holds, as CASA Stokes codes. :func:`~tabascal.ms.resolve_correlation` matches the configured ``data.corr`` against it *by identity, not by position*, so ``yy`` selects YY whether the MS holds all four correlations or only that one. A fixed ``{xx: 0, xy: 1, yx: 2, yy: 3}`` table only works for a full four-correlation MS: a single-correlation MS has a length-1 correlation axis whatever polarisation it holds, and a two-correlation ``(XX, YY)`` MS puts YY at index 1. Requesting a correlation the MS does not hold is an error naming what it does hold, rather than an index error or a silent read of the wrong polarisation. **Time scale.** The ``TIME`` column's ``MEASINFO`` record declares the scale its values are on, almost always ``UTC``. :func:`~tabascal.ms.read_time_scale` returns it, and it is carried in the ``read_ms`` result as ``time_scale``. The scales differ by enough to matter — reading a UTC epoch as TAI shifts it by 32 leap seconds, roughly 240 km along a LEO satellite's ground track — and none of these mismatches raise. .. note:: The declared scale is currently *reported*, not yet honoured: satellite trajectories are computed as if every observation were UTC, and a non-UTC MS produces a warning. Wiring it through is tracked by issue #133. .. automodule:: tabascal.ms :members: