pygwb.spectral.coarse_grain_exact
- pygwb.spectral.coarse_grain_exact(data, coarsening_factor)[source]
Coarse grain an array using any coarsening factor.
Each bin will contain the integral of the input array covering
coarsening_factor
bins.This is done by evaluating the difference between the cumulative integral of the data at the beginning and end of each bin.
The i’th bin covers
[coarsening_factor * (ii - 0.5), coarsening_factor * (ii + 0.5)]
indexed for1 <= ii < len(data) / coarsening_factor
.- Parameters:
data (
array-like
) – The data to coarse grain.coarsening_factor (
float
) – The factor by which to coarsen the data.
- Returns:
- output:
array-like
The coarse-grained data.
- output: