1 | # random choice of run. Temp_Sample has 82 entries according to the dialog box ws=mtd["hifi00029177"] |
---|
2 | ws=mtd["hifi00025091"] |
---|
3 | r= ws.getRun() |
---|
4 | |
---|
5 | time_array = r.getLogData("Temp_Sample").times |
---|
6 | |
---|
7 | value_array = r.getLogData("Temp_Sample").value |
---|
8 | |
---|
9 | # print time_array |
---|
10 | # print value_array |
---|
11 | print "log point 0 ", time_array[0] |
---|
12 | print "log point 2 ", time_array[2] |
---|
13 | print "log point 3 ", time_array[3] |
---|
14 | print "log point 50 ", time_array[50] |
---|
15 | print "start time ", r.getProperty("run_start").value |
---|
16 | |
---|
17 | #print dir(time_array[1]) |
---|
18 | #print time_array[1].year() |
---|
19 | |
---|
20 | if (time_array[1] > r.getProperty("run_start").value) : |
---|
21 | print "point 1 is in the run" |
---|
22 | else: |
---|
23 | print "point 1 before run starts" |
---|
24 | |
---|
25 | if (time_array[50] > r.getProperty("run_start").value) : |
---|
26 | print "point 50 is in the run" |
---|
27 | else: |
---|
28 | print "point 50 before run starts" |
---|
29 | |
---|
30 | if (time_array[50] > time_array[1]) : |
---|
31 | print "time going forwards" |
---|
32 | else: |
---|
33 | print "times going backwards!" |
---|
34 | |
---|
35 | if (time_array[1] > time_array[50]) : |
---|
36 | print "time going backwards" |
---|
37 | else: |
---|
38 | print "times going forwards!" |
---|
39 | |
---|
40 | |
---|