## build_cube()


Build a Cassini UVIS PDS4 FITS cube for `pds_product_id` (production path).


Usage

``` python
build_cube(
    pds_product_id,
    geometry,
    spice_kernels,
    target,
    out_dir,
    *,
    write_pds4_label=True,
    calibration="default"
)
```


## Parameters


`pds_product_id: str`  
Cassini UVIS PRODUCT_ID, e.g. `"EUV2013_047_09_33_59"`. The raw DAT/LBL pair will be fetched via `pyuvis` (which delegates to `planetarypy.catalog.fetch_product`).

`geometry: Mapping[str, Mapping[str, object]]`  
Externally-computed geometry, keyed by FITS HDU name (`"SC_GEOM"`, `"BODY_GEOM"`, `"GENERAL_GEOM"`, `"RING_GEOM"`). Each value maps a column name to a `numpy.ndarray` shaped per Mark's 2026-02 FITS layout proposal.

`spice_kernels: Sequence[str]`  
Filenames of SPICE kernels used to compute `geometry`; written verbatim into the `KERNELS` HDU.

`target: str`  
PDS target name, e.g. `"TITAN"`.

`out_dir: str | Path`  
Output directory. The FITS file is written as `<pds_product_id>.fits`.

`write_pds4_label: bool = ``True`  
If `True` (default), emit a sibling PDS4 XML label.

`calibration: str = ``"default"`  
Calibration source. `"default"` maps to `"pyuvis"`; see `~cubegenpy.config.BuildConfig`.


## Returns


`CubeProduct`  
Paths to the written FITS and (optional) PDS4 label.


## Raises


`NotImplementedError`  
The production `PyuvisSource` (read a real PDS product + merge the externally-computed metadata and backplanes) is not built yet. Use [cubegenpy.builder.CubeBuilder](CubeBuilder.md#cubegenpy.CubeBuilder) with `~cubegenpy.sources.SyntheticSource` or `~cubegenpy.sources.FitsReadbackSource` for the working paths.
