patch_local_adjusted_envelopes
patch_local_adjusted_envelopes(
df: DataFrame ,
residuals ,
drop_empty: bool = True,
)-> ‘pd.DataFrame’
Replay coordinate residuals onto relation envelopes in call order.
Absolute residuals trim membership and envelopes. A patch-local sample or relative selection preserves row membership, but the planner must consume its trimmed envelopes or it publishes outputs that lie entirely outside the selected samples (phantom empties). Negative indices resolve per patch against the envelope-derived sample count (rows whose count is unknown keep their envelope as a candidacy superset — exactness is always re-applied at load). drop_empty removes rows whose window selects nothing (planning truth); equality comparison keeps them, since a presented-but-empty row is still a presented row.