Spectrum reduce

Draft of code to spectrum reduction via intgration
This is printing out the indicies where things are incorrect.