collapse_working_df

function of dascore.io.index.planned source

collapse_working_df(
    catalog: PatchCatalog ,
)-> ‘pd.DataFrame | None’

Return the re-planning frame for a derived catalog, or None.

Re-planning the same dimension collapses: it plans over the current view’s members — the trimmed source rows — restricted to outputs the view still presents, with the view’s value residuals applied to the envelopes. (Planning a different dimension must keep the assembled boundaries, so its caller plans over the output rows instead and never collapses.)

A lossy plan is the exception and never collapses. Collapsing is sound because the members of a chunk or a subdivision together cover their sources, so a re-plan which merges them back is entitled to load a source whole. A plan which drops samples — channel selection keeping some channels of a patch and not others — breaks exactly that, and collapsing it would quietly load back what it removed.