write_skeleton()

Write a geometry-complete, science-empty product and return its path.

Usage

Source

write_skeleton(
    out_dir,
    product_id,
    *,
    dims,
    header,
    geometry=None,
    kernels=(),
    bodies=(),
    resolved_bodies=(),
    wavelength=None,
    subsampling=None,
    rings_in_fov=False,
    edge_on=False,
    overwrite=True
)

Every argument except the science arrays mirrors cubegenpy.writer.build_hdulist(), so a skeleton is a normal product in every respect but its data content.

Parameters

dims: Dims

Must be final. FITS allocates array space on write, so the science arrays stage 2 fills have to be the right size from the start.

header: Mapping[str, object]

Primary-header values. PIPESTAT is set automatically and any caller value for it is ignored.

wavelength: np.ndarray | None = None

Optional; NaN-filled if omitted, for the case where the wavelength solution is not yet known.

subsampling: SubsamplingPolicy | None = None
The rule that chose dims.NT. Used to validate the value and to record its provenance in NT_RULE; defaults to ~cubegenpy.subsampling.SubsamplingPolicy. NT itself is taken from dims – the policy does not override an explicit choice, it only refuses one outside its bounds.