The requested changes are too big and content was truncated. Show full diff
@@ -0,0 +1,55 | |||||
|
1 | print("LECTURA DE ARCHIVOS DE CONFIGURACION") | |||
|
2 | class ReadfileWR(): | |||
|
3 | def __init__(self,filename): | |||
|
4 | f = open(filename, "r") | |||
|
5 | i=0 | |||
|
6 | self.dict={'resolution':None,'vel_ped_azi':None,'pos_ped_ele':None,'ipp':None,'n':None,'len_ped':None,\ | |||
|
7 | 't_s_ped':None,'t_f_ped':None,'b_f_adq':None,'t_f_adq':None,'mode':None} | |||
|
8 | while(True): | |||
|
9 | ##print(i) | |||
|
10 | linea = f.readline() | |||
|
11 | if i==4: | |||
|
12 | resolution=float(linea) | |||
|
13 | self.dict['resolution']=resolution | |||
|
14 | if i==6: | |||
|
15 | vel_pedestal_a=float(linea) | |||
|
16 | self.dict['vel_ped_azi']=vel_pedestal_a | |||
|
17 | if i==8: | |||
|
18 | vel_pedestal_e=float(linea) | |||
|
19 | self.dict['pos_ped_ele']=vel_pedestal_e | |||
|
20 | if i==10: | |||
|
21 | ipp = float(linea) | |||
|
22 | self.dict['ipp']= round(ipp,5) | |||
|
23 | if i==12: | |||
|
24 | n = float(linea) | |||
|
25 | self.dict['n']= n | |||
|
26 | if i==14: | |||
|
27 | len_pedestal= float(linea) | |||
|
28 | self.dict['len_ped']= len_pedestal | |||
|
29 | if i==16: | |||
|
30 | time_x_sample_ped=float(linea) | |||
|
31 | self.dict['t_s_ped']= time_x_sample_ped | |||
|
32 | if i==18: | |||
|
33 | time_x_file_ped = float(linea) | |||
|
34 | self.dict['t_f_ped']= time_x_file_ped | |||
|
35 | if i==20: | |||
|
36 | bloques_x_file_adq= float(linea) | |||
|
37 | self.dict['b_f_adq']=bloques_x_file_adq | |||
|
38 | if i==22: | |||
|
39 | time_x_file_adq = float(linea) | |||
|
40 | self.dict['t_f_adq'] = time_x_file_adq | |||
|
41 | if i==24: | |||
|
42 | mode= int(linea) | |||
|
43 | self.dict['mode'] = mode | |||
|
44 | #print(linea) | |||
|
45 | if not linea: | |||
|
46 | break | |||
|
47 | i+=1 | |||
|
48 | f.close() | |||
|
49 | def getDict(self): | |||
|
50 | return self.dict | |||
|
51 | ||||
|
52 | ||||
|
53 | filename= "/home/developer/Downloads/config_WR.txt" | |||
|
54 | dict= ReadfileWR(filename).getDict() | |||
|
55 | print(dict) |
@@ -1,565 +1,567 | |||||
1 | import os |
|
1 | import os | |
2 | import datetime |
|
2 | import datetime | |
3 | import numpy |
|
3 | import numpy | |
4 |
|
4 | |||
5 | from schainpy.model.graphics.jroplot_base import Plot, plt |
|
5 | from schainpy.model.graphics.jroplot_base import Plot, plt | |
6 | from schainpy.model.graphics.jroplot_spectra import SpectraPlot, RTIPlot, CoherencePlot |
|
6 | from schainpy.model.graphics.jroplot_spectra import SpectraPlot, RTIPlot, CoherencePlot | |
7 | from schainpy.utils import log |
|
7 | from schainpy.utils import log | |
8 | import wradlib as wrl |
|
8 | import wradlib as wrl | |
9 |
|
9 | |||
10 | EARTH_RADIUS = 6.3710e3 |
|
10 | EARTH_RADIUS = 6.3710e3 | |
11 |
|
11 | |||
12 |
|
12 | |||
13 | def ll2xy(lat1, lon1, lat2, lon2): |
|
13 | def ll2xy(lat1, lon1, lat2, lon2): | |
14 |
|
14 | |||
15 | p = 0.017453292519943295 |
|
15 | p = 0.017453292519943295 | |
16 | a = 0.5 - numpy.cos((lat2 - lat1) * p)/2 + numpy.cos(lat1 * p) * \ |
|
16 | a = 0.5 - numpy.cos((lat2 - lat1) * p)/2 + numpy.cos(lat1 * p) * \ | |
17 | numpy.cos(lat2 * p) * (1 - numpy.cos((lon2 - lon1) * p)) / 2 |
|
17 | numpy.cos(lat2 * p) * (1 - numpy.cos((lon2 - lon1) * p)) / 2 | |
18 | r = 12742 * numpy.arcsin(numpy.sqrt(a)) |
|
18 | r = 12742 * numpy.arcsin(numpy.sqrt(a)) | |
19 | theta = numpy.arctan2(numpy.sin((lon2-lon1)*p)*numpy.cos(lat2*p), numpy.cos(lat1*p) |
|
19 | theta = numpy.arctan2(numpy.sin((lon2-lon1)*p)*numpy.cos(lat2*p), numpy.cos(lat1*p) | |
20 | * numpy.sin(lat2*p)-numpy.sin(lat1*p)*numpy.cos(lat2*p)*numpy.cos((lon2-lon1)*p)) |
|
20 | * numpy.sin(lat2*p)-numpy.sin(lat1*p)*numpy.cos(lat2*p)*numpy.cos((lon2-lon1)*p)) | |
21 | theta = -theta + numpy.pi/2 |
|
21 | theta = -theta + numpy.pi/2 | |
22 | return r*numpy.cos(theta), r*numpy.sin(theta) |
|
22 | return r*numpy.cos(theta), r*numpy.sin(theta) | |
23 |
|
23 | |||
24 |
|
24 | |||
25 | def km2deg(km): |
|
25 | def km2deg(km): | |
26 | ''' |
|
26 | ''' | |
27 | Convert distance in km to degrees |
|
27 | Convert distance in km to degrees | |
28 | ''' |
|
28 | ''' | |
29 |
|
29 | |||
30 | return numpy.rad2deg(km/EARTH_RADIUS) |
|
30 | return numpy.rad2deg(km/EARTH_RADIUS) | |
31 |
|
31 | |||
32 |
|
32 | |||
33 |
|
33 | |||
34 | class SpectralMomentsPlot(SpectraPlot): |
|
34 | class SpectralMomentsPlot(SpectraPlot): | |
35 | ''' |
|
35 | ''' | |
36 | Plot for Spectral Moments |
|
36 | Plot for Spectral Moments | |
37 | ''' |
|
37 | ''' | |
38 | CODE = 'spc_moments' |
|
38 | CODE = 'spc_moments' | |
39 | colormap = 'jet' |
|
39 | colormap = 'jet' | |
40 | plot_type = 'pcolor' |
|
40 | plot_type = 'pcolor' | |
41 |
|
41 | |||
42 |
|
42 | |||
43 | class SnrPlot(RTIPlot): |
|
43 | class SnrPlot(RTIPlot): | |
44 | ''' |
|
44 | ''' | |
45 | Plot for SNR Data |
|
45 | Plot for SNR Data | |
46 | ''' |
|
46 | ''' | |
47 |
|
47 | |||
48 | CODE = 'snr' |
|
48 | CODE = 'snr' | |
49 | colormap = 'jet' |
|
49 | colormap = 'jet' | |
50 |
|
50 | |||
51 | def update(self, dataOut): |
|
51 | def update(self, dataOut): | |
52 |
|
52 | |||
53 | data = { |
|
53 | data = { | |
54 | 'snr': 10*numpy.log10(dataOut.data_snr) |
|
54 | 'snr': 10*numpy.log10(dataOut.data_snr) | |
55 | } |
|
55 | } | |
56 |
|
56 | |||
57 | return data, {} |
|
57 | return data, {} | |
58 |
|
58 | |||
59 | class DopplerPlot(RTIPlot): |
|
59 | class DopplerPlot(RTIPlot): | |
60 | ''' |
|
60 | ''' | |
61 | Plot for DOPPLER Data (1st moment) |
|
61 | Plot for DOPPLER Data (1st moment) | |
62 | ''' |
|
62 | ''' | |
63 |
|
63 | |||
64 | CODE = 'dop' |
|
64 | CODE = 'dop' | |
65 | colormap = 'jet' |
|
65 | colormap = 'jet' | |
66 |
|
66 | |||
67 | def update(self, dataOut): |
|
67 | def update(self, dataOut): | |
68 |
|
68 | |||
69 | data = { |
|
69 | data = { | |
70 | 'dop': 10*numpy.log10(dataOut.data_dop) |
|
70 | 'dop': 10*numpy.log10(dataOut.data_dop) | |
71 | } |
|
71 | } | |
72 |
|
72 | |||
73 | return data, {} |
|
73 | return data, {} | |
74 |
|
74 | |||
75 | class PowerPlot(RTIPlot): |
|
75 | class PowerPlot(RTIPlot): | |
76 | ''' |
|
76 | ''' | |
77 | Plot for Power Data (0 moment) |
|
77 | Plot for Power Data (0 moment) | |
78 | ''' |
|
78 | ''' | |
79 |
|
79 | |||
80 | CODE = 'pow' |
|
80 | CODE = 'pow' | |
81 | colormap = 'jet' |
|
81 | colormap = 'jet' | |
82 |
|
82 | |||
83 | def update(self, dataOut): |
|
83 | def update(self, dataOut): | |
84 |
|
84 | |||
85 | data = { |
|
85 | data = { | |
86 | 'pow': 10*numpy.log10(dataOut.data_pow) |
|
86 | 'pow': 10*numpy.log10(dataOut.data_pow) | |
87 | } |
|
87 | } | |
88 |
|
88 | |||
89 | return data, {} |
|
89 | return data, {} | |
90 |
|
90 | |||
91 | class SpectralWidthPlot(RTIPlot): |
|
91 | class SpectralWidthPlot(RTIPlot): | |
92 | ''' |
|
92 | ''' | |
93 | Plot for Spectral Width Data (2nd moment) |
|
93 | Plot for Spectral Width Data (2nd moment) | |
94 | ''' |
|
94 | ''' | |
95 |
|
95 | |||
96 | CODE = 'width' |
|
96 | CODE = 'width' | |
97 | colormap = 'jet' |
|
97 | colormap = 'jet' | |
98 |
|
98 | |||
99 | def update(self, dataOut): |
|
99 | def update(self, dataOut): | |
100 |
|
100 | |||
101 | data = { |
|
101 | data = { | |
102 | 'width': dataOut.data_width |
|
102 | 'width': dataOut.data_width | |
103 | } |
|
103 | } | |
104 |
|
104 | |||
105 | return data, {} |
|
105 | return data, {} | |
106 |
|
106 | |||
107 | class SkyMapPlot(Plot): |
|
107 | class SkyMapPlot(Plot): | |
108 | ''' |
|
108 | ''' | |
109 | Plot for meteors detection data |
|
109 | Plot for meteors detection data | |
110 | ''' |
|
110 | ''' | |
111 |
|
111 | |||
112 | CODE = 'param' |
|
112 | CODE = 'param' | |
113 |
|
113 | |||
114 | def setup(self): |
|
114 | def setup(self): | |
115 |
|
115 | |||
116 | self.ncols = 1 |
|
116 | self.ncols = 1 | |
117 | self.nrows = 1 |
|
117 | self.nrows = 1 | |
118 | self.width = 7.2 |
|
118 | self.width = 7.2 | |
119 | self.height = 7.2 |
|
119 | self.height = 7.2 | |
120 | self.nplots = 1 |
|
120 | self.nplots = 1 | |
121 | self.xlabel = 'Zonal Zenith Angle (deg)' |
|
121 | self.xlabel = 'Zonal Zenith Angle (deg)' | |
122 | self.ylabel = 'Meridional Zenith Angle (deg)' |
|
122 | self.ylabel = 'Meridional Zenith Angle (deg)' | |
123 | self.polar = True |
|
123 | self.polar = True | |
124 | self.ymin = -180 |
|
124 | self.ymin = -180 | |
125 | self.ymax = 180 |
|
125 | self.ymax = 180 | |
126 | self.colorbar = False |
|
126 | self.colorbar = False | |
127 |
|
127 | |||
128 | def plot(self): |
|
128 | def plot(self): | |
129 |
|
129 | |||
130 | arrayParameters = numpy.concatenate(self.data['param']) |
|
130 | arrayParameters = numpy.concatenate(self.data['param']) | |
131 | error = arrayParameters[:, -1] |
|
131 | error = arrayParameters[:, -1] | |
132 | indValid = numpy.where(error == 0)[0] |
|
132 | indValid = numpy.where(error == 0)[0] | |
133 | finalMeteor = arrayParameters[indValid, :] |
|
133 | finalMeteor = arrayParameters[indValid, :] | |
134 | finalAzimuth = finalMeteor[:, 3] |
|
134 | finalAzimuth = finalMeteor[:, 3] | |
135 | finalZenith = finalMeteor[:, 4] |
|
135 | finalZenith = finalMeteor[:, 4] | |
136 |
|
136 | |||
137 | x = finalAzimuth * numpy.pi / 180 |
|
137 | x = finalAzimuth * numpy.pi / 180 | |
138 | y = finalZenith |
|
138 | y = finalZenith | |
139 |
|
139 | |||
140 | ax = self.axes[0] |
|
140 | ax = self.axes[0] | |
141 |
|
141 | |||
142 | if ax.firsttime: |
|
142 | if ax.firsttime: | |
143 | ax.plot = ax.plot(x, y, 'bo', markersize=5)[0] |
|
143 | ax.plot = ax.plot(x, y, 'bo', markersize=5)[0] | |
144 | else: |
|
144 | else: | |
145 | ax.plot.set_data(x, y) |
|
145 | ax.plot.set_data(x, y) | |
146 |
|
146 | |||
147 | dt1 = self.getDateTime(self.data.min_time).strftime('%y/%m/%d %H:%M:%S') |
|
147 | dt1 = self.getDateTime(self.data.min_time).strftime('%y/%m/%d %H:%M:%S') | |
148 | dt2 = self.getDateTime(self.data.max_time).strftime('%y/%m/%d %H:%M:%S') |
|
148 | dt2 = self.getDateTime(self.data.max_time).strftime('%y/%m/%d %H:%M:%S') | |
149 | title = 'Meteor Detection Sky Map\n %s - %s \n Number of events: %5.0f\n' % (dt1, |
|
149 | title = 'Meteor Detection Sky Map\n %s - %s \n Number of events: %5.0f\n' % (dt1, | |
150 | dt2, |
|
150 | dt2, | |
151 | len(x)) |
|
151 | len(x)) | |
152 | self.titles[0] = title |
|
152 | self.titles[0] = title | |
153 |
|
153 | |||
154 |
|
154 | |||
155 | class GenericRTIPlot(Plot): |
|
155 | class GenericRTIPlot(Plot): | |
156 | ''' |
|
156 | ''' | |
157 | Plot for data_xxxx object |
|
157 | Plot for data_xxxx object | |
158 | ''' |
|
158 | ''' | |
159 |
|
159 | |||
160 | CODE = 'param' |
|
160 | CODE = 'param' | |
161 | colormap = 'viridis' |
|
161 | colormap = 'viridis' | |
162 | plot_type = 'pcolorbuffer' |
|
162 | plot_type = 'pcolorbuffer' | |
163 |
|
163 | |||
164 | def setup(self): |
|
164 | def setup(self): | |
165 | self.xaxis = 'time' |
|
165 | self.xaxis = 'time' | |
166 | self.ncols = 1 |
|
166 | self.ncols = 1 | |
167 | self.nrows = self.data.shape(self.attr_data)[0] |
|
167 | self.nrows = self.data.shape(self.attr_data)[0] | |
168 | self.nplots = self.nrows |
|
168 | self.nplots = self.nrows | |
169 | self.plots_adjust.update({'hspace':0.8, 'left': 0.1, 'bottom': 0.08, 'right':0.95, 'top': 0.95}) |
|
169 | self.plots_adjust.update({'hspace':0.8, 'left': 0.1, 'bottom': 0.08, 'right':0.95, 'top': 0.95}) | |
170 |
|
170 | |||
171 | if not self.xlabel: |
|
171 | if not self.xlabel: | |
172 | self.xlabel = 'Time' |
|
172 | self.xlabel = 'Time' | |
173 |
|
173 | |||
174 | self.ylabel = 'Height [km]' |
|
174 | self.ylabel = 'Height [km]' | |
175 | if not self.titles: |
|
175 | if not self.titles: | |
176 | self.titles = self.data.parameters \ |
|
176 | self.titles = self.data.parameters \ | |
177 | if self.data.parameters else ['Param {}'.format(x) for x in range(self.nrows)] |
|
177 | if self.data.parameters else ['Param {}'.format(x) for x in range(self.nrows)] | |
178 |
|
178 | |||
179 | def update(self, dataOut): |
|
179 | def update(self, dataOut): | |
180 |
|
180 | |||
181 | data = { |
|
181 | data = { | |
182 | self.attr_data : getattr(dataOut, self.attr_data) |
|
182 | self.attr_data : getattr(dataOut, self.attr_data) | |
183 | } |
|
183 | } | |
184 |
|
184 | |||
185 | meta = {} |
|
185 | meta = {} | |
186 |
|
186 | |||
187 | return data, meta |
|
187 | return data, meta | |
188 |
|
188 | |||
189 | def plot(self): |
|
189 | def plot(self): | |
190 | # self.data.normalize_heights() |
|
190 | # self.data.normalize_heights() | |
191 | self.x = self.data.times |
|
191 | self.x = self.data.times | |
192 | self.y = self.data.yrange |
|
192 | self.y = self.data.yrange | |
193 | self.z = self.data[self.attr_data] |
|
193 | self.z = self.data[self.attr_data] | |
194 |
|
194 | |||
195 | self.z = numpy.ma.masked_invalid(self.z) |
|
195 | self.z = numpy.ma.masked_invalid(self.z) | |
196 |
|
196 | |||
197 | if self.decimation is None: |
|
197 | if self.decimation is None: | |
198 | x, y, z = self.fill_gaps(self.x, self.y, self.z) |
|
198 | x, y, z = self.fill_gaps(self.x, self.y, self.z) | |
199 | else: |
|
199 | else: | |
200 | x, y, z = self.fill_gaps(*self.decimate()) |
|
200 | x, y, z = self.fill_gaps(*self.decimate()) | |
201 |
|
201 | |||
202 | for n, ax in enumerate(self.axes): |
|
202 | for n, ax in enumerate(self.axes): | |
203 |
|
203 | |||
204 | self.zmax = self.zmax if self.zmax is not None else numpy.max( |
|
204 | self.zmax = self.zmax if self.zmax is not None else numpy.max( | |
205 | self.z[n]) |
|
205 | self.z[n]) | |
206 | self.zmin = self.zmin if self.zmin is not None else numpy.min( |
|
206 | self.zmin = self.zmin if self.zmin is not None else numpy.min( | |
207 | self.z[n]) |
|
207 | self.z[n]) | |
208 |
|
208 | |||
209 | if ax.firsttime: |
|
209 | if ax.firsttime: | |
210 | if self.zlimits is not None: |
|
210 | if self.zlimits is not None: | |
211 | self.zmin, self.zmax = self.zlimits[n] |
|
211 | self.zmin, self.zmax = self.zlimits[n] | |
212 |
|
212 | |||
213 | ax.plt = ax.pcolormesh(x, y, z[n].T * self.factors[n], |
|
213 | ax.plt = ax.pcolormesh(x, y, z[n].T * self.factors[n], | |
214 | vmin=self.zmin, |
|
214 | vmin=self.zmin, | |
215 | vmax=self.zmax, |
|
215 | vmax=self.zmax, | |
216 | cmap=self.cmaps[n] |
|
216 | cmap=self.cmaps[n] | |
217 | ) |
|
217 | ) | |
218 | else: |
|
218 | else: | |
219 | if self.zlimits is not None: |
|
219 | if self.zlimits is not None: | |
220 | self.zmin, self.zmax = self.zlimits[n] |
|
220 | self.zmin, self.zmax = self.zlimits[n] | |
221 | ax.collections.remove(ax.collections[0]) |
|
221 | ax.collections.remove(ax.collections[0]) | |
222 | ax.plt = ax.pcolormesh(x, y, z[n].T * self.factors[n], |
|
222 | ax.plt = ax.pcolormesh(x, y, z[n].T * self.factors[n], | |
223 | vmin=self.zmin, |
|
223 | vmin=self.zmin, | |
224 | vmax=self.zmax, |
|
224 | vmax=self.zmax, | |
225 | cmap=self.cmaps[n] |
|
225 | cmap=self.cmaps[n] | |
226 | ) |
|
226 | ) | |
227 |
|
227 | |||
228 |
|
228 | |||
229 | class PolarMapPlot(Plot): |
|
229 | class PolarMapPlot(Plot): | |
230 | ''' |
|
230 | ''' | |
231 | Plot for weather radar |
|
231 | Plot for weather radar | |
232 | ''' |
|
232 | ''' | |
233 |
|
233 | |||
234 | CODE = 'param' |
|
234 | CODE = 'param' | |
235 | colormap = 'seismic' |
|
235 | colormap = 'seismic' | |
236 |
|
236 | |||
237 | def setup(self): |
|
237 | def setup(self): | |
238 | self.ncols = 1 |
|
238 | self.ncols = 1 | |
239 | self.nrows = 1 |
|
239 | self.nrows = 1 | |
240 | self.width = 9 |
|
240 | self.width = 9 | |
241 | self.height = 8 |
|
241 | self.height = 8 | |
242 | self.mode = self.data.meta['mode'] |
|
242 | self.mode = self.data.meta['mode'] | |
243 | if self.channels is not None: |
|
243 | if self.channels is not None: | |
244 | self.nplots = len(self.channels) |
|
244 | self.nplots = len(self.channels) | |
245 | self.nrows = len(self.channels) |
|
245 | self.nrows = len(self.channels) | |
246 | else: |
|
246 | else: | |
247 | self.nplots = self.data.shape(self.CODE)[0] |
|
247 | self.nplots = self.data.shape(self.CODE)[0] | |
248 | self.nrows = self.nplots |
|
248 | self.nrows = self.nplots | |
249 | self.channels = list(range(self.nplots)) |
|
249 | self.channels = list(range(self.nplots)) | |
250 | if self.mode == 'E': |
|
250 | if self.mode == 'E': | |
251 | self.xlabel = 'Longitude' |
|
251 | self.xlabel = 'Longitude' | |
252 | self.ylabel = 'Latitude' |
|
252 | self.ylabel = 'Latitude' | |
253 | else: |
|
253 | else: | |
254 | self.xlabel = 'Range (km)' |
|
254 | self.xlabel = 'Range (km)' | |
255 | self.ylabel = 'Height (km)' |
|
255 | self.ylabel = 'Height (km)' | |
256 | self.bgcolor = 'white' |
|
256 | self.bgcolor = 'white' | |
257 | self.cb_labels = self.data.meta['units'] |
|
257 | self.cb_labels = self.data.meta['units'] | |
258 | self.lat = self.data.meta['latitude'] |
|
258 | self.lat = self.data.meta['latitude'] | |
259 | self.lon = self.data.meta['longitude'] |
|
259 | self.lon = self.data.meta['longitude'] | |
260 | self.xmin, self.xmax = float( |
|
260 | self.xmin, self.xmax = float( | |
261 | km2deg(self.xmin) + self.lon), float(km2deg(self.xmax) + self.lon) |
|
261 | km2deg(self.xmin) + self.lon), float(km2deg(self.xmax) + self.lon) | |
262 | self.ymin, self.ymax = float( |
|
262 | self.ymin, self.ymax = float( | |
263 | km2deg(self.ymin) + self.lat), float(km2deg(self.ymax) + self.lat) |
|
263 | km2deg(self.ymin) + self.lat), float(km2deg(self.ymax) + self.lat) | |
264 | # self.polar = True |
|
264 | # self.polar = True | |
265 |
|
265 | |||
266 | def plot(self): |
|
266 | def plot(self): | |
267 |
|
267 | |||
268 | for n, ax in enumerate(self.axes): |
|
268 | for n, ax in enumerate(self.axes): | |
269 | data = self.data['param'][self.channels[n]] |
|
269 | data = self.data['param'][self.channels[n]] | |
270 |
|
270 | |||
271 | zeniths = numpy.linspace( |
|
271 | zeniths = numpy.linspace( | |
272 | 0, self.data.meta['max_range'], data.shape[1]) |
|
272 | 0, self.data.meta['max_range'], data.shape[1]) | |
273 | if self.mode == 'E': |
|
273 | if self.mode == 'E': | |
274 | azimuths = -numpy.radians(self.data.yrange)+numpy.pi/2 |
|
274 | azimuths = -numpy.radians(self.data.yrange)+numpy.pi/2 | |
275 | r, theta = numpy.meshgrid(zeniths, azimuths) |
|
275 | r, theta = numpy.meshgrid(zeniths, azimuths) | |
276 | x, y = r*numpy.cos(theta)*numpy.cos(numpy.radians(self.data.meta['elevation'])), r*numpy.sin( |
|
276 | x, y = r*numpy.cos(theta)*numpy.cos(numpy.radians(self.data.meta['elevation'])), r*numpy.sin( | |
277 | theta)*numpy.cos(numpy.radians(self.data.meta['elevation'])) |
|
277 | theta)*numpy.cos(numpy.radians(self.data.meta['elevation'])) | |
278 | x = km2deg(x) + self.lon |
|
278 | x = km2deg(x) + self.lon | |
279 | y = km2deg(y) + self.lat |
|
279 | y = km2deg(y) + self.lat | |
280 | else: |
|
280 | else: | |
281 | azimuths = numpy.radians(self.data.yrange) |
|
281 | azimuths = numpy.radians(self.data.yrange) | |
282 | r, theta = numpy.meshgrid(zeniths, azimuths) |
|
282 | r, theta = numpy.meshgrid(zeniths, azimuths) | |
283 | x, y = r*numpy.cos(theta), r*numpy.sin(theta) |
|
283 | x, y = r*numpy.cos(theta), r*numpy.sin(theta) | |
284 | self.y = zeniths |
|
284 | self.y = zeniths | |
285 |
|
285 | |||
286 | if ax.firsttime: |
|
286 | if ax.firsttime: | |
287 | if self.zlimits is not None: |
|
287 | if self.zlimits is not None: | |
288 | self.zmin, self.zmax = self.zlimits[n] |
|
288 | self.zmin, self.zmax = self.zlimits[n] | |
289 | ax.plt = ax.pcolormesh( # r, theta, numpy.ma.array(data, mask=numpy.isnan(data)), |
|
289 | ax.plt = ax.pcolormesh( # r, theta, numpy.ma.array(data, mask=numpy.isnan(data)), | |
290 | x, y, numpy.ma.array(data, mask=numpy.isnan(data)), |
|
290 | x, y, numpy.ma.array(data, mask=numpy.isnan(data)), | |
291 | vmin=self.zmin, |
|
291 | vmin=self.zmin, | |
292 | vmax=self.zmax, |
|
292 | vmax=self.zmax, | |
293 | cmap=self.cmaps[n]) |
|
293 | cmap=self.cmaps[n]) | |
294 | else: |
|
294 | else: | |
295 | if self.zlimits is not None: |
|
295 | if self.zlimits is not None: | |
296 | self.zmin, self.zmax = self.zlimits[n] |
|
296 | self.zmin, self.zmax = self.zlimits[n] | |
297 | ax.collections.remove(ax.collections[0]) |
|
297 | ax.collections.remove(ax.collections[0]) | |
298 | ax.plt = ax.pcolormesh( # r, theta, numpy.ma.array(data, mask=numpy.isnan(data)), |
|
298 | ax.plt = ax.pcolormesh( # r, theta, numpy.ma.array(data, mask=numpy.isnan(data)), | |
299 | x, y, numpy.ma.array(data, mask=numpy.isnan(data)), |
|
299 | x, y, numpy.ma.array(data, mask=numpy.isnan(data)), | |
300 | vmin=self.zmin, |
|
300 | vmin=self.zmin, | |
301 | vmax=self.zmax, |
|
301 | vmax=self.zmax, | |
302 | cmap=self.cmaps[n]) |
|
302 | cmap=self.cmaps[n]) | |
303 |
|
303 | |||
304 | if self.mode == 'A': |
|
304 | if self.mode == 'A': | |
305 | continue |
|
305 | continue | |
306 |
|
306 | |||
307 | # plot district names |
|
307 | # plot district names | |
308 | f = open('/data/workspace/schain_scripts/distrito.csv') |
|
308 | f = open('/data/workspace/schain_scripts/distrito.csv') | |
309 | for line in f: |
|
309 | for line in f: | |
310 | label, lon, lat = [s.strip() for s in line.split(',') if s] |
|
310 | label, lon, lat = [s.strip() for s in line.split(',') if s] | |
311 | lat = float(lat) |
|
311 | lat = float(lat) | |
312 | lon = float(lon) |
|
312 | lon = float(lon) | |
313 | # ax.plot(lon, lat, '.b', ms=2) |
|
313 | # ax.plot(lon, lat, '.b', ms=2) | |
314 | ax.text(lon, lat, label.decode('utf8'), ha='center', |
|
314 | ax.text(lon, lat, label.decode('utf8'), ha='center', | |
315 | va='bottom', size='8', color='black') |
|
315 | va='bottom', size='8', color='black') | |
316 |
|
316 | |||
317 | # plot limites |
|
317 | # plot limites | |
318 | limites = [] |
|
318 | limites = [] | |
319 | tmp = [] |
|
319 | tmp = [] | |
320 | for line in open('/data/workspace/schain_scripts/lima.csv'): |
|
320 | for line in open('/data/workspace/schain_scripts/lima.csv'): | |
321 | if '#' in line: |
|
321 | if '#' in line: | |
322 | if tmp: |
|
322 | if tmp: | |
323 | limites.append(tmp) |
|
323 | limites.append(tmp) | |
324 | tmp = [] |
|
324 | tmp = [] | |
325 | continue |
|
325 | continue | |
326 | values = line.strip().split(',') |
|
326 | values = line.strip().split(',') | |
327 | tmp.append((float(values[0]), float(values[1]))) |
|
327 | tmp.append((float(values[0]), float(values[1]))) | |
328 | for points in limites: |
|
328 | for points in limites: | |
329 | ax.add_patch( |
|
329 | ax.add_patch( | |
330 | Polygon(points, ec='k', fc='none', ls='--', lw=0.5)) |
|
330 | Polygon(points, ec='k', fc='none', ls='--', lw=0.5)) | |
331 |
|
331 | |||
332 | # plot Cuencas |
|
332 | # plot Cuencas | |
333 | for cuenca in ('rimac', 'lurin', 'mala', 'chillon', 'chilca', 'chancay-huaral'): |
|
333 | for cuenca in ('rimac', 'lurin', 'mala', 'chillon', 'chilca', 'chancay-huaral'): | |
334 | f = open('/data/workspace/schain_scripts/{}.csv'.format(cuenca)) |
|
334 | f = open('/data/workspace/schain_scripts/{}.csv'.format(cuenca)) | |
335 | values = [line.strip().split(',') for line in f] |
|
335 | values = [line.strip().split(',') for line in f] | |
336 | points = [(float(s[0]), float(s[1])) for s in values] |
|
336 | points = [(float(s[0]), float(s[1])) for s in values] | |
337 | ax.add_patch(Polygon(points, ec='b', fc='none')) |
|
337 | ax.add_patch(Polygon(points, ec='b', fc='none')) | |
338 |
|
338 | |||
339 | # plot grid |
|
339 | # plot grid | |
340 | for r in (15, 30, 45, 60): |
|
340 | for r in (15, 30, 45, 60): | |
341 | ax.add_artist(plt.Circle((self.lon, self.lat), |
|
341 | ax.add_artist(plt.Circle((self.lon, self.lat), | |
342 | km2deg(r), color='0.6', fill=False, lw=0.2)) |
|
342 | km2deg(r), color='0.6', fill=False, lw=0.2)) | |
343 | ax.text( |
|
343 | ax.text( | |
344 | self.lon + (km2deg(r))*numpy.cos(60*numpy.pi/180), |
|
344 | self.lon + (km2deg(r))*numpy.cos(60*numpy.pi/180), | |
345 | self.lat + (km2deg(r))*numpy.sin(60*numpy.pi/180), |
|
345 | self.lat + (km2deg(r))*numpy.sin(60*numpy.pi/180), | |
346 | '{}km'.format(r), |
|
346 | '{}km'.format(r), | |
347 | ha='center', va='bottom', size='8', color='0.6', weight='heavy') |
|
347 | ha='center', va='bottom', size='8', color='0.6', weight='heavy') | |
348 |
|
348 | |||
349 | if self.mode == 'E': |
|
349 | if self.mode == 'E': | |
350 | title = 'El={}$^\circ$'.format(self.data.meta['elevation']) |
|
350 | title = 'El={}$^\circ$'.format(self.data.meta['elevation']) | |
351 | label = 'E{:02d}'.format(int(self.data.meta['elevation'])) |
|
351 | label = 'E{:02d}'.format(int(self.data.meta['elevation'])) | |
352 | else: |
|
352 | else: | |
353 | title = 'Az={}$^\circ$'.format(self.data.meta['azimuth']) |
|
353 | title = 'Az={}$^\circ$'.format(self.data.meta['azimuth']) | |
354 | label = 'A{:02d}'.format(int(self.data.meta['azimuth'])) |
|
354 | label = 'A{:02d}'.format(int(self.data.meta['azimuth'])) | |
355 |
|
355 | |||
356 | self.save_labels = ['{}-{}'.format(lbl, label) for lbl in self.labels] |
|
356 | self.save_labels = ['{}-{}'.format(lbl, label) for lbl in self.labels] | |
357 | self.titles = ['{} {}'.format( |
|
357 | self.titles = ['{} {}'.format( | |
358 | self.data.parameters[x], title) for x in self.channels] |
|
358 | self.data.parameters[x], title) for x in self.channels] | |
359 |
|
359 | |||
360 | class WeatherPlot(Plot): |
|
360 | class WeatherPlot(Plot): | |
361 | CODE = 'weather' |
|
361 | CODE = 'weather' | |
362 | plot_name = 'weather' |
|
362 | plot_name = 'weather' | |
363 | plot_type = 'ppistyle' |
|
363 | plot_type = 'ppistyle' | |
364 | buffering = False |
|
364 | buffering = False | |
365 |
|
365 | |||
366 | def setup(self): |
|
366 | def setup(self): | |
367 | self.ncols = 1 |
|
367 | self.ncols = 1 | |
368 | self.nrows = 1 |
|
368 | self.nrows = 1 | |
369 | self.nplots= 1 |
|
369 | self.nplots= 1 | |
370 | self.ylabel= 'Range [Km]' |
|
370 | self.ylabel= 'Range [Km]' | |
371 | self.titles= ['Weather'] |
|
371 | self.titles= ['Weather'] | |
372 | self.colorbar=False |
|
372 | self.colorbar=False | |
373 | self.width =8 |
|
373 | self.width =8 | |
374 | self.height =8 |
|
374 | self.height =8 | |
375 | self.ini =0 |
|
375 | self.ini =0 | |
376 | self.len_azi =0 |
|
376 | self.len_azi =0 | |
377 | self.buffer_ini = None |
|
377 | self.buffer_ini = None | |
378 | self.buffer_azi = None |
|
378 | self.buffer_azi = None | |
379 | self.plots_adjust.update({'wspace': 0.4, 'hspace':0.4, 'left': 0.1, 'right': 0.9, 'bottom': 0.08}) |
|
379 | self.plots_adjust.update({'wspace': 0.4, 'hspace':0.4, 'left': 0.1, 'right': 0.9, 'bottom': 0.08}) | |
380 | self.flag =0 |
|
380 | self.flag =0 | |
381 | self.indicador= 0 |
|
381 | self.indicador= 0 | |
382 |
|
382 | |||
383 | def update(self, dataOut): |
|
383 | def update(self, dataOut): | |
384 |
|
384 | |||
385 | data = {} |
|
385 | data = {} | |
386 | meta = {} |
|
386 | meta = {} | |
387 | data['weather'] = 10*numpy.log10(dataOut.data_360/(650**2)) |
|
387 | data['weather'] = 10*numpy.log10(dataOut.data_360/(650**2)) | |
388 | data['azi'] = dataOut.data_azi |
|
388 | data['azi'] = dataOut.data_azi | |
389 |
|
389 | |||
390 | return data, meta |
|
390 | return data, meta | |
391 |
|
391 | |||
392 | def plot(self): |
|
392 | def plot(self): | |
|
393 | thisDatetime = datetime.datetime.utcfromtimestamp(self.data.times[-1]) | |||
|
394 | print("thisDatetime",thisDatetime) | |||
393 | stoprange = float(33*1.5) |
|
395 | stoprange = float(33*1.5) | |
394 | rangestep = float(0.15) |
|
396 | rangestep = float(0.15) | |
395 | r = numpy.arange(0, stoprange, rangestep) |
|
397 | r = numpy.arange(0, stoprange, rangestep) | |
396 | self.y = 2*r |
|
398 | self.y = 2*r | |
397 | data = self.data[-1] |
|
399 | data = self.data[-1] | |
398 |
|
400 | |||
399 | tmp_v = data['weather'] |
|
401 | tmp_v = data['weather'] | |
400 | tmp_z = data['azi'] |
|
402 | tmp_z = data['azi'] | |
401 | res = 1 |
|
403 | res = 1 | |
402 | step = (360/(res*tmp_v.shape[0])) |
|
404 | step = (360/(res*tmp_v.shape[0])) | |
403 | mode = 1 |
|
405 | mode = 1 | |
404 | if mode==0: |
|
406 | if mode==0: | |
405 | print("self.ini",self.ini) |
|
407 | #print("self.ini",self.ini) | |
406 | val = numpy.mean(tmp_v[:,0]) |
|
408 | val = numpy.mean(tmp_v[:,0]) | |
407 | self.len_azi = len(tmp_z) |
|
409 | self.len_azi = len(tmp_z) | |
408 | ones = numpy.ones([(360-tmp_v.shape[0]),tmp_v.shape[1]])*val |
|
410 | ones = numpy.ones([(360-tmp_v.shape[0]),tmp_v.shape[1]])*val | |
409 | self.buffer_ini = numpy.vstack((tmp_v,ones)) |
|
411 | self.buffer_ini = numpy.vstack((tmp_v,ones)) | |
410 |
|
412 | |||
411 | n = ((360/res)-len(tmp_z)) |
|
413 | n = ((360/res)-len(tmp_z)) | |
412 | start = tmp_z[-1]+res |
|
414 | start = tmp_z[-1]+res | |
413 | end = tmp_z[0]-res |
|
415 | end = tmp_z[0]-res | |
414 | if start>end: |
|
416 | if start>end: | |
415 | end = end+360 |
|
417 | end = end+360 | |
416 | azi_zeros = numpy.linspace(start,end,int(n)) |
|
418 | azi_zeros = numpy.linspace(start,end,int(n)) | |
417 | azi_zeros = numpy.where(azi_zeros>360,azi_zeros-360,azi_zeros) |
|
419 | azi_zeros = numpy.where(azi_zeros>360,azi_zeros-360,azi_zeros) | |
418 | self.buffer_ini_azi = numpy.hstack((tmp_z,azi_zeros)) |
|
420 | self.buffer_ini_azi = numpy.hstack((tmp_z,azi_zeros)) | |
419 | self.ini = self.ini+1 |
|
421 | self.ini = self.ini+1 | |
420 |
|
422 | |||
421 | if mode==1: |
|
423 | if mode==1: | |
422 | print("self.ini",self.ini) |
|
424 | #print("self.ini",self.ini) | |
423 | if self.ini==0: |
|
425 | if self.ini==0: | |
424 | res = 1 |
|
426 | res = 1 | |
425 | step = (360/(res*tmp_v.shape[0])) |
|
427 | step = (360/(res*tmp_v.shape[0])) | |
426 | val = numpy.mean(tmp_v[:,0]) |
|
428 | val = numpy.mean(tmp_v[:,0]) | |
427 | self.len_azi = len(tmp_z) |
|
429 | self.len_azi = len(tmp_z) | |
428 | self.buf_tmp = tmp_v |
|
430 | self.buf_tmp = tmp_v | |
429 | ones = numpy.ones([(360-tmp_v.shape[0]),tmp_v.shape[1]])*val |
|
431 | ones = numpy.ones([(360-tmp_v.shape[0]),tmp_v.shape[1]])*val | |
430 | self.buffer_ini = numpy.vstack((tmp_v,ones)) |
|
432 | self.buffer_ini = numpy.vstack((tmp_v,ones)) | |
431 |
|
433 | |||
432 | n = ((360/res)-len(tmp_z)) |
|
434 | n = ((360/res)-len(tmp_z)) | |
433 | start = tmp_z[-1]+res |
|
435 | start = tmp_z[-1]+res | |
434 | end = tmp_z[0]-res |
|
436 | end = tmp_z[0]-res | |
435 | if start>end: |
|
437 | if start>end: | |
436 | end =end+360 |
|
438 | end =end+360 | |
437 | azi_zeros = numpy.linspace(start,end,int(n)) |
|
439 | azi_zeros = numpy.linspace(start,end,int(n)) | |
438 | azi_zeros = numpy.where(azi_zeros>360,azi_zeros-360,azi_zeros) |
|
440 | azi_zeros = numpy.where(azi_zeros>360,azi_zeros-360,azi_zeros) | |
439 | self.buf_azi = tmp_z |
|
441 | self.buf_azi = tmp_z | |
440 | self.buffer_ini_azi = numpy.hstack((tmp_z,azi_zeros)) |
|
442 | self.buffer_ini_azi = numpy.hstack((tmp_z,azi_zeros)) | |
441 | self.ini = self.ini+1 |
|
443 | self.ini = self.ini+1 | |
442 | elif 0<self.ini<step: |
|
444 | elif 0<self.ini<step: | |
443 | ''' |
|
445 | ''' | |
444 | if self.ini>31: |
|
446 | if self.ini>31: | |
445 | start= tmp_z[0] |
|
447 | start= tmp_z[0] | |
446 | end =tmp_z[-1] |
|
448 | end =tmp_z[-1] | |
447 | print("start","end",start,end) |
|
449 | print("start","end",start,end) | |
448 | if self.ini==32: |
|
450 | if self.ini==32: | |
449 | tmp_v=tmp_v+20 |
|
451 | tmp_v=tmp_v+20 | |
450 | if self.ini==33: |
|
452 | if self.ini==33: | |
451 | tmp_v=tmp_v+10 |
|
453 | tmp_v=tmp_v+10 | |
452 | if self.ini==34: |
|
454 | if self.ini==34: | |
453 | tmp_v=tmp_v+20 |
|
455 | tmp_v=tmp_v+20 | |
454 | if self.ini==35: |
|
456 | if self.ini==35: | |
455 | tmp_v=tmp_v+20 |
|
457 | tmp_v=tmp_v+20 | |
456 | ''' |
|
458 | ''' | |
457 | self.buf_tmp= numpy.vstack((self.buf_tmp,tmp_v)) |
|
459 | self.buf_tmp= numpy.vstack((self.buf_tmp,tmp_v)) | |
458 | if self.buf_tmp.shape[0]==360: |
|
460 | if self.buf_tmp.shape[0]==360: | |
459 | self.buffer_ini=self.buf_tmp |
|
461 | self.buffer_ini=self.buf_tmp | |
460 | else: |
|
462 | else: | |
461 | val=30.0 |
|
463 | val=30.0 | |
462 | ones = numpy.ones([(360-self.buf_tmp.shape[0]),self.buf_tmp.shape[1]])*val |
|
464 | ones = numpy.ones([(360-self.buf_tmp.shape[0]),self.buf_tmp.shape[1]])*val | |
463 | self.buffer_ini = numpy.vstack((self.buf_tmp,ones)) |
|
465 | self.buffer_ini = numpy.vstack((self.buf_tmp,ones)) | |
464 |
|
466 | |||
465 | self.buf_azi = numpy.hstack((self.buf_azi,tmp_z)) |
|
467 | self.buf_azi = numpy.hstack((self.buf_azi,tmp_z)) | |
466 | n = ((360/res)-len(self.buf_azi)) |
|
468 | n = ((360/res)-len(self.buf_azi)) | |
467 | if n==0: |
|
469 | if n==0: | |
468 | self.buffer_ini_azi = self.buf_azi |
|
470 | self.buffer_ini_azi = self.buf_azi | |
469 | else: |
|
471 | else: | |
470 | start = self.buf_azi[-1]+res |
|
472 | start = self.buf_azi[-1]+res | |
471 | end = self.buf_azi[0]-res |
|
473 | end = self.buf_azi[0]-res | |
472 | if start>end: |
|
474 | if start>end: | |
473 | end =end+360 |
|
475 | end =end+360 | |
474 | azi_zeros = numpy.linspace(start,end,int(n)) |
|
476 | azi_zeros = numpy.linspace(start,end,int(n)) | |
475 | azi_zeros = numpy.where(azi_zeros>360,azi_zeros-360,azi_zeros) |
|
477 | azi_zeros = numpy.where(azi_zeros>360,azi_zeros-360,azi_zeros) | |
476 | if tmp_z[0]<self.buf_azi[0] <tmp_z[-1]: |
|
478 | if tmp_z[0]<self.buf_azi[0] <tmp_z[-1]: | |
477 | self.indicador=1 |
|
479 | self.indicador=1 | |
478 | if self.indicador==1: |
|
480 | if self.indicador==1: | |
479 | azi_zeros = numpy.ones(360-len(self.buf_azi))*(tmp_z[-1]+res) |
|
481 | azi_zeros = numpy.ones(360-len(self.buf_azi))*(tmp_z[-1]+res) | |
480 | # self.indicador = True |
|
482 | # self.indicador = True | |
481 | #if self.indicador==True: |
|
483 | #if self.indicador==True: | |
482 | # azi_zeros = numpy.ones(360-len(self.buf_azi))*(tmp_z[-1]+res) |
|
484 | # azi_zeros = numpy.ones(360-len(self.buf_azi))*(tmp_z[-1]+res) | |
483 |
|
485 | |||
484 | #self.buf_azi = tmp_z |
|
486 | #self.buf_azi = tmp_z | |
485 | self.buffer_ini_azi = numpy.hstack((self.buf_azi,azi_zeros)) |
|
487 | self.buffer_ini_azi = numpy.hstack((self.buf_azi,azi_zeros)) | |
486 |
|
488 | |||
487 | if self.ini==step-1: |
|
489 | if self.ini==step-1: | |
488 | start= tmp_z[0] |
|
490 | start= tmp_z[0] | |
489 | end = tmp_z[-1] |
|
491 | end = tmp_z[-1] | |
490 | print("start","end",start,end) |
|
492 | #print("start","end",start,end) | |
491 | print(self.buffer_ini_azi[:80]) |
|
493 | ###print(self.buffer_ini_azi[:80]) | |
492 | self.ini = self.ini+1 |
|
494 | self.ini = self.ini+1 | |
493 |
|
495 | |||
494 | else: |
|
496 | else: | |
495 | step = (360/(res*tmp_v.shape[0])) |
|
497 | step = (360/(res*tmp_v.shape[0])) | |
496 | tmp_v=tmp_v+5+(self.ini-step)*1 |
|
498 | tmp_v=tmp_v+5+(self.ini-step)*1 | |
497 |
|
499 | |||
498 | start= tmp_z[0] |
|
500 | start= tmp_z[0] | |
499 | end = tmp_z[-1] |
|
501 | end = tmp_z[-1] | |
500 | print("start","end",start,end) |
|
502 | #print("start","end",start,end) | |
501 | print(self.buffer_ini_azi[:120]) |
|
503 | ###print(self.buffer_ini_azi[:120]) | |
502 |
|
504 | |||
503 | if step>=2: |
|
505 | if step>=2: | |
504 | if self.flag<step-1: |
|
506 | if self.flag<step-1: | |
505 | limit_i=self.buf_azi[len(tmp_z)*(self.flag+1)] |
|
507 | limit_i=self.buf_azi[len(tmp_z)*(self.flag+1)] | |
506 | limit_s=self.buf_azi[len(tmp_z)*(self.flag+2)-1] |
|
508 | limit_s=self.buf_azi[len(tmp_z)*(self.flag+2)-1] | |
507 | print("flag",self.flag,limit_i,limit_s) |
|
509 | print("flag",self.flag,limit_i,limit_s) | |
508 | if limit_i< tmp_z[-1]< limit_s: |
|
510 | if limit_i< tmp_z[-1]< limit_s: | |
509 | index_i=int(numpy.where(tmp_z<=self.buf_azi[len(tmp_z)*(self.flag+1)])[0][-1]) |
|
511 | index_i=int(numpy.where(tmp_z<=self.buf_azi[len(tmp_z)*(self.flag+1)])[0][-1]) | |
510 | tmp_r =int(numpy.where(self.buf_azi[(self.flag+1)*len(tmp_z):(self.flag+2)*len(tmp_z)]>=tmp_z[-1])[0][0]) |
|
512 | tmp_r =int(numpy.where(self.buf_azi[(self.flag+1)*len(tmp_z):(self.flag+2)*len(tmp_z)]>=tmp_z[-1])[0][0]) | |
511 | print("tmp_r",tmp_r) |
|
513 | print("tmp_r",tmp_r) | |
512 | index_f=(self.flag+1)*len(tmp_z)+tmp_r |
|
514 | index_f=(self.flag+1)*len(tmp_z)+tmp_r | |
513 |
|
515 | |||
514 | if len(tmp_z[index_i:])>len(self.buf_azi[len(tmp_z)*(self.flag+1):index_f]): |
|
516 | if len(tmp_z[index_i:])>len(self.buf_azi[len(tmp_z)*(self.flag+1):index_f]): | |
515 | final = len(self.buf_azi[len(tmp_z)*(self.flag+1):index_f]) |
|
517 | final = len(self.buf_azi[len(tmp_z)*(self.flag+1):index_f]) | |
516 | else: |
|
518 | else: | |
517 | final= len(tmp_z[index_i:]) |
|
519 | final= len(tmp_z[index_i:]) | |
518 | self.buf_azi[len(tmp_z)*(self.flag+1):index_f]=tmp_z[index_i:index_i+final] |
|
520 | self.buf_azi[len(tmp_z)*(self.flag+1):index_f]=tmp_z[index_i:index_i+final] | |
519 | self.buf_tmp[len(tmp_z)*(self.flag+1):index_f,:]=tmp_v[index_i:index_i+final,:] |
|
521 | self.buf_tmp[len(tmp_z)*(self.flag+1):index_f,:]=tmp_v[index_i:index_i+final,:] | |
520 | if limit_i<tmp_z[0]<limit_s: |
|
522 | if limit_i<tmp_z[0]<limit_s: | |
521 | index_f =int(numpy.where(self.buf_azi>=tmp_z[-1])[0][0]) |
|
523 | index_f =int(numpy.where(self.buf_azi>=tmp_z[-1])[0][0]) | |
522 | n_p =index_f-len(tmp_z)*(self.flag+1) |
|
524 | n_p =index_f-len(tmp_z)*(self.flag+1) | |
523 | if n_p>0: |
|
525 | if n_p>0: | |
524 | self.buf_azi[len(tmp_z)*(self.flag+1):index_f]=tmp_z[-1]*numpy.ones(n_p) |
|
526 | self.buf_azi[len(tmp_z)*(self.flag+1):index_f]=tmp_z[-1]*numpy.ones(n_p) | |
525 | self.buf_tmp[len(tmp_z)*(self.flag+1):index_f,:]=tmp_v[-1,:]*numpy.ones([n_p,tmp_v.shape[1]]) |
|
527 | self.buf_tmp[len(tmp_z)*(self.flag+1):index_f,:]=tmp_v[-1,:]*numpy.ones([n_p,tmp_v.shape[1]]) | |
526 |
|
528 | |||
527 | ''' |
|
529 | ''' | |
528 | if self.buf_azi[len(tmp_z)]<tmp_z[-1]<self.buf_azi[2*len(tmp_z)-1]: |
|
530 | if self.buf_azi[len(tmp_z)]<tmp_z[-1]<self.buf_azi[2*len(tmp_z)-1]: | |
529 | index_i= int(numpy.where(tmp_z <= self.buf_azi[len(tmp_z)])[0][-1]) |
|
531 | index_i= int(numpy.where(tmp_z <= self.buf_azi[len(tmp_z)])[0][-1]) | |
530 | index_f= int(numpy.where(self.buf_azi>=tmp_z[-1])[0][0]) |
|
532 | index_f= int(numpy.where(self.buf_azi>=tmp_z[-1])[0][0]) | |
531 | #print("index",index_i,index_f) |
|
533 | #print("index",index_i,index_f) | |
532 | if len(tmp_z[index_i:])>len(self.buf_azi[len(tmp_z):index_f]): |
|
534 | if len(tmp_z[index_i:])>len(self.buf_azi[len(tmp_z):index_f]): | |
533 | final = len(self.buf_azi[len(tmp_z):index_f]) |
|
535 | final = len(self.buf_azi[len(tmp_z):index_f]) | |
534 | else: |
|
536 | else: | |
535 | final = len(tmp_z[index_i:]) |
|
537 | final = len(tmp_z[index_i:]) | |
536 | self.buf_azi[len(tmp_z):index_f]=tmp_z[index_i:index_i+final] |
|
538 | self.buf_azi[len(tmp_z):index_f]=tmp_z[index_i:index_i+final] | |
537 | self.buf_tmp[len(tmp_z):index_f,:]=tmp_v[index_i:index_i+final,:] |
|
539 | self.buf_tmp[len(tmp_z):index_f,:]=tmp_v[index_i:index_i+final,:] | |
538 | ''' |
|
540 | ''' | |
539 | self.buf_tmp[len(tmp_z)*(self.flag):len(tmp_z)*(self.flag+1),:]=tmp_v |
|
541 | self.buf_tmp[len(tmp_z)*(self.flag):len(tmp_z)*(self.flag+1),:]=tmp_v | |
540 | self.buf_azi[len(tmp_z)*(self.flag):len(tmp_z)*(self.flag+1)] = tmp_z |
|
542 | self.buf_azi[len(tmp_z)*(self.flag):len(tmp_z)*(self.flag+1)] = tmp_z | |
541 | self.buffer_ini=self.buf_tmp |
|
543 | self.buffer_ini=self.buf_tmp | |
542 | self.buffer_ini_azi = self.buf_azi |
|
544 | self.buffer_ini_azi = self.buf_azi | |
543 | print("--------salida------------") |
|
545 | ##print("--------salida------------") | |
544 | start= tmp_z[0] |
|
546 | start= tmp_z[0] | |
545 | end = tmp_z[-1] |
|
547 | end = tmp_z[-1] | |
546 | print("start","end",start,end) |
|
548 | ##print("start","end",start,end) | |
547 | print(self.buffer_ini_azi[:120]) |
|
549 | ##print(self.buffer_ini_azi[:120]) | |
548 | self.ini= self.ini+1 |
|
550 | self.ini= self.ini+1 | |
549 | self.flag = self.flag +1 |
|
551 | self.flag = self.flag +1 | |
550 | if self.flag==step: |
|
552 | if self.flag==step: | |
551 | self.flag=0 |
|
553 | self.flag=0 | |
552 |
|
554 | |||
553 | for i,ax in enumerate(self.axes): |
|
555 | for i,ax in enumerate(self.axes): | |
554 | if ax.firsttime: |
|
556 | if ax.firsttime: | |
555 | plt.clf() |
|
557 | plt.clf() | |
556 | cgax, pm = wrl.vis.plot_ppi(self.buffer_ini,r=r,az=self.buffer_ini_azi,fig=self.figures[0], proj='cg', vmin=30, vmax=70) |
|
558 | cgax, pm = wrl.vis.plot_ppi(self.buffer_ini,r=r,az=self.buffer_ini_azi,fig=self.figures[0], proj='cg', vmin=30, vmax=70) | |
557 | else: |
|
559 | else: | |
558 | plt.clf() |
|
560 | plt.clf() | |
559 | cgax, pm = wrl.vis.plot_ppi(self.buffer_ini,r=r,az=self.buffer_ini_azi,fig=self.figures[0], proj='cg', vmin=30, vmax=70) |
|
561 | cgax, pm = wrl.vis.plot_ppi(self.buffer_ini,r=r,az=self.buffer_ini_azi,fig=self.figures[0], proj='cg', vmin=30, vmax=70) | |
560 | caax = cgax.parasites[0] |
|
562 | caax = cgax.parasites[0] | |
561 | paax = cgax.parasites[1] |
|
563 | paax = cgax.parasites[1] | |
562 | cbar = plt.gcf().colorbar(pm, pad=0.075) |
|
564 | cbar = plt.gcf().colorbar(pm, pad=0.075) | |
563 | caax.set_xlabel('x_range [km]') |
|
565 | caax.set_xlabel('x_range [km]') | |
564 | caax.set_ylabel('y_range [km]') |
|
566 | caax.set_ylabel('y_range [km]') | |
565 | plt.text(1.0, 1.05, 'azimuth', transform=caax.transAxes, va='bottom',ha='right') |
|
567 | plt.text(1.0, 1.05, 'azimuth '+str(thisDatetime), transform=caax.transAxes, va='bottom',ha='right') |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file | ||
The requested commit or file is too big and content was truncated. Show full diff |
@@ -1,37 +1,38 | |||||
1 | import os,sys |
|
1 | import os,sys | |
2 | import datetime |
|
2 | import datetime | |
3 | import time |
|
3 | import time | |
4 | from schainpy.controller import Project |
|
4 | from schainpy.controller import Project | |
5 | #path = '/home/alex/Downloads/hdf5_testPP2' |
|
5 | #path = '/home/alex/Downloads/hdf5_testPP2' | |
6 | #path = '/home/alex/Downloads/hdf5_test' |
|
6 | #path = '/home/alex/Downloads/hdf5_test' | |
7 | #path='/home/alex/Downloads/hdf5_wr' |
|
7 | #path='/home/alex/Downloads/hdf5_wr' | |
8 | path='/home/developer/Downloads/HDF5_WR' |
|
8 | path='/home/developer/Downloads/HDF5_WR' | |
9 | figpath = path |
|
9 | figpath = path | |
10 | desc = "Simulator Test" |
|
10 | desc = "Simulator Test" | |
11 |
|
11 | |||
12 | controllerObj = Project() |
|
12 | controllerObj = Project() | |
13 |
|
13 | |||
14 | controllerObj.setup(id='10',name='Test Simulator',description=desc) |
|
14 | controllerObj.setup(id='10',name='Test Simulator',description=desc) | |
15 |
|
15 | |||
16 | readUnitConfObj = controllerObj.addReadUnit(datatype='HDFReader', |
|
16 | readUnitConfObj = controllerObj.addReadUnit(datatype='HDFReader', | |
17 | path=path, |
|
17 | path=path, | |
18 | startDate="2021/01/01", #"2020/01/01",#today, |
|
18 | startDate="2021/01/01", #"2020/01/01",#today, | |
19 | endDate= "2021/12/01", #"2020/12/30",#today, |
|
19 | endDate= "2021/12/01", #"2020/12/30",#today, | |
20 | startTime='00:00:00', |
|
20 | startTime='00:00:00', | |
21 | endTime='23:59:59', |
|
21 | endTime='23:59:59', | |
22 | delay=0, |
|
22 | delay=0, | |
23 | #set=0, |
|
23 | #set=0, | |
24 | online=0, |
|
24 | online=0, | |
25 | walk=0)#1 |
|
25 | walk=0)#1 | |
26 |
|
26 | |||
27 | procUnitConfObjA = controllerObj.addProcUnit(datatype='ParametersProc',inputId=readUnitConfObj.getId()) |
|
27 | procUnitConfObjA = controllerObj.addProcUnit(datatype='ParametersProc',inputId=readUnitConfObj.getId()) | |
|
28 | ||||
28 | opObj11 = procUnitConfObjA.addOperation(name='Block360') |
|
29 | opObj11 = procUnitConfObjA.addOperation(name='Block360') | |
29 |
opObj11.addParameter(name='n', value=' |
|
30 | opObj11.addParameter(name='n', value='40', format='int') | |
30 |
|
31 | |||
31 | opObj11= procUnitConfObjA.addOperation(name='WeatherPlot',optype='other') |
|
32 | opObj11= procUnitConfObjA.addOperation(name='WeatherPlot',optype='other') | |
32 |
|
|
33 | opObj11.addParameter(name='save', value=figpath) | |
33 |
|
|
34 | opObj11.addParameter(name='save_period', value=1) | |
34 | #opObj11 = procUnitConfObjA.addOperation(name='PowerPlot', optype='other')#PulsepairPowerPlot |
|
35 | #opObj11 = procUnitConfObjA.addOperation(name='PowerPlot', optype='other')#PulsepairPowerPlot | |
35 | #opObj11 = procUnitConfObjA.addOperation(name='PPSignalPlot', optype='other') |
|
36 | #opObj11 = procUnitConfObjA.addOperation(name='PPSignalPlot', optype='other') | |
36 |
|
37 | |||
37 | controllerObj.start() |
|
38 | controllerObj.start() |
@@ -1,38 +1,55 | |||||
1 | import os,sys |
|
1 | import os,sys | |
2 | import datetime |
|
2 | import datetime | |
3 | import time |
|
3 | import time | |
4 | from schainpy.controller import Project |
|
4 | from schainpy.controller import Project | |
|
5 | ||||
|
6 | #************************************************************************* | |||
|
7 | #**************************LECTURA config_WR.txt************************** | |||
|
8 | #************************************************************************* | |||
|
9 | from readFileconfig import ReadfileWR | |||
|
10 | filename= "/home/developer/Downloads/config_WR.txt" | |||
|
11 | dict= ReadfileWR(filename).getDict() | |||
|
12 | ||||
|
13 | FixRCP_IPP = dict['ipp']*0.15 #equivalencia | |||
|
14 | dataBlocksPerFile= dict['b_f_adq'] | |||
|
15 | profilesPerBlock= int(dict['n']) | |||
|
16 | pulsepair = int(dict['n']) | |||
|
17 | #************************************************************************* | |||
5 | path = '/home/developer/Downloads/HDF5_TESTPP2V3' |
|
18 | path = '/home/developer/Downloads/HDF5_TESTPP2V3' | |
6 | figpath = path |
|
19 | figpath = path | |
7 | desc = "Simulator Test" |
|
20 | desc = "Simulator Test" | |
8 | controllerObj = Project() |
|
21 | controllerObj = Project() | |
9 | controllerObj.setup(id='10',name='Test Simulator',description=desc) |
|
22 | controllerObj.setup(id='10',name='Test Simulator',description=desc) | |
10 | readUnitConfObj = controllerObj.addReadUnit(datatype='SimulatorReader', |
|
23 | readUnitConfObj = controllerObj.addReadUnit(datatype='SimulatorReader', | |
11 | frequency=9.345e9, |
|
24 | frequency=9.345e9, | |
12 |
FixRCP_IPP= |
|
25 | FixRCP_IPP= FixRCP_IPP, | |
13 | Tau_0 = 30, |
|
26 | Tau_0 = 30, | |
14 | AcqH0_0=0, |
|
27 | AcqH0_0=0, | |
15 | samples=330, |
|
28 | samples=330, | |
16 | AcqDH_0=0.15, |
|
29 | AcqDH_0=0.15, | |
17 | FixRCP_TXA=0.15, |
|
30 | FixRCP_TXA=0.15, | |
18 | FixRCP_TXB=0.15, |
|
31 | FixRCP_TXB=0.15, | |
19 | Fdoppler=600.0, |
|
32 | Fdoppler=600.0, | |
20 | Hdoppler=36, |
|
33 | Hdoppler=36, | |
21 | Adoppler=300,#300 |
|
34 | Adoppler=300,#300 | |
22 | delay=0, |
|
35 | delay=0, | |
23 | online=0, |
|
36 | online=0, | |
24 | walk=0, |
|
37 | walk=0, | |
25 |
profilesPerBlock= |
|
38 | profilesPerBlock=profilesPerBlock, | |
26 |
dataBlocksPerFile= |
|
39 | dataBlocksPerFile=dataBlocksPerFile)#,#nTotalReadFiles=2) | |
27 | #opObj11 = readUnitConfObj.addOperation(name='printInfo') |
|
40 | #opObj11 = readUnitConfObj.addOperation(name='printInfo') | |
28 | procUnitConfObjA = controllerObj.addProcUnit(datatype='VoltageProc', inputId=readUnitConfObj.getId()) |
|
41 | procUnitConfObjA = controllerObj.addProcUnit(datatype='VoltageProc', inputId=readUnitConfObj.getId()) | |
|
42 | ||||
29 | opObj11 = procUnitConfObjA.addOperation(name='PulsePair') |
|
43 | opObj11 = procUnitConfObjA.addOperation(name='PulsePair') | |
30 |
opObj11.addParameter(name='n', value= |
|
44 | opObj11.addParameter(name='n', value=pulsepair, format='int')#10 | |
|
45 | ||||
31 | procUnitConfObjB= controllerObj.addProcUnit(datatype='ParametersProc',inputId=procUnitConfObjA.getId()) |
|
46 | procUnitConfObjB= controllerObj.addProcUnit(datatype='ParametersProc',inputId=procUnitConfObjA.getId()) | |
|
47 | ||||
32 | opObj10 = procUnitConfObjB.addOperation(name='HDFWriter') |
|
48 | opObj10 = procUnitConfObjB.addOperation(name='HDFWriter') | |
33 | opObj10.addParameter(name='path',value=figpath) |
|
49 | opObj10.addParameter(name='path',value=figpath) | |
34 | #opObj10.addParameter(name='mode',value=2) |
|
50 | #opObj10.addParameter(name='mode',value=2) | |
35 | opObj10.addParameter(name='blocksPerFile',value='100',format='int') |
|
51 | opObj10.addParameter(name='blocksPerFile',value='100',format='int') | |
36 | opObj10.addParameter(name='metadataList',value='utctimeInit,paramInterval,heightList,profileIndex,flagDataAsBlock',format='list') |
|
52 | opObj10.addParameter(name='metadataList',value='utctimeInit,paramInterval,heightList,profileIndex,flagDataAsBlock',format='list') | |
37 | opObj10.addParameter(name='dataList',value='dataPP_POW,dataPP_DOP,utctime',format='list')#,format='list' |
|
53 | opObj10.addParameter(name='dataList',value='dataPP_POW,dataPP_DOP,utctime',format='list')#,format='list' | |
|
54 | ||||
38 | controllerObj.start() |
|
55 | controllerObj.start() |
@@ -1,73 +1,74 | |||||
1 | import os,sys |
|
1 | import os,sys | |
2 | import datetime |
|
2 | import datetime | |
3 | import time |
|
3 | import time | |
4 | from schainpy.controller import Project |
|
4 | from schainpy.controller import Project | |
|
5 | ||||
5 | path = '/home/alex/Downloads/NEW_WR2/spc16removeDC' |
|
6 | path = '/home/alex/Downloads/NEW_WR2/spc16removeDC' | |
6 | figpath = path |
|
7 | figpath = path | |
7 | desc = "Simulator Test" |
|
8 | desc = "Simulator Test" | |
8 |
|
9 | |||
9 | controllerObj = Project() |
|
10 | controllerObj = Project() | |
10 |
|
11 | |||
11 | controllerObj.setup(id='10',name='Test Simulator',description=desc) |
|
12 | controllerObj.setup(id='10',name='Test Simulator',description=desc) | |
12 |
|
13 | |||
13 | readUnitConfObj = controllerObj.addReadUnit(datatype='SimulatorReader', |
|
14 | readUnitConfObj = controllerObj.addReadUnit(datatype='SimulatorReader', | |
14 | frequency=9.345e9, |
|
15 | frequency=9.345e9, | |
15 | FixRCP_IPP= 60, |
|
16 | FixRCP_IPP= 60, | |
16 | Tau_0 = 30, |
|
17 | Tau_0 = 30, | |
17 | AcqH0_0=0, |
|
18 | AcqH0_0=0, | |
18 | samples=330, |
|
19 | samples=330, | |
19 | AcqDH_0=0.15, |
|
20 | AcqDH_0=0.15, | |
20 | FixRCP_TXA=0.15, |
|
21 | FixRCP_TXA=0.15, | |
21 | FixRCP_TXB=0.15, |
|
22 | FixRCP_TXB=0.15, | |
22 | Fdoppler=600.0, |
|
23 | Fdoppler=600.0, | |
23 | Hdoppler=36, |
|
24 | Hdoppler=36, | |
24 | Adoppler=300,#300 |
|
25 | Adoppler=300,#300 | |
25 | delay=0, |
|
26 | delay=0, | |
26 | online=0, |
|
27 | online=0, | |
27 | walk=0, |
|
28 | walk=0, | |
28 | profilesPerBlock=625, |
|
29 | profilesPerBlock=625, | |
29 | dataBlocksPerFile=100)#,#nTotalReadFiles=2) |
|
30 | dataBlocksPerFile=100)#,#nTotalReadFiles=2) | |
30 | ''' |
|
31 | ''' | |
31 | readUnitConfObj = controllerObj.addReadUnit(datatype='VoltageReader', |
|
32 | readUnitConfObj = controllerObj.addReadUnit(datatype='VoltageReader', | |
32 | path=path, |
|
33 | path=path, | |
33 | startDate="2020/01/01", #"2020/01/01",#today, |
|
34 | startDate="2020/01/01", #"2020/01/01",#today, | |
34 | endDate= "2020/12/01", #"2020/12/30",#today, |
|
35 | endDate= "2020/12/01", #"2020/12/30",#today, | |
35 | startTime='00:00:00', |
|
36 | startTime='00:00:00', | |
36 | endTime='23:59:59', |
|
37 | endTime='23:59:59', | |
37 | delay=0, |
|
38 | delay=0, | |
38 | #set=0, |
|
39 | #set=0, | |
39 | online=0, |
|
40 | online=0, | |
40 | walk=1) |
|
41 | walk=1) | |
41 | ''' |
|
42 | ''' | |
42 | opObj11 = readUnitConfObj.addOperation(name='printInfo') |
|
43 | opObj11 = readUnitConfObj.addOperation(name='printInfo') | |
43 |
|
44 | |||
44 | procUnitConfObjA = controllerObj.addProcUnit(datatype='VoltageProc', inputId=readUnitConfObj.getId()) |
|
45 | procUnitConfObjA = controllerObj.addProcUnit(datatype='VoltageProc', inputId=readUnitConfObj.getId()) | |
45 | #opObj11 = procUnitConfObjA.addOperation(name='CohInt', optype='other') |
|
46 | #opObj11 = procUnitConfObjA.addOperation(name='CohInt', optype='other') | |
46 | #opObj11.addParameter(name='n', value='10', format='int') |
|
47 | #opObj11.addParameter(name='n', value='10', format='int') | |
47 |
|
48 | |||
48 | #opObj10 = procUnitConfObjA.addOperation(name='selectChannels') |
|
49 | #opObj10 = procUnitConfObjA.addOperation(name='selectChannels') | |
49 | #opObj10.addParameter(name='channelList', value=[0]) |
|
50 | #opObj10.addParameter(name='channelList', value=[0]) | |
50 | opObj11 = procUnitConfObjA.addOperation(name='PulsePairVoltage', optype='other') |
|
51 | opObj11 = procUnitConfObjA.addOperation(name='PulsePairVoltage', optype='other') | |
51 | opObj11.addParameter(name='n', value='625', format='int')#10 |
|
52 | opObj11.addParameter(name='n', value='625', format='int')#10 | |
52 | opObj11.addParameter(name='removeDC', value=1, format='int') |
|
53 | opObj11.addParameter(name='removeDC', value=1, format='int') | |
53 |
|
54 | |||
54 | #opObj11 = procUnitConfObjA.addOperation(name='PulsepairPowerPlot', optype='other') |
|
55 | #opObj11 = procUnitConfObjA.addOperation(name='PulsepairPowerPlot', optype='other') | |
55 | #opObj11 = procUnitConfObjA.addOperation(name='PulsepairSignalPlot', optype='other') |
|
56 | #opObj11 = procUnitConfObjA.addOperation(name='PulsepairSignalPlot', optype='other') | |
56 |
|
57 | |||
57 |
|
58 | |||
58 | #opObj11 = procUnitConfObjA.addOperation(name='PulsepairVelocityPlot', optype='other') |
|
59 | #opObj11 = procUnitConfObjA.addOperation(name='PulsepairVelocityPlot', optype='other') | |
59 | #opObj11.addParameter(name='xmax', value=8) |
|
60 | #opObj11.addParameter(name='xmax', value=8) | |
60 |
|
61 | |||
61 | #opObj11 = procUnitConfObjA.addOperation(name='PulsepairSpecwidthPlot', optype='other') |
|
62 | #opObj11 = procUnitConfObjA.addOperation(name='PulsepairSpecwidthPlot', optype='other') | |
62 |
|
63 | |||
63 | procUnitConfObjB= controllerObj.addProcUnit(datatype='ParametersProc',inputId=procUnitConfObjA.getId()) |
|
64 | procUnitConfObjB= controllerObj.addProcUnit(datatype='ParametersProc',inputId=procUnitConfObjA.getId()) | |
64 |
|
65 | |||
65 |
|
66 | |||
66 | opObj10 = procUnitConfObjB.addOperation(name='ParameterWriter') |
|
67 | opObj10 = procUnitConfObjB.addOperation(name='ParameterWriter') | |
67 | opObj10.addParameter(name='path',value=figpath) |
|
68 | opObj10.addParameter(name='path',value=figpath) | |
68 | #opObj10.addParameter(name='mode',value=0) |
|
69 | #opObj10.addParameter(name='mode',value=0) | |
69 | opObj10.addParameter(name='blocksPerFile',value='100',format='int') |
|
70 | opObj10.addParameter(name='blocksPerFile',value='100',format='int') | |
70 | opObj10.addParameter(name='metadataList',value='utctimeInit,timeInterval',format='list') |
|
71 | opObj10.addParameter(name='metadataList',value='utctimeInit,timeInterval',format='list') | |
71 | opObj10.addParameter(name='dataList',value='dataPP_POW,dataPP_DOP,dataPP_SNR,dataPP_WIDTH')#,format='list' |
|
72 | opObj10.addParameter(name='dataList',value='dataPP_POW,dataPP_DOP,dataPP_SNR,dataPP_WIDTH')#,format='list' | |
72 |
|
73 | |||
73 | controllerObj.start() |
|
74 | controllerObj.start() |
@@ -1,189 +1,214 | |||||
1 | import os,numpy,h5py |
|
1 | import os,numpy,h5py | |
2 | from shutil import copyfile |
|
2 | from shutil import copyfile | |
3 | import sys,time |
|
3 | import sys,time | |
4 |
|
4 | |||
5 | def isNumber(str): |
|
5 | def isNumber(str): | |
6 | try: |
|
6 | try: | |
7 | float(str) |
|
7 | float(str) | |
8 | return True |
|
8 | return True | |
9 | except: |
|
9 | except: | |
10 | return False |
|
10 | return False | |
11 |
|
11 | |||
12 | def getfirstFilefromPath(path,meta,ext): |
|
12 | def getfirstFilefromPath(path,meta,ext): | |
13 | validFilelist = [] |
|
13 | validFilelist = [] | |
14 | fileList = os.listdir(path) |
|
14 | fileList = os.listdir(path) | |
15 | if len(fileList)<1: |
|
15 | if len(fileList)<1: | |
16 | return None |
|
16 | return None | |
17 | # meta 1234 567 8-18 BCDE |
|
17 | # meta 1234 567 8-18 BCDE | |
18 | # H,D,PE YYYY DDD EPOC .ext |
|
18 | # H,D,PE YYYY DDD EPOC .ext | |
19 |
|
19 | |||
20 | for thisFile in fileList: |
|
20 | for thisFile in fileList: | |
21 | if meta =="PE": |
|
21 | if meta =="PE": | |
22 | try: |
|
22 | try: | |
23 | number= int(thisFile[len(meta)+7:len(meta)+17]) |
|
23 | number= int(thisFile[len(meta)+7:len(meta)+17]) | |
24 | except: |
|
24 | except: | |
25 | print("There is a file or folder with different format") |
|
25 | print("There is a file or folder with different format") | |
26 | if meta == "D": |
|
26 | if meta == "D": | |
27 | try: |
|
27 | try: | |
28 | number= int(thisFile[8:11]) |
|
28 | number= int(thisFile[8:11]) | |
29 | except: |
|
29 | except: | |
30 | print("There is a file or folder with different format") |
|
30 | print("There is a file or folder with different format") | |
31 |
|
31 | |||
32 | if not isNumber(str=number): |
|
32 | if not isNumber(str=number): | |
33 | continue |
|
33 | continue | |
34 | if (os.path.splitext(thisFile)[-1].lower() != ext.lower()): |
|
34 | if (os.path.splitext(thisFile)[-1].lower() != ext.lower()): | |
35 | continue |
|
35 | continue | |
36 | validFilelist.sort() |
|
36 | validFilelist.sort() | |
37 | validFilelist.append(thisFile) |
|
37 | validFilelist.append(thisFile) | |
38 | if len(validFilelist)>0: |
|
38 | if len(validFilelist)>0: | |
39 | validFilelist = sorted(validFilelist,key=str.lower) |
|
39 | validFilelist = sorted(validFilelist,key=str.lower) | |
40 | return validFilelist |
|
40 | return validFilelist | |
41 | return None |
|
41 | return None | |
42 |
|
42 | |||
43 | def gettimeutcfromDirFilename(path,file): |
|
43 | def gettimeutcfromDirFilename(path,file): | |
44 | dir_file= path+"/"+file |
|
44 | dir_file= path+"/"+file | |
45 | fp = h5py.File(dir_file,'r') |
|
45 | fp = h5py.File(dir_file,'r') | |
46 | epoc = fp['Metadata'].get('utctimeInit')[()] |
|
46 | epoc = fp['Metadata'].get('utctimeInit')[()] | |
47 | fp.close() |
|
47 | fp.close() | |
48 | return epoc |
|
48 | return epoc | |
49 |
|
49 | |||
50 | def getDatavaluefromDirFilename(path,file,value): |
|
50 | def getDatavaluefromDirFilename(path,file,value): | |
51 | dir_file= path+"/"+file |
|
51 | dir_file= path+"/"+file | |
52 | fp = h5py.File(dir_file,'r') |
|
52 | fp = h5py.File(dir_file,'r') | |
53 | array = fp['Data'].get(value)[()] |
|
53 | array = fp['Data'].get(value)[()] | |
54 | fp.close() |
|
54 | fp.close() | |
55 | return array |
|
55 | return array | |
56 |
|
56 | |||
|
57 | opt = input ("Ingresa Modo de integracion: ") | |||
|
58 | ||||
|
59 | if opt==1: | |||
|
60 | #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· Velocidad de PedestalΒ·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· | |||
|
61 | w = input ("Ingresa velocidad de Pedestal: ") | |||
|
62 | w = 4 | |||
|
63 | w = float(w) | |||
|
64 | #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· Resolucion minimo en gradosΒ·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· | |||
|
65 | alfa = input ("Ingresa resolucion minima en grados: ") | |||
|
66 | alfa = 1 | |||
|
67 | alfa = float(alfa) | |||
|
68 | #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· IPP del Experimento Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· | |||
|
69 | IPP = input ("Ingresa el IPP del experimento: ") | |||
|
70 | IPP = 0.0004 | |||
|
71 | IPP = float(IPP) | |||
|
72 | #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· MODE Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· | |||
|
73 | mode = input ("Ingresa el MODO del experimento Time(1) or F(0): ") | |||
|
74 | mode = 1 | |||
|
75 | mode = int(mode) | |||
|
76 | ||||
|
77 | time_Interval_p=0.01 | |||
|
78 | n_perfiles_p = 100 | |||
|
79 | blocksPerFile = 100 | |||
|
80 | tiempo_file_1_adq=25 | |||
|
81 | tiempo_file_1_ped=1 | |||
57 |
|
82 | |||
58 | #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· Velocidad de PedestalΒ·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· |
|
83 | else: | |
59 | w = input ("Ingresa velocidad de Pedestal: ") |
|
84 | from readFileconfig import ReadfileWR | |
60 | w = 4 |
|
85 | filename= "/home/developer/Downloads/config_WR.txt" | |
61 | w = float(w) |
|
86 | dict= ReadfileWR(filename).getDict() | |
62 | #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· Resolucion minimo en gradosΒ·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· |
|
87 | mode = dict['mode'] | |
63 | alfa = input ("Ingresa resolucion minima en grados: ") |
|
88 | w = dict['vel_ped_azi'] | |
64 | alfa = 1 |
|
89 | alfa= dict['resolution'] | |
65 | alfa = float(alfa) |
|
90 | IPP = dict['ipp']*1e-6 | |
66 | #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· IPP del Experimento Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· |
|
91 | time_Interval_p = dict['t_s_ped'] | |
67 | IPP = input ("Ingresa el IPP del experimento: ") |
|
92 | n_perfiles_p = dict['len_ped'] | |
68 | IPP = 0.0004 |
|
93 | blocksPerFile = int(dict['b_f_adq']) | |
69 | IPP = float(IPP) |
|
94 | ||
70 | #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· MODE Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· |
|
95 | tiempo_file_1_adq= dict['t_f_adq'] | |
71 | mode = input ("Ingresa el MODO del experimento T or F: ") |
|
96 | tiempo_file_1_ped= dict['t_f_ped'] | |
72 | mode = "T" |
|
|||
73 | mode = str(mode) |
|
|||
74 |
|
97 | |||
75 | #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· Tiempo en generar la resolucion minΒ·Β·Β· |
|
98 | #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· Tiempo en generar la resolucion minΒ·Β·Β· | |
76 | #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· MCU Β·Β· var_ang = w * (var_tiempo)Β·Β·Β· |
|
99 | #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· MCU Β·Β· var_ang = w * (var_tiempo)Β·Β·Β· | |
77 | var_tiempo = alfa/w |
|
100 | var_tiempo = alfa/w | |
78 | #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· Tiempo Equivalente en perfilesΒ·Β·Β·Β·Β·Β·Β·Β· |
|
101 | #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· Tiempo Equivalente en perfilesΒ·Β·Β·Β·Β·Β·Β·Β· | |
79 | #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· var_tiempo = IPP * ( num_perfiles )Β· |
|
102 | #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· var_tiempo = IPP * ( num_perfiles )Β· | |
80 | num_perfiles = int(var_tiempo/IPP) |
|
103 | num_perfiles = int(var_tiempo/IPP) | |
81 |
|
104 | |||
82 | #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·DATA PEDESTALΒ·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· |
|
105 | #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·DATA PEDESTALΒ·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· | |
83 | dir_pedestal = "/home/developer/Downloads/Pedestal/P2021093" |
|
106 | dir_pedestal = "/home/developer/Downloads/Pedestal/P2021093" | |
84 | #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· DATA ADQΒ·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· |
|
107 | #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· DATA ADQΒ·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· | |
85 |
if mode== |
|
108 | if mode==1: | |
86 | dir_adq = "/home/developer/Downloads/HDF5_TESTPP2V3/d2021093" # Time domain |
|
109 | dir_adq = "/home/developer/Downloads/HDF5_TESTPP2V3/d2021093" # Time domain | |
87 | else: |
|
110 | else: | |
88 | dir_adq = "/home/developer/Downloads/hdf5_test/d2021053" # Frequency domain |
|
111 | dir_adq = "/home/developer/Downloads/hdf5_test/d2021053" # Frequency domain | |
89 |
|
112 | |||
90 | print( "Velocidad angular :", w) |
|
113 | print( "Velocidad angular :", w) | |
91 | print( "Resolucion minima en grados :", alfa) |
|
114 | print( "Resolucion minima en grados :", alfa) | |
92 | print( "Numero de perfiles equivalente:", num_perfiles) |
|
115 | print( "Numero de perfiles equivalente:", num_perfiles) | |
93 | print( "Mode :", mode) |
|
116 | print( "Mode :", mode) | |
94 |
|
117 | |||
95 | #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· First FileΒ·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· |
|
118 | #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· First FileΒ·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· | |
96 | list_pedestal = getfirstFilefromPath(path=dir_pedestal,meta="PE",ext=".hdf5") |
|
119 | list_pedestal = getfirstFilefromPath(path=dir_pedestal,meta="PE",ext=".hdf5") | |
97 | list_adq = getfirstFilefromPath(path=dir_adq ,meta="D",ext=".hdf5") |
|
120 | list_adq = getfirstFilefromPath(path=dir_adq ,meta="D",ext=".hdf5") | |
98 | print("list_pedestal") |
|
121 | print("list_pedestal") | |
99 | #print(list_pedestal) |
|
122 | #print(list_pedestal) | |
100 | print("list_adq") |
|
123 | print("list_adq") | |
101 | #print(list_adq) |
|
124 | #print(list_adq) | |
102 | #sys.exit(0) |
|
125 | #sys.exit(0) | |
103 | #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· utc time Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· |
|
126 | #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· utc time Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β· | |
104 | utc_pedestal= gettimeutcfromDirFilename(path=dir_pedestal,file=list_pedestal[0]) |
|
127 | utc_pedestal= gettimeutcfromDirFilename(path=dir_pedestal,file=list_pedestal[0]) | |
105 | utc_adq = gettimeutcfromDirFilename(path=dir_adq ,file=list_adq[0]) |
|
128 | utc_adq = gettimeutcfromDirFilename(path=dir_adq ,file=list_adq[0]) | |
106 |
|
129 | |||
107 | print("utc_pedestal :",utc_pedestal) |
|
130 | print("utc_pedestal :",utc_pedestal) | |
108 | print("utc_adq :",utc_adq) |
|
131 | print("utc_adq :",utc_adq) | |
109 | #sys.exit(0) |
|
132 | #sys.exit(0) | |
110 |
|
133 | |||
111 | #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Relacion: utc_adq (+/-) var_tiempo*nro_file= utc_pedestal |
|
134 | #Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·Relacion: utc_adq (+/-) var_tiempo*nro_file= utc_pedestal | |
112 | time_Interval_p = 0.01 |
|
135 | time_Interval_p = time_Interval_p#0.01 | |
113 |
n_perfiles_p = |
|
136 | n_perfiles_p = n_perfiles_p #100 muestras por achivo del pedestal | |
114 |
|
137 | |||
115 |
|
138 | |||
116 | if utc_adq>utc_pedestal: |
|
139 | if utc_adq>utc_pedestal: | |
117 | nro_file = int((utc_adq - utc_pedestal)/(time_Interval_p*n_perfiles_p)) |
|
140 | nro_file = int((utc_adq - utc_pedestal)/(time_Interval_p*n_perfiles_p)) | |
118 | print("nro_file",nro_file) |
|
141 | print("nro_file",nro_file) | |
119 | ff_pedestal = list_pedestal[nro_file] |
|
142 | ff_pedestal = list_pedestal[nro_file] | |
120 | print(ff_pedestal) |
|
143 | print(ff_pedestal) | |
121 | utc_pedestal = gettimeutcfromDirFilename(path=dir_pedestal,file=ff_pedestal) |
|
144 | utc_pedestal = gettimeutcfromDirFilename(path=dir_pedestal,file=ff_pedestal) | |
122 | print(utc_pedestal) |
|
145 | print(utc_pedestal) | |
123 | nro_key_p = int((utc_adq-utc_pedestal)/time_Interval_p) |
|
146 | nro_key_p = int((utc_adq-utc_pedestal)/time_Interval_p) | |
124 | print(nro_key_p) |
|
147 | print(nro_key_p) | |
125 | #sys.exit(0) |
|
148 | #sys.exit(0) | |
126 | if utc_adq >utc_pedestal: |
|
149 | if utc_adq >utc_pedestal: | |
127 | ff_pedestal = ff_pedestal |
|
150 | ff_pedestal = ff_pedestal | |
128 | else: |
|
151 | else: | |
129 | nro_file = nro_file-1 |
|
152 | nro_file = nro_file-1 | |
130 | ff_pedestal = list_pedestal[nro_file] |
|
153 | ff_pedestal = list_pedestal[nro_file] | |
131 | utc_pedestal = gettimeutcfromDirFilename(path=dir_pedestal,file=ff_pedestal) |
|
154 | utc_pedestal = gettimeutcfromDirFilename(path=dir_pedestal,file=ff_pedestal) | |
132 | angulo = getDatavaluefromDirFilename(path=dir_pedestal,file=ff_pedestal,value="azimuth") |
|
155 | angulo = getDatavaluefromDirFilename(path=dir_pedestal,file=ff_pedestal,value="azimuth") | |
133 | nro_key_p = int((utc_adq-utc_pedestal)/time_Interval_p) |
|
156 | nro_key_p = int((utc_adq-utc_pedestal)/time_Interval_p) | |
134 | print("nro_file :",nro_file) |
|
157 | print("nro_file :",nro_file) | |
135 | print("name_file :",ff_pedestal) |
|
158 | print("name_file :",ff_pedestal) | |
136 | print("utc_pedestal_file :",utc_pedestal) |
|
159 | print("utc_pedestal_file :",utc_pedestal) | |
137 | print("nro_key_p :",nro_key_p) |
|
160 | print("nro_key_p :",nro_key_p) | |
138 | print("utc_pedestal_init :",utc_pedestal+nro_key_p*time_Interval_p) |
|
161 | print("utc_pedestal_init :",utc_pedestal+nro_key_p*time_Interval_p) | |
139 | print("angulo_array :",angulo[nro_key_p]) |
|
162 | print("angulo_array :",angulo[nro_key_p]) | |
140 | #4+25+25+25+21 |
|
163 | #4+25+25+25+21 | |
141 | #while True: |
|
164 | #while True: | |
142 | list_pedestal = getfirstFilefromPath(path=dir_pedestal,meta="PE",ext=".hdf5") |
|
165 | list_pedestal = getfirstFilefromPath(path=dir_pedestal,meta="PE",ext=".hdf5") | |
143 | list_adq = getfirstFilefromPath(path=dir_adq ,meta="D",ext=".hdf5") |
|
166 | list_adq = getfirstFilefromPath(path=dir_adq ,meta="D",ext=".hdf5") | |
144 |
|
167 | |||
145 | nro_file = nro_file #10 |
|
168 | nro_file = nro_file #10 | |
146 | nro_key_perfil = nro_key_p |
|
169 | nro_key_perfil = nro_key_p | |
147 | blocksPerFile = 100##### aqui se cambia dependiendo de los blqoues por achivo en adq |
|
170 | blocksPerFile = blocksPerFile#100##### aqui se cambia dependiendo de los blqoues por achivo en adq | |
148 | wr_path = "/home/developer/Downloads/HDF5_WR/" |
|
171 | wr_path = "/home/developer/Downloads/HDF5_WR/" | |
149 | # Lectura de archivos de adquisicion para adicion de azimuth |
|
172 | # Lectura de archivos de adquisicion para adicion de azimuth | |
150 | # factor de archivos |
|
173 | # factor de archivos | |
151 | #f_a_p = tiempo_file_1_adq/tiempo_file_1_ped=25/1 = 25 |
|
174 | #f_a_p = tiempo_file_1_adq/tiempo_file_1_ped=25/1 = 25 | |
152 |
tiempo_file_1_adq= |
|
175 | tiempo_file_1_adq = tiempo_file_1_adq | |
153 | tiempo_file_1_ped=1 |
|
176 | tiempo_file_1_ped = tiempo_file_1_ped | |
|
177 | ||||
154 | f_a_p= int(tiempo_file_1_adq/tiempo_file_1_ped) |
|
178 | f_a_p= int(tiempo_file_1_adq/tiempo_file_1_ped) | |
|
179 | ||||
155 | for thisFile in range(len(list_adq)): |
|
180 | for thisFile in range(len(list_adq)): | |
156 | print("thisFileAdq",thisFile) |
|
181 | print("thisFileAdq",thisFile) | |
157 | angulo_adq = numpy.zeros(blocksPerFile) |
|
182 | angulo_adq = numpy.zeros(blocksPerFile) | |
158 | tmp = 0 |
|
183 | tmp = 0 | |
159 | for j in range(blocksPerFile): |
|
184 | for j in range(blocksPerFile): | |
160 | iterador = nro_key_perfil + f_a_p*(j-tmp) |
|
185 | iterador = nro_key_perfil + f_a_p*(j-tmp) | |
161 | #print("iterador",iterador) |
|
186 | #print("iterador",iterador) | |
162 | if iterador < n_perfiles_p: |
|
187 | if iterador < n_perfiles_p: | |
163 | nro_file = nro_file |
|
188 | nro_file = nro_file | |
164 | else: |
|
189 | else: | |
165 | nro_file = nro_file+1 |
|
190 | nro_file = nro_file+1 | |
166 | dif = blocksPerFile-(nro_key_perfil+f_a_p*(j-tmp-1)) |
|
191 | dif = blocksPerFile-(nro_key_perfil+f_a_p*(j-tmp-1)) | |
167 | tmp = j |
|
192 | tmp = j | |
168 | nro_key_perfil= f_a_p-dif |
|
193 | nro_key_perfil= f_a_p-dif | |
169 | iterador = nro_key_perfil |
|
194 | iterador = nro_key_perfil | |
170 | #print(iterador) |
|
195 | #print(iterador) | |
171 | print("nro_file",nro_file) |
|
196 | print("nro_file",nro_file) | |
172 | ff_pedestal = list_pedestal[nro_file] |
|
197 | ff_pedestal = list_pedestal[nro_file] | |
173 | angulo = getDatavaluefromDirFilename(path=dir_pedestal,file=ff_pedestal,value="azimuth") |
|
198 | angulo = getDatavaluefromDirFilename(path=dir_pedestal,file=ff_pedestal,value="azimuth") | |
174 | angulo_adq[j]= angulo[iterador] |
|
199 | angulo_adq[j]= angulo[iterador] | |
175 | copyfile(dir_adq+"/"+list_adq[thisFile],wr_path+list_adq[thisFile]) |
|
200 | copyfile(dir_adq+"/"+list_adq[thisFile],wr_path+list_adq[thisFile]) | |
176 | fp = h5py.File(wr_path+list_adq[thisFile],'a') |
|
201 | fp = h5py.File(wr_path+list_adq[thisFile],'a') | |
177 | #grp = fp.create_group("Pedestal") |
|
202 | #grp = fp.create_group("Pedestal") | |
178 | grp = fp['Metadata'] |
|
203 | grp = fp['Metadata'] | |
179 | #sgrp = grp.create_group('Pedestal') |
|
204 | #sgrp = grp.create_group('Pedestal') | |
180 | dset = grp.create_dataset("azimuth" , data=angulo_adq) |
|
205 | dset = grp.create_dataset("azimuth" , data=angulo_adq) | |
181 | fp.close() |
|
206 | fp.close() | |
182 | print("Angulo",angulo_adq) |
|
207 | print("Angulo",angulo_adq) | |
183 | print("Angulo",len(angulo_adq)) |
|
208 | print("Angulo",len(angulo_adq)) | |
184 | nro_key_perfil=iterador + f_a_p |
|
209 | nro_key_perfil=iterador + f_a_p | |
185 | if nro_key_perfil< n_perfiles_p: |
|
210 | if nro_key_perfil< n_perfiles_p: | |
186 | nro_file = nro_file |
|
211 | nro_file = nro_file | |
187 | else: |
|
212 | else: | |
188 | nro_file = nro_file+1 |
|
213 | nro_file = nro_file+1 | |
189 | nro_key_perfil= nro_key_p |
|
214 | nro_key_perfil= nro_key_p |
General Comments 0
You need to be logged in to leave comments.
Login now