autolfads-tf2
autolfads-tf2 copied to clipboard
`merge_chops` is unable to merge when the requested overlap is more than half of the window length
Without really thinking a whole lot about it, I chopped data to window length 100 and overlap 80, since this would leave at most 20 points of unmodeled data at the end of the trials I'm trying to model. The chopping seems to work totally fine, but when merging the chops together, it seems that the code assumes that the overlap will be at most half the size of the window, and the math to put the chops back together breaks down in weird ways, leading to duplicated data in the final array.
On further thought, it makes sense to some degree to limit the overlap to be at most half of the window length, since otherwise, data from more than two chops would have to be integrated together to merge everything--if this is the thought process, I think it would be a good idea to put an assertion in both functions that this is the case (or maybe at least an assertion in the merge_chops
function and a warning in the chop_data
function, since chopping technically works fine).
If instead it would make sense to be able to merge chops with overlap greater than half the window size, then I think the merge_chops
function needs to be reworked to be able to integrate across more than two chops