edges.averaging.utils

Utility functions and classes for averaging operations.

class edges.averaging.utils.NsamplesStrategy(value)[source]

An enumeration of strategies for computing Nsamples when combining data.

Note that generally the strategy can influence two components of the calculation: firstly it influences how the data is _weighted_ when it is being averaged, and secondly, it influences what the final number of samples are (i.e. the effective variance of the data). Generally, these align, but some options specifically choose different conventions for each of these choices.

edges.averaging.utils.get_weights_from_strategy(data: GSData, strategy: NsamplesStrategy) tuple[ndarray, ndarray][source]

Compute weights and nsamples used for a particular strategy.