@@ -1261,31 +1261,6 class SpectraHeisScope(Figure): | |||||
1261 |
|
1261 | |||
1262 | counter += 1 |
|
1262 | counter += 1 | |
1263 |
|
1263 | |||
1264 | # __isConfig = None |
|
|||
1265 | # def __init__(self): |
|
|||
1266 | # |
|
|||
1267 | # self.__isConfig = False |
|
|||
1268 | # self.WIDTH = 600 |
|
|||
1269 | # self.HEIGHT = 200 |
|
|||
1270 | # |
|
|||
1271 | # def getSubplots(self): |
|
|||
1272 | # |
|
|||
1273 | # nrow = self.nplots |
|
|||
1274 | # ncol = 3 |
|
|||
1275 | # return nrow, ncol |
|
|||
1276 | # |
|
|||
1277 | # def setup(self, id, nplots, wintitle): |
|
|||
1278 | # |
|
|||
1279 | # self.nplots = nplots |
|
|||
1280 | # |
|
|||
1281 | # self.createFigure(id, wintitle) |
|
|||
1282 | # |
|
|||
1283 | # nrow,ncol = self.getSubplots() |
|
|||
1284 | # colspan = 3 |
|
|||
1285 | # rowspan = 1 |
|
|||
1286 | # |
|
|||
1287 | # for i in range(nplots): |
|
|||
1288 | # self.addAxes(nrow, ncol, i, 0, colspan, rowspan) |
|
|||
1289 |
|
1264 | |||
1290 | def run(self, dataOut, id, wintitle="", channelList=None, |
|
1265 | def run(self, dataOut, id, wintitle="", channelList=None, | |
1291 | xmin=None, xmax=None, ymin=None, ymax=None, save=False, |
|
1266 | xmin=None, xmax=None, ymin=None, ymax=None, save=False, | |
@@ -1323,7 +1298,8 class SpectraHeisScope(Figure): | |||||
1323 | deltaHeight = dataOut.heightList[1] - dataOut.heightList[0] |
|
1298 | deltaHeight = dataOut.heightList[1] - dataOut.heightList[0] | |
1324 | #deberia cambiar para el caso de 1Mhz y 100KHz |
|
1299 | #deberia cambiar para el caso de 1Mhz y 100KHz | |
1325 | x = numpy.arange(-1*dataOut.nHeights/2.,dataOut.nHeights/2.)*(c/(2*deltaHeight*dataOut.nHeights*1000)) |
|
1300 | x = numpy.arange(-1*dataOut.nHeights/2.,dataOut.nHeights/2.)*(c/(2*deltaHeight*dataOut.nHeights*1000)) | |
1326 | x= x/(10000.0) |
|
1301 | #para 1Mhz descomentar la siguiente linea | |
|
1302 | #x= x/(10000.0) | |||
1327 | # y = dataOut.data[channelIndexList,:] * numpy.conjugate(dataOut.data[channelIndexList,:]) |
|
1303 | # y = dataOut.data[channelIndexList,:] * numpy.conjugate(dataOut.data[channelIndexList,:]) | |
1328 | # y = y.real |
|
1304 | # y = y.real | |
1329 | datadB = 10.*numpy.log10(dataOut.data_spc) |
|
1305 | datadB = 10.*numpy.log10(dataOut.data_spc) | |
@@ -1332,7 +1308,9 class SpectraHeisScope(Figure): | |||||
1332 | #thisDatetime = dataOut.datatime |
|
1308 | #thisDatetime = dataOut.datatime | |
1333 | thisDatetime = datetime.datetime.utcfromtimestamp(dataOut.getTimeRange()[1]) |
|
1309 | thisDatetime = datetime.datetime.utcfromtimestamp(dataOut.getTimeRange()[1]) | |
1334 | title = wintitle + " Scope: %s" %(thisDatetime.strftime("%d-%b-%Y %H:%M:%S")) |
|
1310 | title = wintitle + " Scope: %s" %(thisDatetime.strftime("%d-%b-%Y %H:%M:%S")) | |
1335 |
xlabel = " |
|
1311 | xlabel = "" | |
|
1312 | #para 1Mhz descomentar la siguiente linea | |||
|
1313 | #xlabel = "Frequency x 10000" | |||
1336 | ylabel = "Intensity (dB)" |
|
1314 | ylabel = "Intensity (dB)" | |
1337 |
|
1315 | |||
1338 | if not self.__isConfig: |
|
1316 | if not self.__isConfig: | |
@@ -1354,7 +1332,8 class SpectraHeisScope(Figure): | |||||
1354 |
|
1332 | |||
1355 | for i in range(len(self.axesList)): |
|
1333 | for i in range(len(self.axesList)): | |
1356 | ychannel = y[i,:] |
|
1334 | ychannel = y[i,:] | |
1357 | title = "Channel %d - peak:%.2f" %(i,numpy.max(ychannel)) |
|
1335 | str_datetime = '%s %s'%(thisDatetime.strftime("%Y/%m/%d"),thisDatetime.strftime("%H:%M:%S")) | |
|
1336 | title = "Channel %d: %4.2fdB: %s" %(i, numpy.max(ychannel), str_datetime) | |||
1358 | axes = self.axesList[i] |
|
1337 | axes = self.axesList[i] | |
1359 | axes.pline(x, ychannel, |
|
1338 | axes.pline(x, ychannel, | |
1360 | xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax, |
|
1339 | xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax, |
General Comments 0
You need to be logged in to leave comments.
Login now