IViS Workflow

The IViS imaging pipeline performs non-linear joint deconvolution of interferometric and optional single-dish data using a regularized optimization approach.

At the top level, a controller script (e.g., pipeline.py) instantiates a DataProcessor, which loads visibilities from calibrated Measurement Sets (.ms) and reprojects primary beam models. A single-dish map may also be provided for hybrid deconvolution.

These inputs are assembled into a VisData structure and interpolation grids, then passed to the Imager. A model class is chosen in the pipeline script and passed explicitly to the Imager.process() method.

The model’s forward() method simulates visibilities given image parameters, and the loss() method defines the cost function and gradient. Optimization is performed using the L-BFGS-B algorithm from scipy.optimize.

The final image cube is written to disk in physical units of Jy/arcsec^2 or K. This workflow supports GPU acceleration and is designed to scale to large mosaics.

The flowchart below summarizes the key modules and their data flow.

digraph ivis_workflow {
    rankdir=TB;
    bgcolor="white";
    fontcolor="black";
    fontsize=22;
    nodesep=0.35;
    ranksep=1.2;
    ratio=compress;

    node [
        shape=box,
        style=filled,
        fontname="Helvetica-Bold",
        fontsize=20,
        fontcolor="black",
        fillcolor="white",
        margin=0.25,
        penwidth=2
    ];

    // --- Nodes ---
    PATHS      [label="Paths & WCS", color="#b0bec5"];
    PARAMS     [label="User parameters\n(λ, iterations, devices, ...)", color="#b0bec5"];

    CASAREAD   [label="CasacoreReader()\nread visibilities", color="#ffb74d"];
    VISDATA    [label="VisIData\n(dataclass)", color="#ff8a65"];

    DATAPROC   [label="DataProcessor\n(PB + grid)", color="#ba68c8"];
    PBGRID     [label="PB + grid FITS", color="#ba68c8"];

    MODEL      [label="Classic3D\n(model class)", color="#fbc02d"];
    IMAGER     [label="Imager3D\n(optimization loop)", color="#4fc3f7"];

    IMAGE      [label="Image cube\n(K or Jy arcsec⁻²)", color="#b0bec5"];

    // --- Links: ONLY label size increased ---
    edge [
        color="black",
        fontcolor="black",
        fontsize=22     // bigger link labels only
    ];

    // --- Data flow ---
    PATHS    -> CASAREAD   [label="path_ms"];
    PATHS    -> DATAPROC   [label="beams, header"];

    CASAREAD -> VISDATA    [label="returns"];
    VISDATA  -> IMAGER     [label="visibilities"];

    DATAPROC -> PBGRID     [label="read/compute"];
    PBGRID   -> IMAGER     [label="pb + grid"];

    MODEL    -> IMAGER     [label="forward + loss"];
    IMAGER   -> IMAGE      [label="writes"];

    // --- Invisible spine to enforce vertical ordering ---
    PATHS    -> CASAREAD  [style=invis];
    CASAREAD -> DATAPROC  [style=invis];
    DATAPROC -> IMAGER   [style=invis];

    // --- Clusters ---
    subgraph cluster_inputs {
        label="Configuration script";
        fontsize=18;
        style=dashed;
        color="#b0bec5";
        fontcolor="#5c6bc0";
        penwidth=2;
        PATHS; PARAMS;
    }

    subgraph cluster_io {
        label="Data Ingestion";
        fontsize=18;
        style=dashed;
        color="#ffb74d";
        fontcolor="#ffb74d";
        penwidth=2;
        CASAREAD; VISDATA;
    }

    subgraph cluster_pb {
        label="Pre-processing";
        fontsize=18;
        style=dashed;
        color="#ba68c8";
        fontcolor="#ba68c8";
        penwidth=2;
        DATAPROC; PBGRID;
    }

    subgraph cluster_recon {
        label="Optimization";
        fontsize=18;
        style=dashed;
        color="#4fc3f7";
        fontcolor="#4fc3f7";
        penwidth=2;
        MODEL; IMAGER; IMAGE;
    }
}