Added poldif code from RexFuzzle (https://github.com/RexFuzzle/Python-Library/blob/master/Spectral_Methods.py)