##// END OF EJS Templates
jrodata se cambio los atrituos de pulsepair,jroplot_voltage se cambio el ploteo de la potencial y la senal, jroIO_simulator se anadio la modificacion de bloquesporarchivo y perfilesporbloque,jro_proc_voltage se corrigio el calculo de noise con remocion DC y se asignaron nuevos nombres al dataOut, jroproc_parameters se anadio los nuevos atributos del dataOut jroproc_voltage pulsepair,test_sim0009.py es el nuevo test de escritura
avaldez -
r1311:816ce18b0db1 v3-devel-julio
parent child
Show More

The requested changes are too big and content was truncated. Show full diff

@@ -359,10 +359,12 class JROData(GenericData):
359 359 class Voltage(JROData):
360 360
361 361 # data es un numpy array de 2 dmensiones (canales, alturas)
362 data = None
363 data_intensity = None
364 data_velocity = None
365 data_specwidth = None
362 data = None
363 dataPP_POW = None
364 dataPP_DOP = None
365 dataPP_WIDTH = None
366 dataPP_SNR = None
367
366 368 def __init__(self):
367 369 '''
368 370 Constructor
@@ -421,6 +423,35 class Voltage(JROData):
421 423
422 424 return noise
423 425
426 def getNoisebyHildebrandDC(self, channel=None,DC=0):
427 """
428 Determino el nivel de ruido usando el metodo Hildebrand-Sekhon
429
430 Return:
431 noiselevel
432 """
433
434 if channel != None:
435 data = self.data[channel]-DC
436 nChannels = 1
437 else:
438 data = self.data
439 nChannels = self.nChannels
440
441 noise = numpy.zeros(nChannels)
442 power = data * numpy.conjugate(data)
443
444 for thisChannel in range(nChannels):
445 if nChannels == 1:
446 daux = power[:].real
447 else:
448 daux = power[thisChannel, :].real
449 noise[thisChannel] = hildebrand_sekhon(daux, self.nCohInt)
450
451 return noise
452
453
454
424 455 def getNoise(self, type=1, channel=None):
425 456
426 457 if type == 1:
@@ -1262,15 +1293,19 class PlotterData(object):
1262 1293 self.flagDataAsBlock = dataOut.flagDataAsBlock
1263 1294 self.nProfiles = dataOut.nProfiles
1264 1295 if plot == 'pp_power':
1265 buffer = dataOut.data_intensity
1296 buffer = dataOut.dataPP_POWER
1297 self.flagDataAsBlock = dataOut.flagDataAsBlock
1298 self.nProfiles = dataOut.nProfiles
1299 if plot == 'pp_signal':
1300 buffer = dataOut.dataPP_POW
1266 1301 self.flagDataAsBlock = dataOut.flagDataAsBlock
1267 1302 self.nProfiles = dataOut.nProfiles
1268 1303 if plot == 'pp_velocity':
1269 buffer = dataOut.data_velocity
1304 buffer = dataOut.dataPP_DOP
1270 1305 self.flagDataAsBlock = dataOut.flagDataAsBlock
1271 1306 self.nProfiles = dataOut.nProfiles
1272 1307 if plot == 'pp_specwidth':
1273 buffer = dataOut.data_specwidth
1308 buffer = dataOut.dataPP_WIDTH
1274 1309 self.flagDataAsBlock = dataOut.flagDataAsBlock
1275 1310 self.nProfiles = dataOut.nProfiles
1276 1311
@@ -156,6 +156,8 class ScopePlot(Plot):
156 156 thisDatetime = datetime.datetime.utcfromtimestamp(self.data.times[-1])
157 157 if self.CODE == "pp_power":
158 158 scope = self.data['pp_power']
159 elif self.CODE == "pp_signal":
160 scope = self.data["pp_signal"]
159 161 elif self.CODE == "pp_velocity":
160 162 scope = self.data["pp_velocity"]
161 163 elif self.CODE == "pp_specwidth":
@@ -191,6 +193,13 class ScopePlot(Plot):
191 193 thisDatetime,
192 194 wintitle
193 195 )
196 if self.CODE=="pp_signal":
197 self.plot_weatherpower(self.data.heights,
198 scope[:,i,:],
199 channels,
200 thisDatetime,
201 wintitle
202 )
194 203 if self.CODE=="pp_velocity":
195 204 self.plot_weathervelocity(scope[:,i,:],
196 205 self.data.heights,
@@ -230,6 +239,13 class ScopePlot(Plot):
230 239 thisDatetime,
231 240 wintitle
232 241 )
242 if self.CODE=="pp_signal":
243 self.plot_weatherpower(self.data.heights,
244 scope,
245 channels,
246 thisDatetime,
247 wintitle
248 )
233 249 if self.CODE=="pp_velocity":
234 250 self.plot_weathervelocity(scope,
235 251 self.data.heights,
@@ -249,7 +265,7 class ScopePlot(Plot):
249 265
250 266 class PulsepairPowerPlot(ScopePlot):
251 267 '''
252 Plot for
268 Plot for P= S+N
253 269 '''
254 270
255 271 CODE = 'pp_power'
@@ -259,7 +275,7 class PulsepairPowerPlot(ScopePlot):
259 275
260 276 class PulsepairVelocityPlot(ScopePlot):
261 277 '''
262 Plot for
278 Plot for VELOCITY
263 279 '''
264 280 CODE = 'pp_velocity'
265 281 plot_name = 'PulsepairVelocity'
@@ -268,9 +284,19 class PulsepairVelocityPlot(ScopePlot):
268 284
269 285 class PulsepairSpecwidthPlot(ScopePlot):
270 286 '''
271 Plot for
287 Plot for WIDTH
272 288 '''
273 289 CODE = 'pp_specwidth'
274 290 plot_name = 'PulsepairSpecwidth'
275 291 plot_type = 'scatter'
276 292 buffering = False
293
294 class PulsepairSignalPlot(ScopePlot):
295 '''
296 Plot for S
297 '''
298
299 CODE = 'pp_signal'
300 plot_name = 'PulsepairSignal'
301 plot_type = 'scatter'
302 buffering = False
@@ -360,21 +360,27 class SimulatorReader(JRODataReader, ProcessingUnit):
360 360 fd = Fdoppler #+(600.0/120)*self.nReadBlocks
361 361 d_signal = Adoppler*numpy.array(numpy.exp(1.0j*2.0*math.pi*fd*time_vec),dtype=numpy.complex64)
362 362 #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·SeΓ±al con ancho espectralΒ·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·
363 #specw_sig = numpy.linspace(-149,150,300)
364 #w = 8
365 #A = 20
366 #specw_sig = specw_sig/w
367 #specw_sig = numpy.sinc(specw_sig)
368 #specw_sig = A*numpy.array(specw_sig,dtype=numpy.complex64)
363 if prof_gen%2==0:
364 min = int(prof_gen/2.0-1.0)
365 max = int(prof_gen/2.0)
366 else:
367 min = int(prof_gen/2.0)
368 max = int(prof_gen/2.0)
369 specw_sig = numpy.linspace(-min,max,prof_gen)
370 w = 4
371 A = 20
372 specw_sig = specw_sig/w
373 specw_sig = numpy.sinc(specw_sig)
374 specw_sig = A*numpy.array(specw_sig,dtype=numpy.complex64)
369 375 #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· DATABLOCK + DOPPLERΒ·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·
370 376 HD=int(Hdoppler/self.AcqDH_0)
371 377 for i in range(12):
372 378 self.datablock[0,:,HD+i]=self.datablock[0,:,HD+i]+ d_signal# RESULT
373 379 #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· DATABLOCK + DOPPLER*Sinc(x)Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·
374 #HD=int(Hdoppler/self.AcqDH_0)
375 #HD=int(HD/2)
376 #for i in range(12):
377 # self.datablock[0,:,HD+i]=self.datablock[0,:,HD+i]+ specw_sig*d_signal# RESULT
380 HD=int(Hdoppler/self.AcqDH_0)
381 HD=int(HD/2)
382 for i in range(12):
383 self.datablock[0,:,HD+i]=self.datablock[0,:,HD+i]+ specw_sig*d_signal# RESULT
378 384
379 385 def readBlock(self):
380 386
@@ -421,7 +427,8 class SimulatorReader(JRODataReader, ProcessingUnit):
421 427 FixPP_CohInt= 1,Tau_0= 250,AcqH0_0 = 70 ,AcqDH_0=1.25, Bauds= 32,
422 428 FixRCP_TXA = 40, FixRCP_TXB = 50, fAngle = 2.0*math.pi*(1/16),DC_level= 50,
423 429 stdev= 8,Num_Codes = 1 , Dyn_snCode = None, samples=200,
424 channels=2,Fdoppler=20,Hdoppler=36,Adoppler=500,nTotalReadFiles=10000,
430 channels=2,Fdoppler=20,Hdoppler=36,Adoppler=500,
431 profilesPerBlock=300,dataBlocksPerFile=120,nTotalReadFiles=10000,
425 432 **kwargs):
426 433
427 434 self.set_kwargs(**kwargs)
@@ -447,14 +454,14 class SimulatorReader(JRODataReader, ProcessingUnit):
447 454 codeType=0, nCode=Num_Codes, nBaud=32, code=Dyn_snCode,
448 455 flip1=0, flip2=0,Taus=Tau_0)
449 456
450 self.set_PH(dtype=0, blockSize=0, profilesPerBlock=300,
451 dataBlocksPerFile=120, nWindows=1, processFlags=numpy.array([1024]), nCohInt=1,
457 self.set_PH(dtype=0, blockSize=0, profilesPerBlock=profilesPerBlock,
458 dataBlocksPerFile=dataBlocksPerFile, nWindows=1, processFlags=numpy.array([1024]), nCohInt=1,
452 459 nIncohInt=1, totalSpectra=0, nHeights=samples, firstHeight=AcqH0_0,
453 460 deltaHeight=AcqDH_0, samplesWin=samples, spectraComb=0, nCode=0,
454 461 code=0, nBaud=None, shif_fft=False, flag_dc=False,
455 462 flag_cspc=False, flag_decode=False, flag_deflip=False)
456 463
457 self.set_SH(nSamples=samples, nProfiles=300, nChannels=channels)
464 self.set_SH(nSamples=samples, nProfiles=profilesPerBlock, nChannels=channels)
458 465
459 466 self.readFirstHeader()
460 467
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
@@ -2,7 +2,8 import sys
2 2 import numpy,math
3 3 from scipy import interpolate
4 4 from schainpy.model.proc.jroproc_base import ProcessingUnit, Operation, MPDecorator
5 from schainpy.model.data.jrodata import Voltage
5 from schainpy.model.data.jrodata import Voltage,hildebrand_sekhon
6 from schainpy.model.data import _noise
6 7 from schainpy.utils import log
7 8 from time import time
8 9
@@ -1338,9 +1339,6 class PulsePairVoltage(Operation):
1338 1339 n,
1339 1340 dataOut.nHeights),
1340 1341 dtype='complex')
1341 #self.noise = numpy.zeros([self.__nch,self.__nHeis])
1342 #for i in range(self.__nch):
1343 # self.noise[i]=dataOut.getNoise(channel=i)
1344 1342
1345 1343 def putData(self,data):
1346 1344 '''
@@ -1355,95 +1353,118 class PulsePairVoltage(Operation):
1355 1353 Return the PULSEPAIR and the profiles used in the operation
1356 1354 Affected : self.__profileIndex
1357 1355 '''
1356 #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· Remove DCΒ·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·
1358 1357 if self.removeDC==True:
1359 1358 mean = numpy.mean(self.__buffer,1)
1360 1359 tmp = mean.reshape(self.__nch,1,self.__nHeis)
1361 1360 dc= numpy.tile(tmp,[1,self.__nProf,1])
1362 1361 self.__buffer = self.__buffer - dc
1362 #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Calculo de Potencia Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·
1363 pair0 = self.__buffer*numpy.conj(self.__buffer)
1364 pair0 = pair0.real
1365 lag_0 = numpy.sum(pair0,1)
1366 #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Calculo de Ruido x canalΒ·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·
1367 self.noise = numpy.zeros(self.__nch)
1368 for i in range(self.__nch):
1369 daux = numpy.sort(pair0[i,:,:],axis= None)
1370 self.noise[i]=hildebrand_sekhon( daux ,self.nCohInt)
1371
1372 self.noise = self.noise.reshape(self.__nch,1)
1373 self.noise = numpy.tile(self.noise,[1,self.__nHeis])
1374 noise_buffer = self.noise.reshape(self.__nch,1,self.__nHeis)
1375 noise_buffer = numpy.tile(noise_buffer,[1,self.__nProf,1])
1376 #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· Potencia recibida= P , Potencia senal = S , Ruido= NΒ·Β·
1377 #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· P= S+N ,P=lag_0/N Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·
1378 #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· Power Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·
1379 data_power = lag_0/(self.n*self.nCohInt)
1380 #------------------ Senal Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·
1381 data_intensity = pair0 - noise_buffer
1382 data_intensity = numpy.sum(data_intensity,axis=1)*(self.n*self.nCohInt)#*self.nCohInt)
1383 #data_intensity = (lag_0-self.noise*self.n)*(self.n*self.nCohInt)
1384 for i in range(self.__nch):
1385 for j in range(self.__nHeis):
1386 if data_intensity[i][j] < 0:
1387 data_intensity[i][j] = numpy.min(numpy.absolute(data_intensity[i][j]))
1363 1388
1364 lag_0 = numpy.sum(self.__buffer*numpy.conj(self.__buffer),1)
1365 data_intensity = lag_0/(self.n*self.nCohInt)#*self.nCohInt)
1366
1389 #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· Calculo de Frecuencia y Velocidad dopplerΒ·Β·Β·Β·Β·Β·Β·Β·
1367 1390 pair1 = self.__buffer[:,:-1,:]*numpy.conjugate(self.__buffer[:,1:,:])
1368 1391 lag_1 = numpy.sum(pair1,1)
1369 #angle = numpy.angle(numpy.sum(pair1,1))*180/(math.pi)
1370 data_velocity = (-1.0*self.lambda_/(4*math.pi*self.ippSec))*numpy.angle(lag_1)#self.ippSec*self.nCohInt
1392 data_freq = (-1/(2.0*math.pi*self.ippSec*self.nCohInt))*numpy.angle(lag_1)
1393 data_velocity = (self.lambda_/2.0)*data_freq
1371 1394
1372 self.noise = numpy.zeros([self.__nch,self.__nHeis])
1373 for i in range(self.__nch):
1374 self.noise[i]=dataOut.getNoise(channel=i)
1395 #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· Potencia promedio estimada de la SenalΒ·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·
1396 lag_0 = lag_0/self.n
1397 S = lag_0-self.noise
1375 1398
1376 lag_0 = lag_0.real/(self.n)
1399 #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· Frecuencia Doppler promedio Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·
1377 1400 lag_1 = lag_1/(self.n-1)
1378 1401 R1 = numpy.abs(lag_1)
1379 S = (lag_0-self.noise)
1380 1402
1403 #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· Calculo del SNRΒ·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·
1381 1404 data_snrPP = S/self.noise
1382 data_snrPP = numpy.where(data_snrPP<0,1,data_snrPP)
1405 for i in range(self.__nch):
1406 for j in range(self.__nHeis):
1407 if data_snrPP[i][j] < 1.e-20:
1408 data_snrPP[i][j] = 1.e-20
1383 1409
1410 #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· Calculo del ancho espectral Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·
1384 1411 L = S/R1
1385 1412 L = numpy.where(L<0,1,L)
1386 1413 L = numpy.log(L)
1387
1388 1414 tmp = numpy.sqrt(numpy.absolute(L))
1389
1390 data_specwidth = (self.lambda_/(2*math.sqrt(2)*math.pi*self.ippSec))*tmp*numpy.sign(L)
1391 #data_specwidth = (self.lambda_/(2*math.sqrt(2)*math.pi*self.ippSec))*k
1415 data_specwidth = (self.lambda_/(2*math.sqrt(2)*math.pi*self.ippSec*self.nCohInt))*tmp*numpy.sign(L)
1392 1416 n = self.__profIndex
1393 1417
1394 1418 self.__buffer = numpy.zeros((self.__nch, self.__nProf,self.__nHeis), dtype='complex')
1395 1419 self.__profIndex = 0
1396 return data_intensity,data_velocity,data_snrPP,data_specwidth,n
1420 return data_power,data_intensity,data_velocity,data_snrPP,data_specwidth,n
1397 1421
1398 1422 def pulsePairbyProfiles(self,dataOut):
1399 1423
1400 1424 self.__dataReady = False
1425 data_power = None
1401 1426 data_intensity = None
1402 1427 data_velocity = None
1403 1428 data_specwidth = None
1404 1429 data_snrPP = None
1405 1430 self.putData(data=dataOut.data)
1406 1431 if self.__profIndex == self.n:
1407 #self.noise = numpy.zeros([self.__nch,self.__nHeis])
1408 #for i in range(self.__nch):
1409 # self.noise[i]=data.getNoise(channel=i)
1410 #print(self.noise.shape)
1411 data_intensity, data_velocity,data_snrPP,data_specwidth, n = self.pushData(dataOut=dataOut)
1432 data_power,data_intensity, data_velocity,data_snrPP,data_specwidth, n = self.pushData(dataOut=dataOut)
1412 1433 self.__dataReady = True
1413 1434
1414 return data_intensity, data_velocity,data_snrPP,data_specwidth
1435 return data_power, data_intensity, data_velocity, data_snrPP, data_specwidth
1415 1436
1416 1437 def pulsePairOp(self, dataOut, datatime= None):
1417 1438
1418 1439 if self.__initime == None:
1419 1440 self.__initime = datatime
1420 #print("hola")
1421 data_intensity, data_velocity,data_snrPP,data_specwidth = self.pulsePairbyProfiles(dataOut)
1441 data_power, data_intensity, data_velocity, data_snrPP, data_specwidth = self.pulsePairbyProfiles(dataOut)
1422 1442 self.__lastdatatime = datatime
1423 1443
1424 if data_intensity is None:
1425 return None, None,None,None,None
1444 if data_power is None:
1445 return None, None, None,None,None,None
1426 1446
1427 1447 avgdatatime = self.__initime
1428 1448 deltatime = datatime - self.__lastdatatime
1429 1449 self.__initime = datatime
1430 1450
1431 return data_intensity, data_velocity,data_snrPP,data_specwidth,avgdatatime
1451 return data_power, data_intensity, data_velocity, data_snrPP, data_specwidth, avgdatatime
1432 1452
1433 1453 def run(self, dataOut,n = None,removeDC= False, overlapping= False,**kwargs):
1434 1454
1435 1455 if not self.isConfig:
1436 1456 self.setup(dataOut = dataOut, n = n , removeDC=removeDC , **kwargs)
1437 1457 self.isConfig = True
1438 data_intensity, data_velocity,data_snrPP,data_specwidth, avgdatatime = self.pulsePairOp(dataOut, dataOut.utctime)
1458 data_power, data_intensity, data_velocity,data_snrPP,data_specwidth, avgdatatime = self.pulsePairOp(dataOut, dataOut.utctime)
1439 1459 dataOut.flagNoData = True
1440 1460
1441 1461 if self.__dataReady:
1442 1462 dataOut.nCohInt *= self.n
1443 dataOut.data_intensity = data_intensity #valor para intensidad
1444 dataOut.data_velocity = data_velocity #valor para velocidad
1445 dataOut.data_snrPP = data_snrPP # valor para snr
1446 dataOut.data_specwidth = data_specwidth
1463 dataOut.dataPP_POW = data_intensity # S
1464 dataOut.dataPP_POWER = data_power # P
1465 dataOut.dataPP_DOP = data_velocity
1466 dataOut.dataPP_SNR = data_snrPP
1467 dataOut.dataPP_WIDTH = data_specwidth
1447 1468 dataOut.PRFbyAngle = self.n #numero de PRF*cada angulo rotado que equivale a un tiempo.
1448 1469 dataOut.utctime = avgdatatime
1449 1470 dataOut.flagNoData = False
@@ -2,8 +2,11 import os,sys
2 2 import datetime
3 3 import time
4 4 from schainpy.controller import Project
5 path = '/home/alex/Downloads/NEW_WR2/spc16removeDC'
6 figpath = path
5 #path = '/home/alex/Downloads/NEW_WR2/spc16removeDC'
6 #figpath = path
7
8 path = '/home/alex/Downloads/test_rawdata'
9 figpath = '/home/alex/Downloads/hdf5_testPP'
7 10 desc = "Simulator Test"
8 11
9 12 controllerObj = Project()
@@ -25,25 +28,49 readUnitConfObj = controllerObj.addReadUnit(datatype='SimulatorReader',
25 28 delay=0,
26 29 online=0,
27 30 walk=0,
28 nTotalReadFiles=3)
29
30 opObj11 = readUnitConfObj.addOperation(name='printInfo')
31 profilesPerBlock=625,
32 dataBlocksPerFile=100)#,#nTotalReadFiles=2)
31 33
34 '''
35 readUnitConfObj = controllerObj.addReadUnit(datatype='VoltageReader',
36 path=path,
37 startDate="2020/01/01", #"2020/01/01",#today,
38 endDate= "2020/12/01", #"2020/12/30",#today,
39 startTime='00:00:00',
40 endTime='23:59:59',
41 delay=0,
42 #set=0,
43 online=0,
44 walk=1)
45 '''
46 #opObj11 = readUnitConfObj.addOperation(name='printInfo')
32 47 procUnitConfObjA = controllerObj.addProcUnit(datatype='VoltageProc', inputId=readUnitConfObj.getId())
33 48 #opObj11 = procUnitConfObjA.addOperation(name='CohInt', optype='other')
34 #opObj11.addParameter(name='n', value='10', format='int')
49 #opObj11.addParameter(name='n', value='4', format='int')
35 50
36 51 #opObj10 = procUnitConfObjA.addOperation(name='selectChannels')
37 52 #opObj10.addParameter(name='channelList', value=[0])
38 53 opObj11 = procUnitConfObjA.addOperation(name='PulsePairVoltage', optype='other')
39 opObj11.addParameter(name='n', value='300', format='int')#10
54 opObj11.addParameter(name='n', value='625', format='int')#10
40 55 opObj11.addParameter(name='removeDC', value=1, format='int')
41 56
42 57 #opObj11 = procUnitConfObjA.addOperation(name='PulsepairPowerPlot', optype='other')
58 #opObj11 = procUnitConfObjA.addOperation(name='PulsepairSignalPlot', optype='other')
43 59
44 opObj11 = procUnitConfObjA.addOperation(name='PulsepairVelocityPlot', optype='other')
60
61 #opObj11 = procUnitConfObjA.addOperation(name='PulsepairVelocityPlot', optype='other')
45 62 #opObj11.addParameter(name='xmax', value=8)
46 63
47 opObj11 = procUnitConfObjA.addOperation(name='PulsepairSpecwidthPlot', optype='other')
64 #opObj11 = procUnitConfObjA.addOperation(name='PulsepairSpecwidthPlot', optype='other')
65
66 procUnitConfObjB= controllerObj.addProcUnit(datatype='ParametersProc',inputId=procUnitConfObjA.getId())
67
68
69 opObj10 = procUnitConfObjB.addOperation(name='ParameterWriter')
70 opObj10.addParameter(name='path',value=figpath)
71 #opObj10.addParameter(name='mode',value=0)
72 opObj10.addParameter(name='blocksPerFile',value='100',format='int')
73 opObj10.addParameter(name='metadataList',value='utctimeInit,timeInterval',format='list')
74 opObj10.addParameter(name='dataList',value='dataPP_POW,dataPP_DOP,dataPP_SNR,dataPP_WIDTH')#,format='list'
48 75
49 76 controllerObj.start()
General Comments 0
You need to be logged in to leave comments. Login now