downsample_1d¶
-
image_tools.downsample.downsample_1d(myarr, factor, estimator=<function nanmean>)[source] [edit on github]¶ Downsample a 1D array by averaging over factor pixels. Crops right side if the shape is not a multiple of factor.
This code is pure numpy and should be fast.
- keywords:
- estimator - default to mean. You can downsample by summing or
- something else if you want a different estimator (e.g., downsampling error: you want to sum & divide by sqrt(n))