@@ -7,13 +7,14 $Id$ | |||||
7 | import os |
|
7 | import os | |
8 | import sys |
|
8 | import sys | |
9 | import numpy |
|
9 | import numpy | |
|
10 | import datetime | |||
10 |
|
11 | |||
11 | path = os.path.split(os.getcwd())[0] |
|
12 | path = os.path.split(os.getcwd())[0] | |
12 | sys.path.append(path) |
|
13 | sys.path.append(path) | |
13 |
|
14 | |||
14 | from Data.Voltage import Voltage |
|
15 | from Data.Voltage import Voltage | |
15 | from IO.VoltageIO import VoltageWriter |
|
16 | from IO.VoltageIO import VoltageWriter | |
16 | from Graphics.schainPlotTypes import ScopeFigure |
|
17 | from Graphics2.schainPlotTypes import ScopeFigure | |
17 |
|
18 | |||
18 | class VoltageProcessor: |
|
19 | class VoltageProcessor: | |
19 | dataInObj = None |
|
20 | dataInObj = None | |
@@ -80,17 +81,35 class VoltageProcessor: | |||||
80 |
|
81 | |||
81 | if len(self.plotObjList) <= self.plotObjIndex: |
|
82 | if len(self.plotObjList) <= self.plotObjIndex: | |
82 | self.addScope(idfigure, nframes, wintitle, driver) |
|
83 | self.addScope(idfigure, nframes, wintitle, driver) | |
|
84 | ||||
|
85 | ||||
|
86 | if type=="power": | |||
|
87 | data1D = self.dataOutObj.data * numpy.conjugate(self.dataOutObj.data) | |||
|
88 | data1D = data1D.real | |||
|
89 | ||||
|
90 | if type =="iq": | |||
|
91 | data1D = self.dataOutObj.data | |||
|
92 | ||||
|
93 | thisDatetime = datetime.datetime.fromtimestamp(self.dataOutObj.dataUtcTime) | |||
83 |
|
94 | |||
84 | self.plotObjList[self.plotObjIndex].plot1DArray(data1D=self.dataOutObj.data, |
|
95 | dateTime = "%s"%(thisDatetime.strftime("%d-%b-%Y %H:%M:%S")) | |
85 | x=self.dataOutObj.heightList, |
|
96 | date = "%s"%(thisDatetime.strftime("%d-%b-%Y")) | |
86 | channelList=self.dataOutObj.channelList, |
|
|||
87 | xmin=xmin, |
|
|||
88 | xmax=xmax, |
|
|||
89 | minvalue=minvalue, |
|
|||
90 | maxvlaue=maxvalue, |
|
|||
91 | save=save, |
|
|||
92 | gpath=gpath) |
|
|||
93 |
|
97 | |||
|
98 | figureTitle = "Scope Plot Radar Data: " + date | |||
|
99 | ||||
|
100 | plotObj = self.plotObjList[self.plotObjIndex] | |||
|
101 | ||||
|
102 | plotObj.plot1DArray(data1D, | |||
|
103 | self.dataOutObj.heightList, | |||
|
104 | self.dataOutObj.channelList, | |||
|
105 | xmin, | |||
|
106 | xmax, | |||
|
107 | minvalue, | |||
|
108 | maxvalue, | |||
|
109 | figureTitle, | |||
|
110 | save, | |||
|
111 | gpath) | |||
|
112 | ||||
94 | self.plotObjIndex += 1 |
|
113 | self.plotObjIndex += 1 | |
95 |
|
114 | |||
96 |
|
115 |
General Comments 0
You need to be logged in to leave comments.
Login now