Hi
Just stumbled on your toolbox looking for DeForest filter, really great job. I'm looking to use this filter on brain imaging data.
I've made it most of the way through your routines (removed arguments for now), except that the hanning filter and the image sections don't seem to be matching in size (see below). I may have a weird image stack shape, but it should otherwise work. I added +1 to the section function that slices from self.image_cube and am running it now, but I didn't think that's what you intended.
Any advice on why these are not matching?
cat@catlab:~/code/noise_gating$ python noise_gater_3d.py
Making image cube
(45, 80, 63500) #My image stack shape
Cleaning image, this may take a while!
10 35 3 #xstart, xend, xstep
10 70 3 #ystart, yend, ystep
10 63490 3 #tstart, tend, tstep
3808800 10000
Traceback (most recent call last):
File "noise_gater_3d.py", line 212, in
clean_cube = ng.clean()
File "noise_gater_3d.py", line 165, in clean
t-self.twidth//2 : t+self.twidth//2] += section
ValueError: operands could not be broadcast together with shapes (4,4,4) (5,5,5) (4,4,4)
EDIT: Ok, I see now that there's an integer divide which rounds off and can make the hanning_window different than the cube being processed. So I have to choose an even step as well as probably a larger FOV.