Source code :: loadNiTurbo

[Return]
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/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)):

Navigation