Simulation ExportDataset writes only the MAIN table: the MS has empty subtables and CASA can't open it

Summary

ExportDataset (simulation pipeline, export_format="ms") writes only the MAIN table: every subtable (ANTENNA, FIELD, SPECTRAL_WINDOW, POLARIZATION, DATA_DESCRIPTION, FEED, OBSERVATION, ...) has 0 rows, so CASA can't open the measurement set.

Cause

ExportDataset.execute() calls DaskMS(output_name=...).write(context.dataset), and DaskMS.write(tables=None) defaults to the MAIN table only. The simulation docs' own snippet writes with tables="ALL", which works.

Expected

A simulated MS that CASA reads: ExportDataset passes tables="ALL" (or makes it configurable with "ALL" as the default for a new MS).

Observed

listobs / tclean: RuntimeError: Exception: Illegal ANTENNA1 value 41 found in main table. sim.ms/ANTENNA only has 0 rows (IDs).

Every subtable directory exists, with 0 rows.

Found while building a tutorial that simulates an ALMA observation with Pyralysis and self-calibrates it with CASA tclean, in Wenuray (https://github.com/miguelcarcamov/wenuray). Versions: Pyralysis 3.3.0, python-casacore 3.7.1, casatools/casatasks 6.7.6-14, Python 3.12.

Reproduction (shared by the related simulation→CASA issues):

from importlib import resources
import astropy.units as u
from astropy.coordinates import SkyCoord
from pyralysis.models.sky.point_source import PointSource
from pyralysis.pipelines.simulation import SimulationContext, SimulationPipeline

centre = SkyCoord("15h15m48.4s", "-37d09m16s")
configs = resources.files("pyralysis.simulation") / "antenna_configs"
context = SimulationContext(config={
    "antenna_config_path": str(configs / "alma.cycle10.6.cfg"),
    "sources": [PointSource(reference_intensity=0.1, sky_position=centre)],
    "observation_config": {"center_frequency": 345 * u.GHz, "channel_width": 2 * u.GHz,
                           "n_channels": 1, "pointing_position": centre, "hour_angle": "-1h",
                           "integration_time": 30 * u.s, "observation_time": "2h"},
    "export_path": "sim.ms", "export_format": "ms",
})
SimulationPipeline().run(context)

Workaround: run the pipeline without export_path and write with DaskMS(output_name=path).write(context.dataset, tables="ALL").

Related: #381 (closed) (a read dataset can't be written to a new MS with subtables), the simulation→CASA issues filed alongside this one.