pub fn init_output_cube(
input_path: &Path,
output_path: &Path,
target_beams: &[Option<Beam>],
mode: CubeMode,
meta: &CubeMeta,
) -> Result<(), CubeError>Expand description
Initialise an output cube by copying the input header, then updating the beam headers, closing the file once. The data unit is zero-filled by the close.
For Natural mode a BEAMS binary-table extension is appended.
For Total mode only the primary BMAJ/BMIN/BPA keywords are updated.
The streaming cube write path uses CubeWriter::create instead, which keeps
the handle open so the data unit is written a single time. This function
remains for callers that initialise then write planes through a separate
handle (e.g. write_channel).