keyframeDeltaPopulation function

KeyframeDeltaPopulation keyframeDeltaPopulation(
  1. KeyframeDeltaSequence sequence,
  2. KeyframeDeltaChunk chunk
)

The population chunk composes to, as gaussian state on the file's grids.

The same arithmetic §5.6 and §6 give a gaussian-birth chunk, applied to the composed bins — which is the whole claim the model rests on: a bin reached by telescoping deltas dequantizes exactly as an absolute statement of the same instant would.

Implementation

KeyframeDeltaPopulation keyframeDeltaPopulation(
  KeyframeDeltaSequence sequence,
  KeyframeDeltaChunk chunk,
) {
  if (sequence.header.shDegree != 0) {
    throw FourdgsUnsupportedFeature(
      'keyframeDeltaPopulation cannot expose complete gaussian state for '
      'sh_degree ${sequence.header.shDegree}: this API does not yet retain '
      'aligned SH Band Stream records while composing a keyframe-delta chain; '
      'refusing to return a population with its spherical harmonics missing',
    );
  }
  return _population(chunk.state, _gridsFor(sequence));
}