Code for working with TIQ files in numpy