Spectrum reduce

Draft of code to spectrum reduction via intgration
Or something like that, since I have no idea if that code actually compiles/runs/etc...