Add option for decimation factor
Remove unused sys import