WasatchPhotonics / Wasatch.PY

Python driver for Wasatch Photonics spectrometers with demo app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update utils.apply_boxcar

mzieg opened this issue · comments

Currently, a boxcar with a half-width of 5 doesn't change the first or last 5 pixels at all, because there isn't "enough room" to generate a full 11-pixel moving average. We'd like to change our boxcar implementation for the "wings" of the spectrum such that we boxcar as many pixels as possible, using the largest-possible symmetric window. In this case, the first and last [0 and -1] pixels would still be unmodified, but [1] and [-2] would each get a "boxcar 1", [2] and [-3] would get "boxcar 2", etc.