@@ -637,6 +637,8 class Spectra(JROData): | |||||
637 |
|
637 | |||
638 | def getVelRange(self, extrapoints=0): |
|
638 | def getVelRange(self, extrapoints=0): | |
639 |
|
639 | |||
|
640 | print 'VELMAX', self.getVmax() | |||
|
641 | asdasdasd | |||
640 | deltav = self.getVmax() / (self.nFFTPoints*self.ippFactor) |
|
642 | deltav = self.getVmax() / (self.nFFTPoints*self.ippFactor) | |
641 | velrange = deltav*(numpy.arange(self.nFFTPoints+extrapoints)-self.nFFTPoints/2.) #- deltav/2 |
|
643 | velrange = deltav*(numpy.arange(self.nFFTPoints+extrapoints)-self.nFFTPoints/2.) #- deltav/2 | |
642 |
|
644 |
@@ -411,7 +411,7 class RadarControllerHeader(Header): | |||||
411 | code1 = (self.code + 1.0)/2. |
|
411 | code1 = (self.code + 1.0)/2. | |
412 |
|
412 | |||
413 | for ic in range(self.nCode): |
|
413 | for ic in range(self.nCode): | |
414 | tempx = numpy.zeros(numpy.ceil(self.nBaud/32.)) |
|
414 | tempx = numpy.zeros(int(numpy.ceil(self.nBaud/32.))) | |
415 | start = 0 |
|
415 | start = 0 | |
416 | end = 32 |
|
416 | end = 32 | |
417 | for i in range(len(tempx)): |
|
417 | for i in range(len(tempx)): |
@@ -743,6 +743,11 class WindProfilerPlot(Figure): | |||||
743 | axes = self.axesList[i*self.__nsubplots] |
|
743 | axes = self.axesList[i*self.__nsubplots] | |
744 |
|
744 | |||
745 | z1 = z[i,:].reshape((1,-1))*windFactor[i] |
|
745 | z1 = z[i,:].reshape((1,-1))*windFactor[i] | |
|
746 | ||||
|
747 | print 'x', x | |||
|
748 | print datetime.datetime.utcfromtimestamp(x[0]) | |||
|
749 | print datetime.datetime.utcfromtimestamp(x[1]) | |||
|
750 | ||||
746 | #z1=numpy.ma.masked_where(z1==0.,z1) |
|
751 | #z1=numpy.ma.masked_where(z1==0.,z1) | |
747 |
|
752 | |||
748 | axes.pcolorbuffer(x, y, z1, |
|
753 | axes.pcolorbuffer(x, y, z1, |
@@ -128,6 +128,8 class SpectraPlot(Figure): | |||||
128 | factor = normFactor |
|
128 | factor = normFactor | |
129 | if xaxis == "frequency": |
|
129 | if xaxis == "frequency": | |
130 | x = dataOut.getFreqRange(1)/1000. |
|
130 | x = dataOut.getFreqRange(1)/1000. | |
|
131 | print 'FRECUENCIA MAXIMA', numpy.amax(x) | |||
|
132 | asfasfasdfaf | |||
131 | print '#######################################################' |
|
133 | print '#######################################################' | |
132 | print 'xlen', len(x) |
|
134 | print 'xlen', len(x) | |
133 | print x |
|
135 | print x |
@@ -176,7 +176,7 def set_linedata(ax, x, y, idline): | |||||
176 |
|
176 | |||
177 | def pline(iplot, x, y, xlabel='', ylabel='', title=''): |
|
177 | def pline(iplot, x, y, xlabel='', ylabel='', title=''): | |
178 |
|
178 | |||
179 |
ax = iplot. |
|
179 | ax = iplot.axes | |
180 |
|
180 | |||
181 | printLabels(ax, xlabel, ylabel, title) |
|
181 | printLabels(ax, xlabel, ylabel, title) | |
182 |
|
182 | |||
@@ -253,7 +253,7 def pcolor(imesh, z, xlabel='', ylabel='', title=''): | |||||
253 | cmap.set_bad('white',1.) |
|
253 | cmap.set_bad('white',1.) | |
254 |
|
254 | |||
255 | z = z.T |
|
255 | z = z.T | |
256 |
ax = imesh. |
|
256 | ax = imesh.axes | |
257 | printLabels(ax, xlabel, ylabel, title) |
|
257 | printLabels(ax, xlabel, ylabel, title) | |
258 | imesh.set_array(z.ravel()) |
|
258 | imesh.set_array(z.ravel()) | |
259 | ax.grid(True) |
|
259 | ax.grid(True) | |
@@ -340,7 +340,7 def createPmultiline(ax, x, y, xmin, xmax, ymin, ymax, xlabel='', ylabel='', tit | |||||
340 |
|
340 | |||
341 | def pmultiline(iplot, x, y, xlabel='', ylabel='', title=''): |
|
341 | def pmultiline(iplot, x, y, xlabel='', ylabel='', title=''): | |
342 |
|
342 | |||
343 |
ax = iplot. |
|
343 | ax = iplot.axes | |
344 |
|
344 | |||
345 | printLabels(ax, xlabel, ylabel, title) |
|
345 | printLabels(ax, xlabel, ylabel, title) | |
346 |
|
346 | |||
@@ -417,7 +417,7 def createPmultilineYAxis(ax, x, y, xmin, xmax, ymin, ymax, xlabel='', ylabel='' | |||||
417 |
|
417 | |||
418 | def pmultilineyaxis(iplot, x, y, xlabel='', ylabel='', title=''): |
|
418 | def pmultilineyaxis(iplot, x, y, xlabel='', ylabel='', title=''): | |
419 |
|
419 | |||
420 |
ax = iplot. |
|
420 | ax = iplot.axes | |
421 | printLabels(ax, xlabel, ylabel, title) |
|
421 | printLabels(ax, xlabel, ylabel, title) | |
422 |
|
422 | |||
423 | for i in range(len(ax.lines)): |
|
423 | for i in range(len(ax.lines)): | |
@@ -462,7 +462,7 def createPolar(ax, x, y, | |||||
462 |
|
462 | |||
463 | def polar(iplot, x, y, xlabel='', ylabel='', title=''): |
|
463 | def polar(iplot, x, y, xlabel='', ylabel='', title=''): | |
464 |
|
464 | |||
465 |
ax = iplot. |
|
465 | ax = iplot.axes | |
466 |
|
466 | |||
467 | # ax.text(0, -110, ylabel, rotation='vertical', va ='center', ha = 'center',size='11') |
|
467 | # ax.text(0, -110, ylabel, rotation='vertical', va ='center', ha = 'center',size='11') | |
468 | printLabels(ax, xlabel, ylabel, title) |
|
468 | printLabels(ax, xlabel, ylabel, title) |
@@ -791,6 +791,7 class ParamWriter(Operation): | |||||
791 | grp.create_dataset('array dimensions', data = self.tableDim, dtype = self.dtype) |
|
791 | grp.create_dataset('array dimensions', data = self.tableDim, dtype = self.dtype) | |
792 |
|
792 | |||
793 | for i in range(len(self.metadataList)): |
|
793 | for i in range(len(self.metadataList)): | |
|
794 | print '#####',self.metadataList[i], getattr(self.dataOut, self.metadataList[i]) | |||
794 | grp.create_dataset(self.metadataList[i], data=getattr(self.dataOut, self.metadataList[i])) |
|
795 | grp.create_dataset(self.metadataList[i], data=getattr(self.dataOut, self.metadataList[i])) | |
795 | return |
|
796 | return | |
796 |
|
797 |
@@ -626,8 +626,8 class PrecipitationProc(Operation): | |||||
626 | ''' ============================= ''' |
|
626 | ''' ============================= ''' | |
627 |
|
627 | |||
628 | SPCmean = numpy.mean(self.spc,0) |
|
628 | SPCmean = numpy.mean(self.spc,0) | |
629 | ETA = numpy.zeros(self.Num_Hei) |
|
629 | ETA = numpy.zeros(self.Num_Hei,self.Num_Bin) | |
630 | Pr = numpy.sum(SPCmean,0) |
|
630 | Pr = self.spc[0,:,:] | |
631 |
|
631 | |||
632 | VelMeteoro = numpy.mean(SPCmean,axis=0) |
|
632 | VelMeteoro = numpy.mean(SPCmean,axis=0) | |
633 | print '==================== Vel SHAPE',VelMeteoro |
|
633 | print '==================== Vel SHAPE',VelMeteoro | |
@@ -640,7 +640,7 class PrecipitationProc(Operation): | |||||
640 |
|
640 | |||
641 |
|
641 | |||
642 | for R in range(self.Num_Hei): |
|
642 | for R in range(self.Num_Hei): | |
643 | ETA[R] = RadarConstant * Pr[R] * R**2 #Reflectivity (ETA) |
|
643 | ETA[:,R] = RadarConstant * Pr[:,R] * R**2 #Reflectivity (ETA) | |
644 |
|
644 | |||
645 | h = R + Altitude #Range from ground to radar pulse altitude |
|
645 | h = R + Altitude #Range from ground to radar pulse altitude | |
646 | del_V[R] = 1 + 3.68 * 10**-5 * h + 1.71 * 10**-9 * h**2 #Density change correction for velocity |
|
646 | del_V[R] = 1 + 3.68 * 10**-5 * h + 1.71 * 10**-9 * h**2 #Density change correction for velocity | |
@@ -1195,36 +1195,36 class FullSpectralAnalysis(Operation): | |||||
1195 | FitGaussCSPC = numpy.array([FitGauss01,FitGauss02,FitGauss12]) |
|
1195 | FitGaussCSPC = numpy.array([FitGauss01,FitGauss02,FitGauss12]) | |
1196 |
|
1196 | |||
1197 |
|
1197 | |||
1198 | ''' Ploteo por altura ''' |
|
1198 | # ''' Ploteo por altura ''' | |
1199 | if Height == 28: |
|
1199 | # if Height == 28: | |
1200 | for i in range(3): |
|
1200 | # for i in range(3): | |
1201 | #print 'FASE', numpy.shape(phase), y[25] |
|
1201 | # #print 'FASE', numpy.shape(phase), y[25] | |
1202 | #print numpy.shape(coherence) |
|
1202 | # #print numpy.shape(coherence) | |
1203 | fig = plt.figure(10+self.indice) |
|
1203 | # fig = plt.figure(10+self.indice) | |
1204 | #plt.plot( x[0:256],coherence[:,25] ) |
|
1204 | # #plt.plot( x[0:256],coherence[:,25] ) | |
1205 | #cohAv = numpy.average(coherence[i],1) |
|
1205 | # #cohAv = numpy.average(coherence[i],1) | |
1206 | Pendiente = FrecRange * PhaseSlope[i] |
|
1206 | # Pendiente = FrecRange * PhaseSlope[i] | |
1207 | plt.plot( FrecRange, Pendiente) |
|
1207 | # plt.plot( FrecRange, Pendiente) | |
1208 | plt.plot( xFrec,phase[i]) |
|
1208 | # plt.plot( xFrec,phase[i]) | |
1209 |
|
1209 | # | ||
1210 | CSPCmean = numpy.mean(numpy.abs(CSPCSamples),0) |
|
1210 | # CSPCmean = numpy.mean(numpy.abs(CSPCSamples),0) | |
1211 | #plt.plot(xFrec, FitGauss01) |
|
1211 | # #plt.plot(xFrec, FitGauss01) | |
1212 | #plt.plot(xFrec, CSPCmean) |
|
1212 | # #plt.plot(xFrec, CSPCmean) | |
1213 | #plt.plot(xFrec, numpy.abs(CSPCSamples[0])) |
|
1213 | # #plt.plot(xFrec, numpy.abs(CSPCSamples[0])) | |
1214 | #plt.plot(xFrec, FitGauss) |
|
1214 | # #plt.plot(xFrec, FitGauss) | |
1215 | #plt.plot(xFrec, yMean) |
|
1215 | # #plt.plot(xFrec, yMean) | |
1216 | #plt.plot(xFrec, numpy.abs(coherence[0])) |
|
1216 | # #plt.plot(xFrec, numpy.abs(coherence[0])) | |
1217 |
|
1217 | # | ||
1218 | #plt.axis([-12, 12, 15, 50]) |
|
1218 | # #plt.axis([-12, 12, 15, 50]) | |
1219 | #plt.title("%s" %( '%s %s, Channel %s'%(thisDatetime.strftime("%Y/%m/%d"),thisDatetime.strftime("%H:%M:%S") , i))) |
|
1219 | # #plt.title("%s" %( '%s %s, Channel %s'%(thisDatetime.strftime("%Y/%m/%d"),thisDatetime.strftime("%H:%M:%S") , i))) | |
1220 | plt.ylabel('Desfase [rad]') |
|
1220 | # plt.ylabel('Desfase [rad]') | |
1221 | #plt.ylabel('CSPC normalizado') |
|
1221 | # #plt.ylabel('CSPC normalizado') | |
1222 | plt.xlabel('Frec range [Hz]') |
|
1222 | # plt.xlabel('Frec range [Hz]') | |
1223 |
|
1223 | |||
1224 | #fig.savefig('/home/erick/Documents/Pics/to{}.png'.format(self.indice)) |
|
1224 | #fig.savefig('/home/erick/Documents/Pics/to{}.png'.format(self.indice)) | |
1225 |
|
1225 | |||
1226 | plt.show() |
|
1226 | # plt.show() | |
1227 | self.indice=self.indice+1 |
|
1227 | # self.indice=self.indice+1 | |
1228 |
|
1228 | |||
1229 |
|
1229 | |||
1230 |
|
1230 |
@@ -72,6 +72,7 class SpectraProc(ProcessingUnit): | |||||
72 | self.dataOut.flagNoData |
|
72 | self.dataOut.flagNoData | |
73 | """ |
|
73 | """ | |
74 | fft_volt = numpy.fft.fft(self.buffer,n=self.dataOut.nFFTPoints,axis=1) |
|
74 | fft_volt = numpy.fft.fft(self.buffer,n=self.dataOut.nFFTPoints,axis=1) | |
|
75 | ||||
75 | fft_volt = fft_volt.astype(numpy.dtype('complex')) |
|
76 | fft_volt = fft_volt.astype(numpy.dtype('complex')) | |
76 | dc = fft_volt[:,0,:] |
|
77 | dc = fft_volt[:,0,:] | |
77 |
|
78 | |||
@@ -138,6 +139,7 class SpectraProc(ProcessingUnit): | |||||
138 |
|
139 | |||
139 | if self.dataIn.flagDataAsBlock: |
|
140 | if self.dataIn.flagDataAsBlock: | |
140 | #data dimension: [nChannels, nProfiles, nSamples] |
|
141 | #data dimension: [nChannels, nProfiles, nSamples] | |
|
142 | ||||
141 | nVoltProfiles = self.dataIn.data.shape[1] |
|
143 | nVoltProfiles = self.dataIn.data.shape[1] | |
142 | # nVoltProfiles = self.dataIn.nProfiles |
|
144 | # nVoltProfiles = self.dataIn.nProfiles | |
143 |
|
145 | |||
@@ -160,6 +162,8 class SpectraProc(ProcessingUnit): | |||||
160 | self.dataOut.flagNoData = True |
|
162 | self.dataOut.flagNoData = True | |
161 | return 0 |
|
163 | return 0 | |
162 | else: |
|
164 | else: | |
|
165 | print 'DATA shape', self.dataIn.data.shape | |||
|
166 | sadsdf | |||
163 | self.buffer[:,self.profIndex,:] = self.dataIn.data.copy() |
|
167 | self.buffer[:,self.profIndex,:] = self.dataIn.data.copy() | |
164 | self.profIndex += 1 |
|
168 | self.profIndex += 1 | |
165 |
|
169 |
@@ -29,7 +29,7 startTime = '15:30:00' | |||||
29 | filehdf5 = "SA_2014050.hdf5" |
|
29 | filehdf5 = "SA_2014050.hdf5" | |
30 |
|
30 | |||
31 | #2014051 20 Feb 2014 |
|
31 | #2014051 20 Feb 2014 | |
32 | # path = '/home/soporte/Data/MST/SA/d2014051' |
|
32 | path = '/media/erick/6F60F7113095A154/CLAIRE/CLAIRE_WINDS_2MHZ/DATA/' #'/home/soporte/Data/MST/SA/d2014051' | |
33 | # pathFigure = '/home/soporte/workspace/Graficos/SA/new/' |
|
33 | # pathFigure = '/home/soporte/workspace/Graficos/SA/new/' | |
34 | # xmin = '0.0' |
|
34 | # xmin = '0.0' | |
35 | # xmax = '8.0' |
|
35 | # xmax = '8.0' | |
@@ -38,15 +38,15 filehdf5 = "SA_2014050.hdf5" | |||||
38 |
|
38 | |||
39 | readUnitConfObj = controllerObj.addReadUnit(datatype='VoltageReader', |
|
39 | readUnitConfObj = controllerObj.addReadUnit(datatype='VoltageReader', | |
40 | path=path, |
|
40 | path=path, | |
41 |
startDate='201 |
|
41 | startDate='2017/08/22', | |
42 |
endDate='201 |
|
42 | endDate='2018/08/22', | |
43 |
startTime= |
|
43 | startTime='00:00:00', | |
44 |
endTime=' |
|
44 | endTime='6:00:59', | |
45 | online=0, |
|
45 | online=0, | |
46 | delay=5, |
|
46 | delay=5, | |
47 |
walk= |
|
47 | walk=1) | |
48 | getblock=1, |
|
48 | #getblock=1, | |
49 | blocksize=32768) |
|
49 | #blocksize=32768) | |
50 |
|
50 | |||
51 | opObj11 = readUnitConfObj.addOperation(name='printNumberOfBlock') |
|
51 | opObj11 = readUnitConfObj.addOperation(name='printNumberOfBlock') | |
52 |
|
52 | |||
@@ -59,7 +59,7 opObj11 = procUnitConfObj0.addOperation(name='Decoder', optype='other') | |||||
59 |
|
59 | |||
60 | opObj11 = procUnitConfObj0.addOperation(name='CohInt', optype='other') |
|
60 | opObj11 = procUnitConfObj0.addOperation(name='CohInt', optype='other') | |
61 | # opObj11.addParameter(name='n', value='600', format='int') |
|
61 | # opObj11.addParameter(name='n', value='600', format='int') | |
62 |
opObj11.addParameter(name='n', value=' |
|
62 | opObj11.addParameter(name='n', value='4', format='int') | |
63 |
|
63 | |||
64 | opObj11 = procUnitConfObj0.addOperation(name='selectHeightsByIndex') |
|
64 | opObj11 = procUnitConfObj0.addOperation(name='selectHeightsByIndex') | |
65 | opObj11.addParameter(name='minIndex', value='10', format='float') |
|
65 | opObj11.addParameter(name='minIndex', value='10', format='float') | |
@@ -67,6 +67,7 opObj11.addParameter(name='maxIndex', value='60', format='float') | |||||
67 | #--------------------------------------------------------------------------------------------------- |
|
67 | #--------------------------------------------------------------------------------------------------- | |
68 | procUnitConfObj1 = controllerObj.addProcUnit(datatype='CorrelationProc', inputId=procUnitConfObj0.getId()) |
|
68 | procUnitConfObj1 = controllerObj.addProcUnit(datatype='CorrelationProc', inputId=procUnitConfObj0.getId()) | |
69 | procUnitConfObj1.addParameter(name='pairsList', value='(0,0),(1,1),(2,2),(3,3),(1,0),(2,3)', format='pairsList') |
|
69 | procUnitConfObj1.addParameter(name='pairsList', value='(0,0),(1,1),(2,2),(3,3),(1,0),(2,3)', format='pairsList') | |
|
70 | ||||
70 |
# |
|
71 | #procUnitConfObj1.addParameter(name='removeDC', value='1', format='bool') | |
71 | # #procUnitConfObj1.addParameter(name='lagT', value='0,1,2,3', format='intlist') |
|
72 | # #procUnitConfObj1.addParameter(name='lagT', value='0,1,2,3', format='intlist') | |
72 | # |
|
73 | # | |
@@ -98,24 +99,24 opObj20 = procUnitConfObj2.addOperation(name='SALags', optype='other') | |||||
98 | opObj21 = procUnitConfObj2.addOperation(name='WindProfiler', optype='other') |
|
99 | opObj21 = procUnitConfObj2.addOperation(name='WindProfiler', optype='other') | |
99 | opObj21.addParameter(name='technique', value='SA', format='str') |
|
100 | opObj21.addParameter(name='technique', value='SA', format='str') | |
100 | # # opObj21.addParameter(name='correctFactor', value='-1', format='float') |
|
101 | # # opObj21.addParameter(name='correctFactor', value='-1', format='float') | |
101 |
opObj21.addParameter(name='positionX', value=' |
|
102 | opObj21.addParameter(name='positionX', value='1.5,0,1.5', format='floatlist') | |
102 |
opObj21.addParameter(name='positionY', value=' |
|
103 | opObj21.addParameter(name='positionY', value='0.875,0,-0.875', format='floatlist') | |
103 |
opObj21.addParameter(name='azimuth', value=' |
|
104 | opObj21.addParameter(name='azimuth', value='0.0', format='float') | |
104 |
|
105 | |||
105 |
|
|
106 | opObj22 = procUnitConfObj2.addOperation(name='WindProfilerPlot', optype='other') | |
106 |
|
|
107 | opObj22.addParameter(name='id', value='4', format='int') | |
107 |
|
|
108 | opObj22.addParameter(name='wintitle', value='Wind Profiler', format='str') | |
108 |
# |
|
109 | #opObj22.addParameter(name='save', value='1', format='bool') | |
109 |
# |
|
110 | #opObj22.addParameter(name='figpath', value = pathFigure, format='str') | |
110 |
|
|
111 | opObj22.addParameter(name='zmin', value='-15', format='int') | |
111 |
|
|
112 | opObj22.addParameter(name='zmax', value='15', format='int') | |
112 |
|
|
113 | opObj22.addParameter(name='zmin_ver', value='-80', format='float') | |
113 |
|
|
114 | opObj22.addParameter(name='zmax_ver', value='80', format='float') | |
114 |
|
|
115 | opObj22.addParameter(name='SNRmin', value='-20', format='int') | |
115 |
|
|
116 | opObj22.addParameter(name='SNRmax', value='40', format='int') | |
116 |
|
|
117 | opObj22.addParameter(name='SNRthresh', value='-3.5', format='float') | |
117 |
|
|
118 | opObj22.addParameter(name='xmin', value=xmin, format='float') | |
118 |
|
|
119 | opObj22.addParameter(name='xmax', value=xmax, format='float') | |
119 |
|
120 | |||
120 | #----------------------------------------------------------------------------------- |
|
121 | #----------------------------------------------------------------------------------- | |
121 |
|
122 |
@@ -1,1 +1,1 | |||||
1 | <Project description="Segundo Test" id="191" name="test01"><ReadUnit datatype="VoltageReader" id="1911" inputId="0" name="VoltageReader"><Operation id="19111" name="run" priority="1" type="self"><Parameter format="str" id="191111" name="datatype" value="VoltageReader" /><Parameter format="str" id="191112" name="path" value="/home/erick/Documents/Data/Claire_Data/raw" /><Parameter format="date" id="191113" name="startDate" value="2017/07/26" /><Parameter format="date" id="191114" name="endDate" value="2017/07/26" /><Parameter format="time" id="191115" name="startTime" value="10:02:00" /><Parameter format="time" id="191116" name="endTime" value="10:11:00" /><Parameter format="int" id="191118" name="online" value="0" /><Parameter format="int" id="191119" name="walk" value="1" /></Operation><Operation id="19112" name="printNumberOfBlock" priority="2" type="self" /></ReadUnit><ProcUnit datatype="SpectraProc" id="1913" inputId="1912" name="SpectraProc"><Operation id="19131" name="run" priority="1" type="self"><Parameter format="int" id="191311" name="nFFTPoints" value="128" /><Parameter format="pairslist" id="191312" name="pairsList" value="(0,1),(0,2),(1,2)" /></Operation><Operation id="19132" name="removeDC" priority="2" type="self" /><Operation id="19133" name="IncohInt" priority="3" type="external"><Parameter format="float" id="191331" name="n" value="30" /></Operation><Operation id="19134" name="CrossSpectraPlot" priority="4" type="other"><Parameter format="str" id="191341" name="phase_cmap" value="bwr" /><Parameter format="int" id="191342" name="id" value="2005" /><Parameter format="str" id="191343" name="wintitle" value="CrossSpectraPlot_ShortPulse" /><Parameter format="str" id="191344" name="xaxis" value="Velocity" /><Parameter format="float" id="191345" name="ymin" value="1" /><Parameter format="int" id="191346" name="ymax" value="7" /><Parameter format="int" id="191347" name="zmin" value="15" /><Parameter format="int" id="191348" name="zmax" value="60" /><Parameter format="int" id="191349" name="save" value="2" /><Parameter format="str" id="191350" name="figpath" value="/media/erick/6F60F7113095A154/CLAIRE/CLAIRE_WINDS_2MHZ/Images" /></Operation></ProcUnit><ProcUnit datatype="VoltageProc" id="1912" inputId="1911" name="VoltageProc"><Operation id="19121" name="run" priority="1" type="self" /><Operation id="19122" name="setRadarFrequency" priority="2" type="self"><Parameter format="float" id="191221" name="frequency" value="445.09e6" /></Operation><Operation id="19123" name="selectHeights" priority="3" type="self"><Parameter format="float" id="191231" name="minHei" value="0" /><Parameter format="float" id="191232" name="maxHei" value="64" /></Operation></ProcUnit><ProcUnit datatype="Parameters" id="1914" inputId="1913" name="ParametersProc"><Operation id="19141" name="run" priority="1" type="self" /><Operation id="19142" name="GaussianFit" priority="2" type="other" /></ProcUnit></Project> No newline at end of file |
|
1 | <Project description="Segundo Test" id="191" name="test01"><ReadUnit datatype="SpectraReader" id="1911" inputId="0" name="SpectraReader"><Operation id="19111" name="run" priority="1" type="self"><Parameter format="str" id="191111" name="datatype" value="SpectraReader" /><Parameter format="str" id="191112" name="path" value="/media/erick/6F60F7113095A154/CLAIRE/CLAIRE_WINDS_2MHZ/DATA/pdatatest/test1024/d2017234" /><Parameter format="date" id="191113" name="startDate" value="2017/08/22" /><Parameter format="date" id="191114" name="endDate" value="2017/08/22" /><Parameter format="time" id="191115" name="startTime" value="02:00:00" /><Parameter format="time" id="191116" name="endTime" value="06:00:00" /><Parameter format="int" id="191118" name="online" value="0" /><Parameter format="int" id="191119" name="walk" value="0" /></Operation><Operation id="19112" name="printInfo" priority="2" type="self" /><Operation id="19113" name="printNumberOfBlock" priority="3" type="self" /></ReadUnit><ProcUnit datatype="Parameters" id="1913" inputId="1912" name="ParametersProc"><Operation id="19131" name="run" priority="1" type="self" /><Operation id="19132" name="SpectralMoments" priority="2" type="other" /><Operation id="19133" name="FullSpectralAnalysis" priority="3" type="other"><Parameter format="float" id="191331" name="SNRlimit" value="-16" /><Parameter format="float" id="191332" name="E01" value="1.500" /><Parameter format="float" id="191333" name="E02" value="1.500" /><Parameter format="float" id="191334" name="E12" value="0" /><Parameter format="float" id="191335" name="N01" value="0.875" /><Parameter format="float" id="191336" name="N02" value="-0.875" /><Parameter format="float" id="191337" name="N12" value="-1.750" /></Operation><Operation id="19134" name="ParamWriter" priority="4" type="other"><Parameter format="str" id="191341" name="path" value="/media/erick/6F60F7113095A154/CLAIRE/CLAIRE_WINDS_2MHZ/DATA/pdatatest/test1024" /><Parameter format="int" id="191342" name="blocksPerFile" value="100" /><Parameter format="list" id="191343" name="metadataList" value="heightList,timeZone,paramInterval" /><Parameter format="list" id="191344" name="dataList" value="data_output,data_SNR,utctime,utctimeInit" /></Operation></ProcUnit><ProcUnit datatype="SpectraProc" id="1912" inputId="1911" name="SpectraProc"><Operation id="19121" name="run" priority="1" type="self"><Parameter format="pairslist" id="191211" name="pairsList" value="(0,1),(0,2),(1,2)" /></Operation><Operation id="19122" name="setRadarFrequency" priority="2" type="self"><Parameter format="float" id="191221" name="frequency" value="445.09e6" /></Operation><Operation id="19123" name="IncohInt" priority="3" type="external"><Parameter format="float" id="191231" name="n" value="5" /></Operation><Operation id="19124" name="SpectraPlot" priority="4" type="external"><Parameter format="int" id="191241" name="id" value="11" /><Parameter format="str" id="191242" name="wintitle" value="SpectraPlot" /><Parameter format="str" id="191243" name="xaxis" value="frequency" /><Parameter format="float" id="191244" name="ymin" value="1" /><Parameter format="int" id="191245" name="ymax" value="5" /><Parameter format="int" id="191246" name="zmin" value="15" /><Parameter format="int" id="191247" name="zmax" value="50" /><Parameter format="int" id="191248" name="save" value="2" /><Parameter format="int" id="191249" name="save" value="5" /><Parameter format="str" id="191250" name="figpath" value="/media/erick/6F60F7113095A154/CLAIRE/CLAIRE_WINDS_2MHZ/Images/FirstResults1024" /></Operation><Operation id="19125" name="CrossSpectraPlot" priority="5" type="other"><Parameter format="int" id="191251" name="id" value="2005" /><Parameter format="str" id="191252" name="wintitle" value="CrossSpectraPlot_ShortPulse" /><Parameter format="str" id="191253" name="xaxis" value="Velocity" /><Parameter format="float" id="191254" name="xmin" value="-10" /><Parameter format="float" id="191255" name="xmax" value="10" /><Parameter format="int" id="191256" name="zmin" value="15" /><Parameter format="int" id="191257" name="zmax" value="50" /><Parameter format="str" id="191258" name="phase_cmap" value="bwr" /><Parameter format="float" id="191259" name="ymin" value="1" /><Parameter format="float" id="191260" name="ymax" value="5" /></Operation></ProcUnit></Project> No newline at end of file |
@@ -15,7 +15,7 from schainpy.controller import Project | |||||
15 |
|
15 | |||
16 | filename = 'test1.xml' |
|
16 | filename = 'test1.xml' | |
17 | # path = '/home/jespinoza/workspace/data/bltr/' |
|
17 | # path = '/home/jespinoza/workspace/data/bltr/' | |
18 |
path = '/me |
|
18 | path = '/home/erick/Documents/Data/BLTR_Data/sswma/'#'/media/erick/6F60F7113095A154/BLTR/' | |
19 | desc = "read bltr data sswma file" |
|
19 | desc = "read bltr data sswma file" | |
20 | figpath = '/media/erick/6F60F7113095A154/BLTR/' |
|
20 | figpath = '/media/erick/6F60F7113095A154/BLTR/' | |
21 | pathhdf5 = '/tmp/' |
|
21 | pathhdf5 = '/tmp/' | |
@@ -23,128 +23,28 pathhdf5 = '/tmp/' | |||||
23 | controllerObj = Project() |
|
23 | controllerObj = Project() | |
24 |
|
24 | |||
25 | controllerObj.setup(id = '191', name='test1', description=desc) |
|
25 | controllerObj.setup(id = '191', name='test1', description=desc) | |
26 |
readUnitConfObj = controllerObj.addReadUnit(datatype=' |
|
26 | readUnitConfObj = controllerObj.addReadUnit(datatype='BLTRParamReader', | |
27 | path=path, |
|
27 | path=path, | |
28 | startDate='2017/01/17', |
|
28 | startDate='2017/01/17', | |
29 | endDate='2018/01/01', |
|
29 | endDate='2018/01/01', | |
30 |
startTime='0 |
|
30 | startTime='06:00:00', | |
31 | endTime='23:59:59', |
|
31 | endTime='23:59:59', | |
32 |
|
|
32 | verbose=0, | |
|
33 | ) | |||
33 |
|
34 | |||
34 |
procUnitConfObj1 = controllerObj.addProcUnit(datatype='BLTRProc |
|
35 | procUnitConfObj1 = controllerObj.addProcUnit(datatype='BLTRParametersProc', | |
35 | inputId=readUnitConfObj.getId()) |
|
36 | inputId=readUnitConfObj.getId()) | |
36 |
|
37 | |||
37 | '''-------------------------------------------Processing--------------------------------------------''' |
|
38 | procUnitConfObj1.addParameter(name='mode', value='1', format='int') | |
|
39 | # procUnitConfObj1.addParameter(name='snr_threshold', value='10', format='float') | |||
38 |
|
40 | |||
39 | '''MODE 1: LOW ATMOSPHERE: 0- 3 km''' |
|
|||
40 | # opObj10 = procUnitConfObj1.addOperation(name='SnrFilter') |
|
|||
41 | # opObj10.addParameter(name='snr_val', value='-10', format='float') |
|
|||
42 | # opObj10.addParameter(name='modetofilter', value='1', format='int') |
|
|||
43 | # |
|
|||
44 | # opObj10 = procUnitConfObj1.addOperation(name='OutliersFilter') |
|
|||
45 | # opObj10.addParameter(name='svalue', value='meridional', format='str') |
|
|||
46 | # opObj10.addParameter(name='svalue2', value='inTime', format='str') |
|
|||
47 | # opObj10.addParameter(name='method', value='0', format='float') |
|
|||
48 | # opObj10.addParameter(name='factor', value='1', format='float') |
|
|||
49 | # opObj10.addParameter(name='filter', value='0', format='float') |
|
|||
50 | # opObj10.addParameter(name='npoints', value='5', format='float') |
|
|||
51 | # opObj10.addParameter(name='modetofilter', value='1', format='int') |
|
|||
52 | # # |
|
|||
53 | # opObj10 = procUnitConfObj1.addOperation(name='OutliersFilter') |
|
|||
54 | # opObj10.addParameter(name='svalue', value='zonal', format='str') |
|
|||
55 | # opObj10.addParameter(name='svalue2', value='inTime', format='str') |
|
|||
56 | # opObj10.addParameter(name='method', value='0', format='float') |
|
|||
57 | # opObj10.addParameter(name='factor', value='1', format='float') |
|
|||
58 | # opObj10.addParameter(name='filter', value='0', format='float') |
|
|||
59 | # opObj10.addParameter(name='npoints', value='5', format='float') |
|
|||
60 | # opObj10.addParameter(name='modetofilter', value='1', format='int') |
|
|||
61 | # # |
|
|||
62 | # opObj10 = procUnitConfObj1.addOperation(name='OutliersFilter') |
|
|||
63 | # opObj10.addParameter(name='svalue', value='vertical', format='str') |
|
|||
64 | # opObj10.addParameter(name='svalue2', value='inHeight', format='str') |
|
|||
65 | # opObj10.addParameter(name='method', value='0', format='float') |
|
|||
66 | # opObj10.addParameter(name='factor', value='2', format='float') |
|
|||
67 | # opObj10.addParameter(name='filter', value='0', format='float') |
|
|||
68 | # opObj10.addParameter(name='npoints', value='9', format='float') |
|
|||
69 | # opObj10.addParameter(name='modetofilter', value='1', format='int') |
|
|||
70 | # |
|
|||
71 |
|
41 | |||
72 | ''' MODE 2: 0 - 10 km ''' |
|
|||
73 |
|
||||
74 | opObj10 = procUnitConfObj1.addOperation(name='SnrFilter') |
|
|||
75 | opObj10.addParameter(name='snr_val', value='-20', format='float') |
|
|||
76 | opObj10.addParameter(name='modetofilter', value='2', format='int') |
|
|||
77 |
|
||||
78 | opObj10 = procUnitConfObj1.addOperation(name='OutliersFilter') |
|
|||
79 | opObj10.addParameter(name='svalue', value='meridional', format='str') |
|
|||
80 | opObj10.addParameter(name='svalue2', value='inTime', format='str') |
|
|||
81 | opObj10.addParameter(name='method', value='0', format='float') |
|
|||
82 | opObj10.addParameter(name='factor', value='2', format='float') |
|
|||
83 | opObj10.addParameter(name='filter', value='0', format='float') |
|
|||
84 | opObj10.addParameter(name='npoints', value='9', format='float') |
|
|||
85 | opObj10.addParameter(name='modetofilter', value='2', format='int') |
|
|||
86 | # # |
|
|||
87 | opObj10 = procUnitConfObj1.addOperation(name='OutliersFilter') |
|
|||
88 | opObj10.addParameter(name='svalue', value='zonal', format='str') |
|
|||
89 | opObj10.addParameter(name='svalue2', value='inTime', format='str') |
|
|||
90 | opObj10.addParameter(name='method', value='0', format='float') |
|
|||
91 | opObj10.addParameter(name='factor', value='2', format='float') |
|
|||
92 | opObj10.addParameter(name='filter', value='0', format='float') |
|
|||
93 | opObj10.addParameter(name='npoints', value='9', format='float') |
|
|||
94 | opObj10.addParameter(name='modetofilter', value='2', format='int') |
|
|||
95 | # # |
|
|||
96 | opObj10 = procUnitConfObj1.addOperation(name='OutliersFilter') |
|
|||
97 | opObj10.addParameter(name='svalue', value='vertical', format='str') |
|
|||
98 | opObj10.addParameter(name='svalue2', value='inHeight', format='str') |
|
|||
99 | opObj10.addParameter(name='method', value='0', format='float') |
|
|||
100 | opObj10.addParameter(name='factor', value='2', format='float') |
|
|||
101 | opObj10.addParameter(name='filter', value='0', format='float') |
|
|||
102 | opObj10.addParameter(name='npoints', value='9', format='float') |
|
|||
103 | opObj10.addParameter(name='modetofilter', value='2', format='int') |
|
|||
104 |
|
||||
105 | # '''-----------------------------------------Writing-------------------------------------------''' |
|
|||
106 | # |
|
|||
107 | # # opObj10 = procUnitConfObj1.addOperation(name='testBLTRWriter',optype='other') |
|
|||
108 | # # opObj10.addParameter(name='path', value = pathhdf5) |
|
|||
109 | # # opObj10.addParameter(name='modetowrite', value = '2',format='int') |
|
|||
110 | # # |
|
|||
111 | # # opObj10 = procUnitConfObj1.addOperation(name='testBLTRWriter',optype='other') |
|
|||
112 | # # opObj10.addParameter(name='path', value = pathhdf5) |
|
|||
113 | # # opObj10.addParameter(name='modetowrite', value = '1',format='int') |
|
|||
114 | # |
|
|||
115 | # '''----------------------------------------Plotting--------------------------------------------''' |
|
|||
116 | # |
|
|||
117 | opObj10 = procUnitConfObj1.addOperation(name='prePlot') |
|
|||
118 | opObj10.addParameter(name='modeselect',value='1',format='int') |
|
|||
119 | # # |
|
|||
120 | opObj10 = procUnitConfObj1.addOperation(name='WindProfilerPlot', optype='other') |
|
42 | opObj10 = procUnitConfObj1.addOperation(name='WindProfilerPlot', optype='other') | |
121 |
opObj10.addParameter(name='id', value=' |
|
43 | opObj10.addParameter(name='id', value='2', format='int') | |
122 | opObj10.addParameter(name='wintitle', value='', format='str') |
|
44 | opObj10.addParameter(name='wintitle', value='', format='str') | |
123 | opObj10.addParameter(name='channelList', value='0', format='intlist') |
|
45 | ||
124 | #opObj10.addParameter(name='save', value='1', format='bool') |
|
46 | # opObj10.addParameter(name='save', value='1', format='bool') | |
125 | #opObj10.addParameter(name='figpath', value=figpath, format='str') |
|
47 | # opObj10.addParameter(name='figpath', value=figpath, format='str') | |
126 | opObj10.addParameter(name='SNRmin', value='-10', format='int') |
|
|||
127 | opObj10.addParameter(name='SNRmax', value='50', format='int') |
|
|||
128 | opObj10.addParameter(name='SNRthresh', value='0', format='float') |
|
|||
129 | opObj10.addParameter(name='xmin', value='0', format='float') |
|
|||
130 | opObj10.addParameter(name='xmax', value='24', format='float') |
|
|||
131 | opObj10.addParameter(name='ymax', value='3', format='float') |
|
|||
132 | opObj10.addParameter(name='zmin', value='-20', format='float') |
|
|||
133 | opObj10.addParameter(name='zmax', value='20', format='float') |
|
|||
134 | opObj10.addParameter(name='zmin_ver', value='-200', format='float') |
|
|||
135 | opObj10.addParameter(name='zmax_ver', value='200', format='float') |
|
|||
136 | #opObj10.addParameter(name='showprofile', value='1', format='bool') |
|
|||
137 | #opObj10.addParameter(name='show', value='1', format='bool') |
|
|||
138 |
|
||||
139 | opObj10 = procUnitConfObj1.addOperation(name='prePlot') |
|
|||
140 | opObj10.addParameter(name='modeselect',value='2',format='int') |
|
|||
141 | # |
|
|||
142 | opObj10 = procUnitConfObj1.addOperation(name='WindProfilerPlot', optype='other') |
|
|||
143 | opObj10.addParameter(name='id', value='2', format='int') |
|
|||
144 | opObj10.addParameter(name='wintitle', value='', format='str') |
|
|||
145 | #opObj10.addParameter(name='channelList', value='0', format='intlist') |
|
|||
146 | opObj10.addParameter(name='save', value='1', format='bool') |
|
|||
147 | opObj10.addParameter(name='figpath', value=figpath, format='str') |
|
|||
148 | opObj10.addParameter(name='SNRmin', value='-20', format='int') |
|
48 | opObj10.addParameter(name='SNRmin', value='-20', format='int') | |
149 | opObj10.addParameter(name='SNRmax', value='40', format='int') |
|
49 | opObj10.addParameter(name='SNRmax', value='40', format='int') | |
150 | opObj10.addParameter(name='SNRthresh', value='0', format='float') |
|
50 | opObj10.addParameter(name='SNRthresh', value='0', format='float') | |
@@ -159,13 +59,5 opObj10.addParameter(name='zmax_ver', value='200', format='float') | |||||
159 | #opObj10.addParameter(name='showprofile', value='1', format='bool') |
|
59 | #opObj10.addParameter(name='showprofile', value='1', format='bool') | |
160 | #opObj10.addParameter(name='show', value='1', format='bool') |
|
60 | #opObj10.addParameter(name='show', value='1', format='bool') | |
161 |
|
61 | |||
162 | # # print "Escribiendo el archivo XML" |
|
|||
163 | # controllerObj.writeXml(filename) |
|
|||
164 | # # print "Leyendo el archivo XML" |
|
|||
165 | # controllerObj.readXml(filename) |
|
|||
166 |
|
||||
167 | # controllerObj.createObjects() |
|
|||
168 | # controllerObj.connectObjects() |
|
|||
169 | # controllerObj.run() |
|
|||
170 | controllerObj.start() |
|
62 | controllerObj.start() | |
171 |
|
63 |
@@ -20,9 +20,9 controllerObj = Project() | |||||
20 |
|
20 | |||
21 | controllerObj.setup(id='191', name='test01', description=desc) |
|
21 | controllerObj.setup(id='191', name='test01', description=desc) | |
22 |
|
22 | |||
23 | readUnitConfObj = controllerObj.addReadUnit(datatype='BLTRReader', |
|
23 | readUnitConfObj = controllerObj.addReadUnit(datatype='BLTRSpectraReader', | |
24 | path='/media/erick/6F60F7113095A154/BLTR/', |
|
24 | #path='/media/erick/6F60F7113095A154/BLTR/', | |
25 |
|
25 | path='/home/erick/Documents/Data/BLTR_Data/fdt/', | ||
26 | endDate='2017/10/19', |
|
26 | endDate='2017/10/19', | |
27 | startTime='13:00:00', |
|
27 | startTime='13:00:00', | |
28 | startDate='2016/11/8', |
|
28 | startDate='2016/11/8', | |
@@ -39,11 +39,11 readUnitConfObj = controllerObj.addReadUnit(datatype='BLTRReader', | |||||
39 | procUnitConfObj1 = controllerObj.addProcUnit(datatype='Spectra', inputId=readUnitConfObj.getId()) |
|
39 | procUnitConfObj1 = controllerObj.addProcUnit(datatype='Spectra', inputId=readUnitConfObj.getId()) | |
40 |
|
40 | |||
41 |
|
41 | |||
42 |
|
||||
43 | opObj11 = procUnitConfObj1.addOperation(name='IncohInt', optype='other') |
|
42 | opObj11 = procUnitConfObj1.addOperation(name='IncohInt', optype='other') | |
44 |
opObj11.addParameter(name='n', value=' |
|
43 | opObj11.addParameter(name='n', value='2', format='float') | |
45 |
|
44 | |||
46 | opObj10 = procUnitConfObj1.addOperation(name='removeDC') |
|
45 | opObj10 = procUnitConfObj1.addOperation(name='removeDC') | |
|
46 | #opObj10 = procUnitConfObj1.addOperation(name='removeInterference2') | |||
47 |
|
47 | |||
48 | # opObj10 = procUnitConfObj1.addOperation(name='calcMag') |
|
48 | # opObj10 = procUnitConfObj1.addOperation(name='calcMag') | |
49 |
|
49 | |||
@@ -101,8 +101,8 opObj11.addParameter(name='xaxis', value='Velocity', format='str') | |||||
101 | procUnitConfObj2 = controllerObj.addProcUnit(datatype='Parameters', inputId=procUnitConfObj1.getId()) |
|
101 | procUnitConfObj2 = controllerObj.addProcUnit(datatype='Parameters', inputId=procUnitConfObj1.getId()) | |
102 | opObj11 = procUnitConfObj2.addOperation(name='SpectralMoments', optype='other') |
|
102 | opObj11 = procUnitConfObj2.addOperation(name='SpectralMoments', optype='other') | |
103 | opObj22 = procUnitConfObj2.addOperation(name='FullSpectralAnalysis', optype='other') |
|
103 | opObj22 = procUnitConfObj2.addOperation(name='FullSpectralAnalysis', optype='other') | |
104 |
opObj22.addParameter(name='SNRlimit', value=' |
|
104 | opObj22.addParameter(name='SNRlimit', value='7', format='float') | |
105 | # |
|
105 | ||
106 | opObj22 = procUnitConfObj2.addOperation(name='WindProfilerPlot', optype='other') |
|
106 | opObj22 = procUnitConfObj2.addOperation(name='WindProfilerPlot', optype='other') | |
107 | opObj22.addParameter(name='id', value='4', format='int') |
|
107 | opObj22.addParameter(name='id', value='4', format='int') | |
108 | opObj22.addParameter(name='wintitle', value='Wind Profiler', format='str') |
|
108 | opObj22.addParameter(name='wintitle', value='Wind Profiler', format='str') | |
@@ -111,8 +111,8 opObj22.addParameter(name='save', value='1', format='bool') | |||||
111 |
|
111 | |||
112 | opObj22.addParameter(name='zmin', value='-20', format='int') |
|
112 | opObj22.addParameter(name='zmin', value='-20', format='int') | |
113 | opObj22.addParameter(name='zmax', value='20', format='int') |
|
113 | opObj22.addParameter(name='zmax', value='20', format='int') | |
114 |
opObj22.addParameter(name='zmin_ver', value='- |
|
114 | opObj22.addParameter(name='zmin_ver', value='-300', format='float') | |
115 |
opObj22.addParameter(name='zmax_ver', value=' |
|
115 | opObj22.addParameter(name='zmax_ver', value='300', format='float') | |
116 | opObj22.addParameter(name='SNRmin', value='-5', format='int') |
|
116 | opObj22.addParameter(name='SNRmin', value='-5', format='int') | |
117 | opObj22.addParameter(name='SNRmax', value='30', format='int') |
|
117 | opObj22.addParameter(name='SNRmax', value='30', format='int') | |
118 | # opObj22.addParameter(name='SNRthresh', value='-3.5', format='float') |
|
118 | # opObj22.addParameter(name='SNRthresh', value='-3.5', format='float') |
@@ -17,14 +17,22 def main(): | |||||
17 | controllerObj.setup(id = '191', name='test01', description=desc) |
|
17 | controllerObj.setup(id = '191', name='test01', description=desc) | |
18 |
|
18 | |||
19 | readUnitConfObj = controllerObj.addReadUnit(datatype='Spectra', |
|
19 | readUnitConfObj = controllerObj.addReadUnit(datatype='Spectra', | |
20 |
path='/ |
|
20 | path='/media/erick/6F60F7113095A154/CLAIRE/CLAIRE_WINDS_2MHZ/DATA/pdata', | |
21 |
|
|
21 | #path='/home/erick/Documents/Data/Claire_Data/raw', | |
22 |
|
|
22 | startDate='2017/07/20', | |
23 |
|
|
23 | endDate='2017/07/26', | |
24 |
|
|
24 | startTime='10:02:00', | |
|
25 | endTime='10:11:00', | |||
25 | online=0, |
|
26 | online=0, | |
26 |
walk= |
|
27 | walk=1) | |
27 |
|
|
28 | # path='/home/erick/Documents/Data/d2015106', | |
|
29 | # startDate='2010/12/18', | |||
|
30 | # endDate='2017/12/22', | |||
|
31 | # startTime='00:00:00', | |||
|
32 | # endTime='23:59:59', | |||
|
33 | # online=0, | |||
|
34 | # walk=0, | |||
|
35 | # expLabel='') | |||
28 |
|
36 | |||
29 | procUnitConfObj1 = controllerObj.addProcUnit(datatype='Spectra', inputId=readUnitConfObj.getId()) |
|
37 | procUnitConfObj1 = controllerObj.addProcUnit(datatype='Spectra', inputId=readUnitConfObj.getId()) | |
30 |
|
38 | |||
@@ -60,7 +68,7 def main(): | |||||
60 |
|
68 | |||
61 | procUnitConfObj2 = controllerObj.addProcUnit(datatype='Parameters', inputId=readUnitConfObj.getId()) |
|
69 | procUnitConfObj2 = controllerObj.addProcUnit(datatype='Parameters', inputId=readUnitConfObj.getId()) | |
62 | opObj11 = procUnitConfObj2.addOperation(name='GaussianFit', optype='other') |
|
70 | opObj11 = procUnitConfObj2.addOperation(name='GaussianFit', optype='other') | |
63 | opObj11.addParameter(name='vel_arr', value='32,0,0,0', format='intList') |
|
71 | #opObj11.addParameter(name='vel_arr', value='32,0,0,0', format='intList') | |
64 | opObj11.addParameter(name='SNRlimit', value='-3', format='int') |
|
72 | opObj11.addParameter(name='SNRlimit', value='-3', format='int') | |
65 |
|
73 | |||
66 | #opObj12 = procUnitConfObj2.addOperation(name='ParametersPlot', optype='other') |
|
74 | #opObj12 = procUnitConfObj2.addOperation(name='ParametersPlot', optype='other') |
@@ -7,39 +7,63 if __name__ == '__main__': | |||||
7 | desc = "Segundo Test" |
|
7 | desc = "Segundo Test" | |
8 | filename = "schain.xml" |
|
8 | filename = "schain.xml" | |
9 |
|
9 | |||
|
10 | pathW='/media/erick/6F60F7113095A154/CLAIRE/CLAIRE_WINDS_2MHZ/DATA/pdatatest/test1024' | |||
|
11 | figpath = '/media/erick/6F60F7113095A154/CLAIRE/CLAIRE_WINDS_2MHZ/Images/test1024' | |||
|
12 | ||||
10 | controllerObj = Project() |
|
13 | controllerObj = Project() | |
11 |
|
14 | |||
12 |
controllerObj.setup(id |
|
15 | controllerObj.setup(id='191', name='test01', description=desc) | |
13 |
|
16 | |||
14 | readUnitConfObj = controllerObj.addReadUnit(datatype='VoltageReader', |
|
17 | readUnitConfObj = controllerObj.addReadUnit(datatype='VoltageReader', | |
15 |
path='/ |
|
18 | path='/media/erick/6F60F7113095A154/CLAIRE/CLAIRE_WINDS_2MHZ/DATA/', | |
16 |
|
|
19 | #path='/home/erick/Documents/Data/Claire_Data/raw', | |
17 |
|
|
20 | startDate='2017/08/22', | |
18 |
|
|
21 | endDate='2017/08/22', | |
19 |
|
|
22 | startTime='01:00:00', | |
|
23 | endTime='06:00:00', | |||
20 | online=0, |
|
24 | online=0, | |
21 | walk=1) |
|
25 | walk=1) | |
22 |
|
26 | |||
|
27 | opObj00 = readUnitConfObj.addOperation(name='printInfo') | |||
|
28 | # | |||
|
29 | # procUnitConfObj0 = controllerObj.addProcUnit(datatype='VoltageProc', | |||
|
30 | # inputId=readUnitConfObj.getId()) | |||
|
31 | # | |||
|
32 | # opObj10 = procUnitConfObj0.addOperation(name='selectHeights') | |||
|
33 | # opObj10.addParameter(name='minHei', value='0', format='float') | |||
|
34 | # opObj10.addParameter(name='maxHei', value='8', format='float') | |||
|
35 | # | |||
|
36 | # opObj10 = procUnitConfObj0.addOperation(name='filterByHeights') | |||
|
37 | # opObj10.addParameter(name='window', value='2', format='float') | |||
|
38 | # | |||
|
39 | # opObj10 = procUnitConfObj0.addOperation(name='Decoder', optype='external') | |||
|
40 | # opObj10.addParameter(name='code', value='1,-1', format='intlist') | |||
|
41 | # opObj10.addParameter(name='nCode', value='2', format='float') | |||
|
42 | # opObj10.addParameter(name='nBaud', value='1', format='float') | |||
|
43 | # | |||
|
44 | # | |||
|
45 | # opObj10 = procUnitConfObj0.addOperation(name='CohInt', optype='external') | |||
|
46 | # opObj10.addParameter(name='n', value='1296', format='float') | |||
|
47 | ||||
23 | opObj00 = readUnitConfObj.addOperation(name='printNumberOfBlock') |
|
48 | opObj00 = readUnitConfObj.addOperation(name='printNumberOfBlock') | |
24 |
|
49 | |||
25 | procUnitConfObj0 = controllerObj.addProcUnit(datatype='VoltageProc', |
|
50 | procUnitConfObj0 = controllerObj.addProcUnit(datatype='VoltageProc', | |
26 | inputId=readUnitConfObj.getId()) |
|
51 | inputId=readUnitConfObj.getId()) | |
27 |
|
52 | |||
28 | opObj10 = procUnitConfObj0.addOperation(name='selectHeights') |
|
|||
29 | opObj10.addParameter(name='minHei', value='0', format='float') |
|
|||
30 | opObj10.addParameter(name='maxHei', value='8', format='float') |
|
|||
31 |
|
53 | |||
32 |
opObj10 = procUnitConfObj0.addOperation(name=' |
|
54 | opObj10 = procUnitConfObj0.addOperation(name='setRadarFrequency') | |
33 |
opObj10.addParameter(name=' |
|
55 | opObj10.addParameter(name='frequency', value='445.09e6', format='float') | |
34 |
|
56 | |||
35 |
opObj10 = procUnitConfObj0.addOperation(name=' |
|
57 | #opObj10 = procUnitConfObj0.addOperation(name='CohInt', optype='external') | |
36 |
opObj10.addParameter(name=' |
|
58 | #opObj10.addParameter(name='n', value='1', format='float') | |
37 | opObj10.addParameter(name='nCode', value='2', format='float') |
|
|||
38 | opObj10.addParameter(name='nBaud', value='1', format='float') |
|
|||
39 |
|
59 | |||
|
60 | #opObj10 = procUnitConfObj0.addOperation(name='selectHeights') | |||
|
61 | #opObj10.addParameter(name='minHei', value='1', format='float') | |||
|
62 | #opObj10.addParameter(name='maxHei', value='15', format='float') | |||
40 |
|
63 | |||
41 |
opObj10 = procUnitConfObj0.addOperation(name=' |
|
64 | #opObj10 = procUnitConfObj0.addOperation(name='selectFFTs') | |
42 |
opObj10.addParameter(name='n', value=' |
|
65 | #opObj10.addParameter(name='minHei', value='', format='float') | |
|
66 | #opObj10.addParameter(name='maxHei', value='', format='float') | |||
43 |
|
67 | |||
44 | procUnitConfObj1 = controllerObj.addProcUnit(datatype='SpectraProc', |
|
68 | procUnitConfObj1 = controllerObj.addProcUnit(datatype='SpectraProc', | |
45 | inputId=procUnitConfObj0.getId()) |
|
69 | inputId=procUnitConfObj0.getId()) | |
@@ -47,11 +71,25 if __name__ == '__main__': | |||||
47 | #Creating a processing object with its parameters |
|
71 | # Creating a processing object with its parameters | |
48 | #schainpy.model.proc.jroproc_spectra.SpectraProc.run() |
|
72 | # schainpy.model.proc.jroproc_spectra.SpectraProc.run() | |
49 | #If you need to add more parameters can use the "addParameter method" |
|
73 | # If you need to add more parameters can use the "addParameter method" | |
50 |
procUnitConfObj1.addParameter(name='nFFTPoints', value='1 |
|
74 | procUnitConfObj1.addParameter(name='nFFTPoints', value='1024', format='int') | |
|
75 | ||||
|
76 | ||||
|
77 | opObj10 = procUnitConfObj1.addOperation(name='removeDC') | |||
|
78 | #opObj10 = procUnitConfObj1.addOperation(name='removeInterference') | |||
|
79 | #opObj10 = procUnitConfObj1.addOperation(name='IncohInt', optype='external') | |||
|
80 | #opObj10.addParameter(name='n', value='30', format='float') | |||
|
81 | ||||
|
82 | ||||
51 |
|
83 | |||
52 |
opObj10 = procUnitConfObj1.addOperation(name=' |
|
84 | #opObj10 = procUnitConfObj1.addOperation(name='selectFFTs') | |
53 |
opObj10.addParameter(name='n', value=' |
|
85 | #opObj10.addParameter(name='minFFT', value='-15', format='float') | |
|
86 | #opObj10.addParameter(name='maxFFT', value='15', format='float') | |||
54 |
|
87 | |||
|
88 | ||||
|
89 | ||||
|
90 | opObj10 = procUnitConfObj1.addOperation(name='SpectraWriter', optype='other') | |||
|
91 | opObj10.addParameter(name='blocksPerFile', value='64', format = 'int') | |||
|
92 | opObj10.addParameter(name='path', value=pathW) | |||
55 | #Using internal methods |
|
93 | # Using internal methods | |
56 | #schainpy.model.proc.jroproc_spectra.SpectraProc.selectChannels() |
|
94 | # schainpy.model.proc.jroproc_spectra.SpectraProc.selectChannels() | |
57 | # opObj10 = procUnitConfObj1.addOperation(name='selectChannels') |
|
95 | # opObj10 = procUnitConfObj1.addOperation(name='selectChannels') | |
@@ -73,21 +111,128 if __name__ == '__main__': | |||||
73 | opObj11 = procUnitConfObj1.addOperation(name='SpectraPlot', optype='external') |
|
111 | opObj11 = procUnitConfObj1.addOperation(name='SpectraPlot', optype='external') | |
74 | opObj11.addParameter(name='id', value='11', format='int') |
|
112 | opObj11.addParameter(name='id', value='11', format='int') | |
75 | opObj11.addParameter(name='wintitle', value='SpectraPlot', format='str') |
|
113 | opObj11.addParameter(name='wintitle', value='SpectraPlot', format='str') | |
76 |
opObj11.addParameter(name=' |
|
114 | opObj11.addParameter(name='xaxis', value='velocity', format='str') | |
77 |
opObj11.addParameter(name=' |
|
115 | # opObj11.addParameter(name='xmin', value='-10', format='int') | |
78 |
opObj11.addParameter(name=' |
|
116 | # opObj11.addParameter(name='xmax', value='10', format='int') | |
|
117 | ||||
|
118 | # opObj11.addParameter(name='ymin', value='1', format='float') | |||
|
119 | # opObj11.addParameter(name='ymax', value='3', format='int') | |||
|
120 | #opObj11.addParameter(name='zmin', value='10', format='int') | |||
|
121 | #opObj11.addParameter(name='zmax', value='35', format='int') | |||
|
122 | # opObj11.addParameter(name='save', value='2', format='int') | |||
|
123 | # opObj11.addParameter(name='save', value='5', format='int') | |||
|
124 | # opObj11.addParameter(name='figpath', value=figpath, format='str') | |||
|
125 | ||||
|
126 | ||||
|
127 | opObj11 = procUnitConfObj1.addOperation(name='CrossSpectraPlot', optype='other') | |||
|
128 | procUnitConfObj1.addParameter(name='pairsList', value='(0,1),(0,2),(1,2)', format='pairsList') | |||
|
129 | opObj11.addParameter(name='id', value='2005', format='int') | |||
|
130 | #opObj11.addParameter(name='wintitle', value='CrossSpectraPlot_ShortPulse', format='str') | |||
|
131 | #opObj11.addParameter(name='exp_code', value='13', format='int') | |||
|
132 | opObj11.addParameter(name='xaxis', value='Velocity', format='str') | |||
|
133 | #opObj11.addParameter(name='xmin', value='-6', format='float') | |||
|
134 | #opObj11.addParameter(name='xmax', value='6', format='float') | |||
|
135 | opObj11.addParameter(name='zmin', value='15', format='float') | |||
|
136 | opObj11.addParameter(name='zmax', value='50', format='float') | |||
|
137 | opObj11.addParameter(name='ymin', value='0', format='float') | |||
|
138 | opObj11.addParameter(name='ymax', value='7', format='float') | |||
|
139 | #opObj11.addParameter(name='phase_min', value='-4', format='int') | |||
|
140 | #opObj11.addParameter(name='phase_max', value='4', format='int') | |||
|
141 | # | |||
79 |
|
142 | |||
80 | #Using external methods (new modules) |
|
143 | # Using external methods (new modules) | |
81 | #schainpy.model.graphics.jroplot_spectra.RTIPlot.setup() |
|
144 | # schainpy.model.graphics.jroplot_spectra.RTIPlot.setup() | |
82 | opObj11 = procUnitConfObj1.addOperation(name='RTIPlot', optype='other') |
|
145 | opObj11 = procUnitConfObj1.addOperation(name='RTIPlot', optype='other') | |
83 | opObj11.addParameter(name='id', value='30', format='int') |
|
146 | opObj11.addParameter(name='id', value='30', format='int') | |
84 | opObj11.addParameter(name='wintitle', value='RTI', format='str') |
|
147 | opObj11.addParameter(name='wintitle', value='RTI', format='str') | |
85 |
opObj11.addParameter(name='zmin', value=' |
|
148 | opObj11.addParameter(name='zmin', value='15', format='int') | |
86 |
opObj11.addParameter(name='zmax', value=' |
|
149 | opObj11.addParameter(name='zmax', value='40', format='int') | |
|
150 | opObj11.addParameter(name='ymin', value='1', format='int') | |||
|
151 | opObj11.addParameter(name='ymax', value='7', format='int') | |||
87 | opObj11.addParameter(name='showprofile', value='1', format='int') |
|
152 | opObj11.addParameter(name='showprofile', value='1', format='int') | |
88 | # opObj11.addParameter(name='timerange', value=str(5*60*60*60), format='int') |
|
153 | # opObj11.addParameter(name='timerange', value=str(5*60*60*60), format='int') | |
89 |
opObj11.addParameter(name='xmin', value='1 |
|
154 | opObj11.addParameter(name='xmin', value='1', format='float') | |
90 |
opObj11.addParameter(name='xmax', value=' |
|
155 | opObj11.addParameter(name='xmax', value='6', format='float') | |
91 | opObj11.addParameter(name='save', value='1', format='int') |
|
156 | opObj11.addParameter(name='save', value='1', format='int') | |
92 |
|
|
157 | ||
|
158 | ||||
|
159 | # '''#########################################################################################''' | |||
|
160 | # | |||
|
161 | # | |||
|
162 | # procUnitConfObj2 = controllerObj.addProcUnit(datatype='Parameters', inputId=procUnitConfObj1.getId()) | |||
|
163 | # opObj11 = procUnitConfObj2.addOperation(name='SpectralMoments', optype='other') | |||
|
164 | # | |||
|
165 | # ''' | |||
|
166 | # # Discriminacion de ecos | |||
|
167 | # opObj11 = procUnitConfObj2.addOperation(name='GaussianFit', optype='other') | |||
|
168 | # opObj11.addParameter(name='SNRlimit', value='0', format='int') | |||
|
169 | # ''' | |||
|
170 | # | |||
|
171 | # ''' | |||
|
172 | # # Estimacion de Precipitacion | |||
|
173 | # opObj11 = procUnitConfObj2.addOperation(name='PrecipitationProc', optype='other') | |||
|
174 | # ''' | |||
|
175 | # | |||
|
176 | # opObj22 = procUnitConfObj2.addOperation(name='FullSpectralAnalysis', optype='other') | |||
|
177 | # | |||
|
178 | # opObj22.addParameter(name='SNRlimit', value='-10', format='float') | |||
|
179 | # opObj22.addParameter(name='E01', value='1.500', format='float') | |||
|
180 | # opObj22.addParameter(name='E02', value='1.500', format='float') | |||
|
181 | # opObj22.addParameter(name='E12', value='0', format='float') | |||
|
182 | # opObj22.addParameter(name='N01', value='0.875', format='float') | |||
|
183 | # opObj22.addParameter(name='N02', value='-0.875', format='float') | |||
|
184 | # opObj22.addParameter(name='N12', value='-1.750', format='float') | |||
|
185 | # | |||
|
186 | # | |||
|
187 | # opObj22 = procUnitConfObj2.addOperation(name='WindProfilerPlot', optype='other') | |||
|
188 | # opObj22.addParameter(name='id', value='4', format='int') | |||
|
189 | # opObj22.addParameter(name='wintitle', value='Wind Profiler', format='str') | |||
|
190 | # opObj22.addParameter(name='save', value='1', format='bool') | |||
|
191 | # opObj22.addParameter(name='xmin', value='0', format='float') | |||
|
192 | # opObj22.addParameter(name='xmax', value='6', format='float') | |||
|
193 | # opObj22.addParameter(name='ymin', value='1', format='float') | |||
|
194 | # opObj22.addParameter(name='ymax', value='3.5', format='float') | |||
|
195 | # opObj22.addParameter(name='zmin', value='-1', format='float') | |||
|
196 | # opObj22.addParameter(name='zmax', value='1', format='float') | |||
|
197 | # opObj22.addParameter(name='SNRmin', value='-15', format='float') | |||
|
198 | # opObj22.addParameter(name='SNRmax', value='20', format='float') | |||
|
199 | # opObj22.addParameter(name='zmin_ver', value='-200', format='float') | |||
|
200 | # opObj22.addParameter(name='zmax_ver', value='200', format='float') | |||
|
201 | # opObj22.addParameter(name='save', value='1', format='int') | |||
|
202 | # opObj22.addParameter(name='figpath', value=figpath, format='str') | |||
|
203 | # | |||
|
204 | # | |||
|
205 | # | |||
|
206 | # #opObj11.addParameter(name='zmin', value='75', format='int') | |||
|
207 | # | |||
|
208 | # #opObj12 = procUnitConfObj2.addOperation(name='ParametersPlot', optype='other') | |||
|
209 | # #opObj12.addParameter(name='id',value='4',format='int') | |||
|
210 | # #opObj12.addParameter(name='wintitle',value='First_gg',format='str') | |||
|
211 | # ''' | |||
|
212 | # #Ploteo de Discriminacion de Gaussianas | |||
|
213 | # | |||
|
214 | # opObj11 = procUnitConfObj2.addOperation(name='FitGauPlot', optype='other') | |||
|
215 | # opObj11.addParameter(name='id', value='21', format='int') | |||
|
216 | # opObj11.addParameter(name='wintitle', value='Rainfall Gaussian', format='str') | |||
|
217 | # opObj11.addParameter(name='xaxis', value='velocity', format='str') | |||
|
218 | # opObj11.addParameter(name='showprofile', value='1', format='int') | |||
|
219 | # opObj11.addParameter(name='zmin', value='75', format='int') | |||
|
220 | # opObj11.addParameter(name='zmax', value='100', format='int') | |||
|
221 | # opObj11.addParameter(name='GauSelector', value='1', format='int') | |||
|
222 | # #opObj11.addParameter(name='save', value='1', format='int') | |||
|
223 | # #opObj11.addParameter(name='figpath', value='/home/erick/Documents/Data/d2015106') | |||
|
224 | # | |||
|
225 | # opObj11 = procUnitConfObj2.addOperation(name='FitGauPlot', optype='other') | |||
|
226 | # opObj11.addParameter(name='id', value='22', format='int') | |||
|
227 | # opObj11.addParameter(name='wintitle', value='Wind Gaussian', format='str') | |||
|
228 | # opObj11.addParameter(name='xaxis', value='velocity', format='str') | |||
|
229 | # opObj11.addParameter(name='showprofile', value='1', format='int') | |||
|
230 | # opObj11.addParameter(name='zmin', value='75', format='int') | |||
|
231 | # opObj11.addParameter(name='zmax', value='100', format='int') | |||
|
232 | # opObj11.addParameter(name='GauSelector', value='0', format='int') | |||
|
233 | # ''' | |||
|
234 | # | |||
|
235 | # | |||
|
236 | ||||
|
237 | ||||
93 | controllerObj.start() |
|
238 | controllerObj.start() |
General Comments 0
You need to be logged in to leave comments.
Login now