#!/usr/bin/env python
# -*- coding: utf-8 -*-
from matplotlib.pyplot import *
from numpy import *
from pyTDMS import *
items = [
"/'Untitled'/'ch0'",
"/'Untitled'/'ch1'",
"/'Untitled'/'ch2'",
"/'Untitled'/'ch3'",
"/'Untitled'/'ch4'",
"/'Untitled'/'ch5'",
"/'Untitled'/'ch6'",
"/'Untitled'/'ch7'",
"/'Untitled'/'Voltage_0'",
"/'Untitled'/'Voltage_1'",
"/'Untitled'/'Voltage_2'",
"/'Untitled'/'Voltage_3'",
"/'Untitled'/'Voltage_4'",
"/'Untitled'/'Voltage_5'",
"/'Untitled'/'Voltage_6'",
"/'Untitled'/'Voltage_7'"]
d = read( 'NIdata_6358.tdms' )[1]
tvec = d["/'Untitled'/'Time'"]
tvec = array(tvec)
tvec =tvec[:,1] - tvec[0,1]
i = 0
for key in items:
#if key == "/'Untitled'/'Time'":
#continue
i+=1
#print i, key
#print shape(d[key])
savez_compressed('NIturbo_%2.2i' %i,single(d[key]))
#list_data.append(single(d[key]))
#plot(tvec, d[key])
#title(key)
#show()
#print d[key][0]
#res = array(list_data)
#print shape()
#csvDump((objects,data)):