@@ -130,7 +130,7 class SpcParamPlot(Figure): | |||
|
130 | 130 | xlabel = "Velocity (m/s)" |
|
131 | 131 | print "Vmax=",x[-1] |
|
132 | 132 | |
|
133 |
ylabel = "Range ( |
|
|
133 | ylabel = "Range (km)" | |
|
134 | 134 | |
|
135 | 135 | y = dataOut.getHeiRange() |
|
136 | 136 | |
@@ -801,7 +801,7 class ParametersPlot(Figure): | |||
|
801 | 801 | self.__nsubplots = 1 |
|
802 | 802 | |
|
803 | 803 | self.WIDTH = 800 |
|
804 |
self.HEIGHT = |
|
|
804 | self.HEIGHT = 250 | |
|
805 | 805 | self.WIDTHPROF = 120 |
|
806 | 806 | self.HEIGHTPROF = 0 |
|
807 | 807 | self.counter_imagwr = 0 |
@@ -138,7 +138,7 class SpectraPlot(Figure): | |||
|
138 | 138 | x = dataOut.getVelRange(1) |
|
139 | 139 | xlabel = "Velocity (m/s)" |
|
140 | 140 | |
|
141 |
ylabel = "Range ( |
|
|
141 | ylabel = "Range (km)" | |
|
142 | 142 | |
|
143 | 143 | y = dataOut.getHeiRange() |
|
144 | 144 | print 'dataOut.normFactor', dataOut.normFactor |
@@ -769,7 +769,7 class PrecipitationProc(Operation): | |||
|
769 | 769 | self.spc[2] = (self.spc[2]-dataOut.noise[2]) |
|
770 | 770 | |
|
771 | 771 | self.spc[ numpy.where(self.spc < 0)] = 0 |
|
772 |
|
|
|
772 | ||
|
773 | 773 | SPCmean = (numpy.mean(self.spc,0) - numpy.mean(dataOut.noise)) |
|
774 | 774 | SPCmean[ numpy.where(SPCmean < 0)] = 0 |
|
775 | 775 | |
@@ -795,7 +795,7 class PrecipitationProc(Operation): | |||
|
795 | 795 | Range = dataOut.heightList*1000. |
|
796 | 796 | |
|
797 | 797 | for R in range(self.Num_Hei): |
|
798 |
|
|
|
798 | ||
|
799 | 799 | h = Range[R] + Altitude #Range from ground to radar pulse altitude |
|
800 | 800 | del_V[R] = 1 + 3.68 * 10**-5 * h + 1.71 * 10**-9 * h**2 #Density change correction for velocity |
|
801 | 801 | |
@@ -825,17 +825,19 class PrecipitationProc(Operation): | |||
|
825 | 825 | except: |
|
826 | 826 | popt01=numpy.zeros(3) |
|
827 | 827 | popt01[1]= DMoments[1] |
|
828 | ||
|
828 | 829 | if popt01[1]<0 or popt01[1]>20: |
|
829 | 830 | popt01[1]=numpy.NaN |
|
830 |
|
|
|
831 | ||
|
832 | ||
|
831 | 833 | V_mean[R]=popt01[1] |
|
832 | ||
|
834 | ||
|
833 | 835 | Z[R] = numpy.nansum( N_dist[:,R] * (D_range[:,R])**6 )#*10**-18 |
|
834 | 836 | |
|
835 | 837 | RR[R] = 0.0006*numpy.pi * numpy.nansum( D_range[:,R]**3 * N_dist[:,R] * Velrange[0:self.Num_Bin] ) #Rainfall rate |
|
836 | ||
|
838 | ||
|
837 | 839 | Ze[R] = (numpy.nansum( ETAn[:,R]) * Lambda**4) / ( 10**-18*numpy.pi**5 * Km) |
|
838 | ||
|
840 | ||
|
839 | 841 | |
|
840 | 842 | |
|
841 | 843 | RR2 = (Z/200)**(1/1.6) |
@@ -852,7 +854,7 class PrecipitationProc(Operation): | |||
|
852 | 854 | dataOut.data_param[0]=dBZ |
|
853 | 855 | dataOut.data_param[1]=V_mean |
|
854 | 856 | dataOut.data_param[2]=RR |
|
855 |
|
|
|
857 | ||
|
856 | 858 | #print 'VELRANGE', Velrange |
|
857 | 859 | #print 'Range', len(Range) |
|
858 | 860 | #print 'delv',del_V |
@@ -947,7 +949,7 class FullSpectralAnalysis(Operation): | |||
|
947 | 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 | 954 | self.indice=int(numpy.random.rand()*1000) |
|
953 | 955 | |
@@ -962,7 +964,7 class FullSpectralAnalysis(Operation): | |||
|
962 | 964 | if dataOut.ChanDist is not None : |
|
963 | 965 | ChanDist = dataOut.ChanDist |
|
964 | 966 | else: |
|
965 |
ChanDist = numpy.array([[ |
|
|
967 | ChanDist = numpy.array([[Xi01, Eta01],[Xi02,Eta02],[Xi12,Eta12]]) | |
|
966 | 968 | |
|
967 | 969 | FrecRange = dataOut.spc_range[0] |
|
968 | 970 | |
@@ -1003,7 +1005,7 class FullSpectralAnalysis(Operation): | |||
|
1003 | 1005 | PhaseLine = numpy.append(PhaseLine, PhaseSlope) |
|
1004 | 1006 | |
|
1005 | 1007 | if abs(Vzon)<100. and abs(Vzon)> 0.: |
|
1006 |
velocityX=numpy.append(velocityX, |
|
|
1008 | velocityX=numpy.append(velocityX, Vzon)#Vmag | |
|
1007 | 1009 | |
|
1008 | 1010 | else: |
|
1009 | 1011 | #print 'Vzon',Vzon |
@@ -1030,7 +1032,7 class FullSpectralAnalysis(Operation): | |||
|
1030 | 1032 | |
|
1031 | 1033 | data_output[0] = numpy.array(velocityX) #self.moving_average(numpy.array(velocityX) , N=1) |
|
1032 | 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 | 1037 | print 'data_output', data_output.shape |
|
1036 | 1038 | #print FirstMoment |
@@ -1092,14 +1094,14 class FullSpectralAnalysis(Operation): | |||
|
1092 | 1094 | |
|
1093 | 1095 | '''Getting Eij and Nij''' |
|
1094 | 1096 | |
|
1095 |
|
|
|
1096 |
|
|
|
1097 | Xi01=ChanDist[0][0] | |
|
1098 | Eta01=ChanDist[0][1] | |
|
1097 | 1099 | |
|
1098 |
|
|
|
1099 |
|
|
|
1100 | Xi02=ChanDist[1][0] | |
|
1101 | Eta02=ChanDist[1][1] | |
|
1100 | 1102 | |
|
1101 |
|
|
|
1102 |
|
|
|
1103 | Xi12=ChanDist[2][0] | |
|
1104 | Eta12=ChanDist[2][1] | |
|
1103 | 1105 | |
|
1104 | 1106 | z = spc.copy() |
|
1105 | 1107 | z = numpy.where(numpy.isfinite(z), z, numpy.NAN) |
@@ -1315,7 +1317,7 class FullSpectralAnalysis(Operation): | |||
|
1315 | 1317 | cC=(Fij*numpy.pi)**2 |
|
1316 | 1318 | |
|
1317 | 1319 | '''****** Getting constants F and G ******''' |
|
1318 |
MijEijNij=numpy.array([[ |
|
|
1320 | MijEijNij=numpy.array([[Xi02,Eta02], [Xi12,Eta12]]) | |
|
1319 | 1321 | MijResult0=(-PhaseSlope[1]*cC) / (2*numpy.pi) |
|
1320 | 1322 | MijResult1=(-PhaseSlope[2]*cC) / (2*numpy.pi) |
|
1321 | 1323 | MijResults=numpy.array([MijResult0,MijResult1]) |
@@ -1326,13 +1328,13 class FullSpectralAnalysis(Operation): | |||
|
1326 | 1328 | W02=numpy.nanmax( FitGauss02 ) #numpy.abs(CSPCSamples[1])) |
|
1327 | 1329 | W12=numpy.nanmax( FitGauss12 ) #numpy.abs(CSPCSamples[2])) |
|
1328 | 1330 | |
|
1329 |
WijResult0=((cF* |
|
|
1330 |
WijResult1=((cF* |
|
|
1331 |
WijResult2=((cF* |
|
|
1331 | WijResult0=((cF*Xi01+cG*Eta01)**2)/cC - numpy.log(W01 / numpy.sqrt(numpy.pi/cC)) | |
|
1332 | WijResult1=((cF*Xi02+cG*Eta02)**2)/cC - numpy.log(W02 / numpy.sqrt(numpy.pi/cC)) | |
|
1333 | WijResult2=((cF*Xi12+cG*Eta12)**2)/cC - numpy.log(W12 / numpy.sqrt(numpy.pi/cC)) | |
|
1332 | 1334 | |
|
1333 | 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 | 1338 | (cA,cB,cH) = numpy.linalg.solve(WijEijNij, WijResults) |
|
1337 | 1339 | |
|
1338 | 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 | 4 | @author: roj- LouVD |
|
5 | 5 | ''' |
|
6 | 6 | import os, sys |
|
7 | from time import sleep | |
|
7 | 8 | |
|
8 | 9 | |
|
9 | 10 | path = os.path.split(os.getcwd())[0] |
@@ -15,49 +16,25 from schainpy.controller import Project | |||
|
15 | 16 | |
|
16 | 17 | filename = 'test1.xml' |
|
17 | 18 | # path = '/home/jespinoza/workspace/data/bltr/' |
|
18 |
path = '/ |
|
|
19 | path = '/data/BLTR/nuevos_datos/'#'/media/erick/6F60F7113095A154/BLTR/' | |
|
19 | 20 | desc = "read bltr data sswma file" |
|
20 | figpath = '/media/erick/6F60F7113095A154/BLTR/' | |
|
21 | figpath = '/data/BLTR/nuevos_datos/' | |
|
21 | 22 | pathhdf5 = '/tmp/' |
|
22 | 23 | |
|
23 | controllerObj = Project() | |
|
24 | ||
|
25 |
controller |
|
|
26 | readUnitConfObj = controllerObj.addReadUnit(datatype='BLTRParamReader', | |
|
27 | path=path, | |
|
28 | startDate='2017/01/17', | |
|
29 | endDate='2018/01/01', | |
|
30 | startTime='06:00:00', | |
|
31 | endTime='23:59:59', | |
|
32 | verbose=0, | |
|
33 | ) | |
|
34 | ||
|
35 | procUnitConfObj1 = controllerObj.addProcUnit(datatype='BLTRParametersProc', | |
|
36 | inputId=readUnitConfObj.getId()) | |
|
37 | ||
|
38 | procUnitConfObj1.addParameter(name='mode', value='1', format='int') | |
|
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() | |
|
24 | ||
|
25 | controller = Project() | |
|
26 | controller.setup(id = '195', name='test1', description=desc) | |
|
27 | receiver = controller.addProcUnit(name='PlotterReceiver') | |
|
28 | receiver.addParameter(name='plottypes', value='output') | |
|
29 | receiver.addParameter(name='localtime', value='0', format='int') | |
|
30 | ||
|
31 | op = receiver.addOperation(name='PlotWindProfilerData', optype='other') | |
|
32 | op.addParameter(name='save', value=figpath) | |
|
33 | op.addParameter(name='bgcolor', value='white') | |
|
34 | op.addParameter(name='localtime', value='0', format='int') | |
|
35 | op.addParameter(name='zlimits', value='(-20,20),(-20,20),(-2,2)', format='pairslist') | |
|
36 | ||
|
37 | controller.start() | |
|
38 | ||
|
39 | ||
|
63 | 40 |
General Comments 0
You need to be logged in to leave comments.
Login now