Trying to reproduce the results from the SSA-MTM toolkit in python