@@ -130,7 +130,7 class SpcParamPlot(Figure): | |||||
130 | xlabel = "Velocity (m/s)" |
|
130 | xlabel = "Velocity (m/s)" | |
131 | print "Vmax=",x[-1] |
|
131 | print "Vmax=",x[-1] | |
132 |
|
132 | |||
133 |
ylabel = "Range ( |
|
133 | ylabel = "Range (km)" | |
134 |
|
134 | |||
135 | y = dataOut.getHeiRange() |
|
135 | y = dataOut.getHeiRange() | |
136 |
|
136 | |||
@@ -801,7 +801,7 class ParametersPlot(Figure): | |||||
801 | self.__nsubplots = 1 |
|
801 | self.__nsubplots = 1 | |
802 |
|
802 | |||
803 | self.WIDTH = 800 |
|
803 | self.WIDTH = 800 | |
804 |
self.HEIGHT = |
|
804 | self.HEIGHT = 250 | |
805 | self.WIDTHPROF = 120 |
|
805 | self.WIDTHPROF = 120 | |
806 | self.HEIGHTPROF = 0 |
|
806 | self.HEIGHTPROF = 0 | |
807 | self.counter_imagwr = 0 |
|
807 | self.counter_imagwr = 0 |
@@ -138,7 +138,7 class SpectraPlot(Figure): | |||||
138 | x = dataOut.getVelRange(1) |
|
138 | x = dataOut.getVelRange(1) | |
139 | xlabel = "Velocity (m/s)" |
|
139 | xlabel = "Velocity (m/s)" | |
140 |
|
140 | |||
141 |
ylabel = "Range ( |
|
141 | ylabel = "Range (km)" | |
142 |
|
142 | |||
143 | y = dataOut.getHeiRange() |
|
143 | y = dataOut.getHeiRange() | |
144 | print 'dataOut.normFactor', dataOut.normFactor |
|
144 | print 'dataOut.normFactor', dataOut.normFactor |
@@ -825,9 +825,11 class PrecipitationProc(Operation): | |||||
825 | except: |
|
825 | except: | |
826 | popt01=numpy.zeros(3) |
|
826 | popt01=numpy.zeros(3) | |
827 | popt01[1]= DMoments[1] |
|
827 | popt01[1]= DMoments[1] | |
|
828 | ||||
828 | if popt01[1]<0 or popt01[1]>20: |
|
829 | if popt01[1]<0 or popt01[1]>20: | |
829 | popt01[1]=numpy.NaN |
|
830 | popt01[1]=numpy.NaN | |
830 |
|
831 | |||
|
832 | ||||
831 | V_mean[R]=popt01[1] |
|
833 | V_mean[R]=popt01[1] | |
832 |
|
834 | |||
833 | Z[R] = numpy.nansum( N_dist[:,R] * (D_range[:,R])**6 )#*10**-18 |
|
835 | Z[R] = numpy.nansum( N_dist[:,R] * (D_range[:,R])**6 )#*10**-18 | |
@@ -947,7 +949,7 class FullSpectralAnalysis(Operation): | |||||
947 | Parameters affected: Winds, height range, SNR |
|
949 | Parameters affected: Winds, height range, SNR | |
948 |
|
950 | |||
949 | """ |
|
951 | """ | |
950 |
def run(self, dataOut, |
|
952 | def run(self, dataOut, Xi01=None, Xi02=None, Xi12=None, Eta01=None, Eta02=None, Eta12=None, SNRlimit=7): | |
951 |
|
953 | |||
952 | self.indice=int(numpy.random.rand()*1000) |
|
954 | self.indice=int(numpy.random.rand()*1000) | |
953 |
|
955 | |||
@@ -962,7 +964,7 class FullSpectralAnalysis(Operation): | |||||
962 | if dataOut.ChanDist is not None : |
|
964 | if dataOut.ChanDist is not None : | |
963 | ChanDist = dataOut.ChanDist |
|
965 | ChanDist = dataOut.ChanDist | |
964 | else: |
|
966 | else: | |
965 |
ChanDist = numpy.array([[ |
|
967 | ChanDist = numpy.array([[Xi01, Eta01],[Xi02,Eta02],[Xi12,Eta12]]) | |
966 |
|
968 | |||
967 | FrecRange = dataOut.spc_range[0] |
|
969 | FrecRange = dataOut.spc_range[0] | |
968 |
|
970 | |||
@@ -1003,7 +1005,7 class FullSpectralAnalysis(Operation): | |||||
1003 | PhaseLine = numpy.append(PhaseLine, PhaseSlope) |
|
1005 | PhaseLine = numpy.append(PhaseLine, PhaseSlope) | |
1004 |
|
1006 | |||
1005 | if abs(Vzon)<100. and abs(Vzon)> 0.: |
|
1007 | if abs(Vzon)<100. and abs(Vzon)> 0.: | |
1006 |
velocityX=numpy.append(velocityX, |
|
1008 | velocityX=numpy.append(velocityX, Vzon)#Vmag | |
1007 |
|
1009 | |||
1008 | else: |
|
1010 | else: | |
1009 | #print 'Vzon',Vzon |
|
1011 | #print 'Vzon',Vzon | |
@@ -1030,7 +1032,7 class FullSpectralAnalysis(Operation): | |||||
1030 |
|
1032 | |||
1031 | data_output[0] = numpy.array(velocityX) #self.moving_average(numpy.array(velocityX) , N=1) |
|
1033 | data_output[0] = numpy.array(velocityX) #self.moving_average(numpy.array(velocityX) , N=1) | |
1032 | data_output[1] = numpy.array(velocityY) #self.moving_average(numpy.array(velocityY) , N=1) |
|
1034 | data_output[1] = numpy.array(velocityY) #self.moving_average(numpy.array(velocityY) , N=1) | |
1033 |
data_output[2] = |
|
1035 | data_output[2] = velocityV#FirstMoment | |
1034 |
|
1036 | |||
1035 | print 'data_output', data_output.shape |
|
1037 | print 'data_output', data_output.shape | |
1036 | #print FirstMoment |
|
1038 | #print FirstMoment | |
@@ -1092,14 +1094,14 class FullSpectralAnalysis(Operation): | |||||
1092 |
|
1094 | |||
1093 | '''Getting Eij and Nij''' |
|
1095 | '''Getting Eij and Nij''' | |
1094 |
|
1096 | |||
1095 |
|
|
1097 | Xi01=ChanDist[0][0] | |
1096 |
|
|
1098 | Eta01=ChanDist[0][1] | |
1097 |
|
1099 | |||
1098 |
|
|
1100 | Xi02=ChanDist[1][0] | |
1099 |
|
|
1101 | Eta02=ChanDist[1][1] | |
1100 |
|
1102 | |||
1101 |
|
|
1103 | Xi12=ChanDist[2][0] | |
1102 |
|
|
1104 | Eta12=ChanDist[2][1] | |
1103 |
|
1105 | |||
1104 | z = spc.copy() |
|
1106 | z = spc.copy() | |
1105 | z = numpy.where(numpy.isfinite(z), z, numpy.NAN) |
|
1107 | z = numpy.where(numpy.isfinite(z), z, numpy.NAN) | |
@@ -1315,7 +1317,7 class FullSpectralAnalysis(Operation): | |||||
1315 | cC=(Fij*numpy.pi)**2 |
|
1317 | cC=(Fij*numpy.pi)**2 | |
1316 |
|
1318 | |||
1317 | '''****** Getting constants F and G ******''' |
|
1319 | '''****** Getting constants F and G ******''' | |
1318 |
MijEijNij=numpy.array([[ |
|
1320 | MijEijNij=numpy.array([[Xi02,Eta02], [Xi12,Eta12]]) | |
1319 | MijResult0=(-PhaseSlope[1]*cC) / (2*numpy.pi) |
|
1321 | MijResult0=(-PhaseSlope[1]*cC) / (2*numpy.pi) | |
1320 | MijResult1=(-PhaseSlope[2]*cC) / (2*numpy.pi) |
|
1322 | MijResult1=(-PhaseSlope[2]*cC) / (2*numpy.pi) | |
1321 | MijResults=numpy.array([MijResult0,MijResult1]) |
|
1323 | MijResults=numpy.array([MijResult0,MijResult1]) | |
@@ -1326,13 +1328,13 class FullSpectralAnalysis(Operation): | |||||
1326 | W02=numpy.nanmax( FitGauss02 ) #numpy.abs(CSPCSamples[1])) |
|
1328 | W02=numpy.nanmax( FitGauss02 ) #numpy.abs(CSPCSamples[1])) | |
1327 | W12=numpy.nanmax( FitGauss12 ) #numpy.abs(CSPCSamples[2])) |
|
1329 | W12=numpy.nanmax( FitGauss12 ) #numpy.abs(CSPCSamples[2])) | |
1328 |
|
1330 | |||
1329 |
WijResult0=((cF* |
|
1331 | WijResult0=((cF*Xi01+cG*Eta01)**2)/cC - numpy.log(W01 / numpy.sqrt(numpy.pi/cC)) | |
1330 |
WijResult1=((cF* |
|
1332 | WijResult1=((cF*Xi02+cG*Eta02)**2)/cC - numpy.log(W02 / numpy.sqrt(numpy.pi/cC)) | |
1331 |
WijResult2=((cF* |
|
1333 | WijResult2=((cF*Xi12+cG*Eta12)**2)/cC - numpy.log(W12 / numpy.sqrt(numpy.pi/cC)) | |
1332 |
|
1334 | |||
1333 | WijResults=numpy.array([WijResult0, WijResult1, WijResult2]) |
|
1335 | WijResults=numpy.array([WijResult0, WijResult1, WijResult2]) | |
1334 |
|
1336 | |||
1335 |
WijEijNij=numpy.array([ [ |
|
1337 | WijEijNij=numpy.array([ [Xi01**2, Eta01**2, 2*Xi01*Eta01] , [Xi02**2, Eta02**2, 2*Xi02*Eta02] , [Xi12**2, Eta12**2, 2*Xi12*Eta12] ]) | |
1336 | (cA,cB,cH) = numpy.linalg.solve(WijEijNij, WijResults) |
|
1338 | (cA,cB,cH) = numpy.linalg.solve(WijEijNij, WijResults) | |
1337 |
|
1339 | |||
1338 | VxVy=numpy.array([[cA,cH],[cH,cB]]) |
|
1340 | VxVy=numpy.array([[cA,cH],[cH,cB]]) |
@@ -1,1 +1,1 | |||||
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="/data/CLAIRE/CLAIRE_WINDS_2MHZ/DATA/pdataCLAIRE/ |
|
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="/data/CLAIRE/CLAIRE_WINDS_2MHZ/DATA/pdataCLAIRE/2018" /><Parameter format="date" id="191113" name="startDate" value="2018/01/26" /><Parameter format="date" id="191114" name="endDate" value="2018/01/26" /><Parameter format="time" id="191115" name="startTime" value="17:45:00" /><Parameter format="time" id="191116" name="endTime" value="23:59:00" /><Parameter format="int" id="191118" name="online" value="0" /><Parameter format="int" id="191119" name="walk" value="1" /></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="SpectralFilters" priority="2" type="other"><Parameter format="float" id="191321" name="PositiveLimit" value="1.5" /><Parameter format="float" id="191322" name="NegativeLimit" value="12.5" /></Operation><Operation id="19133" name="PrecipitationProc" priority="3" type="other" /><Operation id="19134" name="ParametersPlot" priority="4" type="other"><Parameter format="int" id="191341" name="id" value="10" /><Parameter format="str" id="191342" name="wintitle" value="First_gg" /><Parameter format="str" id="191343" name="colormap" value="ocean_r" /><Parameter format="int" id="191344" name="zmin" value="00" /><Parameter format="int" id="191345" name="zmax" value="40" /><Parameter format="int" id="191346" name="ymin" value="0" /><Parameter format="int" id="191347" name="ymax" value="11" /><Parameter format="int" id="191348" name="xmin" value="17" /><Parameter format="int" id="191349" name="xmax" value="24" /><Parameter format="int" id="191350" name="save" value="1" /><Parameter format="str" id="191351" name="figpath" value="/data/CLAIRE/CLAIRE_WINDS_2MHZ/DATA/pdataCLAIRE/2018" /></Operation><Operation id="19135" name="SpcParamPlot" priority="5" type="other"><Parameter format="int" id="191351" name="id" value="21" /><Parameter format="str" id="191352" name="wintitle" value="Primer eco removido" /><Parameter format="str" id="191353" name="xaxis" value="velocity" /><Parameter format="int" id="191354" name="showprofile" value="1" /><Parameter format="int" id="191355" name="zmin" value="10" /><Parameter format="int" id="191356" name="zmax" value="40" /><Parameter format="int" id="191357" name="ymin" value="0" /><Parameter format="int" id="191358" name="ymax" value="10" /><Parameter format="int" id="191359" name="Selector" value="1" /></Operation></ProcUnit><ProcUnit datatype="SpectraProc" id="1912" inputId="1911" name="SpectraProc"><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></ProcUnit></Project> No newline at end of file |
@@ -4,6 +4,7 Created on Nov 09, 2016 | |||||
4 | @author: roj- LouVD |
|
4 | @author: roj- LouVD | |
5 | ''' |
|
5 | ''' | |
6 | import os, sys |
|
6 | import os, sys | |
|
7 | from time import sleep | |||
7 |
|
8 | |||
8 |
|
9 | |||
9 | path = os.path.split(os.getcwd())[0] |
|
10 | path = os.path.split(os.getcwd())[0] | |
@@ -15,49 +16,25 from schainpy.controller import Project | |||||
15 |
|
16 | |||
16 | filename = 'test1.xml' |
|
17 | filename = 'test1.xml' | |
17 | # path = '/home/jespinoza/workspace/data/bltr/' |
|
18 | # path = '/home/jespinoza/workspace/data/bltr/' | |
18 |
path = '/ |
|
19 | path = '/data/BLTR/nuevos_datos/'#'/media/erick/6F60F7113095A154/BLTR/' | |
19 | desc = "read bltr data sswma file" |
|
20 | desc = "read bltr data sswma file" | |
20 | figpath = '/media/erick/6F60F7113095A154/BLTR/' |
|
21 | figpath = '/data/BLTR/nuevos_datos/' | |
21 | pathhdf5 = '/tmp/' |
|
22 | pathhdf5 = '/tmp/' | |
22 |
|
23 | |||
23 | controllerObj = Project() |
|
24 | ||
24 |
|
25 | controller = Project() | ||
25 |
controller |
|
26 | controller.setup(id = '195', name='test1', description=desc) | |
26 | readUnitConfObj = controllerObj.addReadUnit(datatype='BLTRParamReader', |
|
27 | receiver = controller.addProcUnit(name='PlotterReceiver') | |
27 | path=path, |
|
28 | receiver.addParameter(name='plottypes', value='output') | |
28 | startDate='2017/01/17', |
|
29 | receiver.addParameter(name='localtime', value='0', format='int') | |
29 | endDate='2018/01/01', |
|
30 | ||
30 | startTime='06:00:00', |
|
31 | op = receiver.addOperation(name='PlotWindProfilerData', optype='other') | |
31 | endTime='23:59:59', |
|
32 | op.addParameter(name='save', value=figpath) | |
32 | verbose=0, |
|
33 | op.addParameter(name='bgcolor', value='white') | |
33 | ) |
|
34 | op.addParameter(name='localtime', value='0', format='int') | |
34 |
|
35 | op.addParameter(name='zlimits', value='(-20,20),(-20,20),(-2,2)', format='pairslist') | ||
35 | procUnitConfObj1 = controllerObj.addProcUnit(datatype='BLTRParametersProc', |
|
36 | ||
36 | inputId=readUnitConfObj.getId()) |
|
37 | controller.start() | |
37 |
|
38 | |||
38 | procUnitConfObj1.addParameter(name='mode', value='1', format='int') |
|
39 | ||
39 | # procUnitConfObj1.addParameter(name='snr_threshold', value='10', format='float') |
|
|||
40 |
|
||||
41 |
|
||||
42 | opObj10 = procUnitConfObj1.addOperation(name='WindProfilerPlot', optype='other') |
|
|||
43 | opObj10.addParameter(name='id', value='2', format='int') |
|
|||
44 | opObj10.addParameter(name='wintitle', value='', format='str') |
|
|||
45 |
|
||||
46 | # opObj10.addParameter(name='save', value='1', format='bool') |
|
|||
47 | # opObj10.addParameter(name='figpath', value=figpath, format='str') |
|
|||
48 | opObj10.addParameter(name='SNRmin', value='-20', format='int') |
|
|||
49 | opObj10.addParameter(name='SNRmax', value='40', format='int') |
|
|||
50 | opObj10.addParameter(name='SNRthresh', value='0', format='float') |
|
|||
51 | opObj10.addParameter(name='xmin', value='0', format='float') |
|
|||
52 | opObj10.addParameter(name='xmax', value='24', format='float') |
|
|||
53 | opObj10.addParameter(name='ymin', value='0', format='float') |
|
|||
54 | opObj10.addParameter(name='ymax', value='7', format='float') |
|
|||
55 | opObj10.addParameter(name='zmin', value='-4', format='float') |
|
|||
56 | opObj10.addParameter(name='zmax', value='4', format='float') |
|
|||
57 | opObj10.addParameter(name='zmin_ver', value='-200', format='float') |
|
|||
58 | opObj10.addParameter(name='zmax_ver', value='200', format='float') |
|
|||
59 | #opObj10.addParameter(name='showprofile', value='1', format='bool') |
|
|||
60 | #opObj10.addParameter(name='show', value='1', format='bool') |
|
|||
61 |
|
||||
62 | controllerObj.start() |
|
|||
63 |
|
40 |
General Comments 0
You need to be logged in to leave comments.
Login now