@@ -5,4 +5,4 try: | |||||
5 | except: |
|
5 | except: | |
6 | pass |
|
6 | pass | |
7 |
|
7 | |||
8 |
__version__ = '3.0.0b |
|
8 | __version__ = '3.0.0b6' |
@@ -873,4 +873,26 class IncohInt(Operation): | |||||
873 | dataOut.utctime = avgdatatime |
|
873 | dataOut.utctime = avgdatatime | |
874 | dataOut.flagNoData = False |
|
874 | dataOut.flagNoData = False | |
875 |
|
875 | |||
876 | return dataOut No newline at end of file |
|
876 | return dataOut | |
|
877 | ||||
|
878 | class dopplerFlip(Operation): | |||
|
879 | ||||
|
880 | def run(self, dataOut): | |||
|
881 | # arreglo 1: (num_chan, num_profiles, num_heights) | |||
|
882 | self.dataOut = dataOut | |||
|
883 | # JULIA-oblicua, indice 2 | |||
|
884 | # arreglo 2: (num_profiles, num_heights) | |||
|
885 | jspectra = self.dataOut.data_spc[2] | |||
|
886 | jspectra_tmp = numpy.zeros(jspectra.shape) | |||
|
887 | num_profiles = jspectra.shape[0] | |||
|
888 | freq_dc = int(num_profiles / 2) | |||
|
889 | # Flip con for | |||
|
890 | for j in range(num_profiles): | |||
|
891 | jspectra_tmp[num_profiles-j-1]= jspectra[j] | |||
|
892 | # Intercambio perfil de DC con perfil inmediato anterior | |||
|
893 | jspectra_tmp[freq_dc-1]= jspectra[freq_dc-1] | |||
|
894 | jspectra_tmp[freq_dc]= jspectra[freq_dc] | |||
|
895 | # canal modificado es re-escrito en el arreglo de canales | |||
|
896 | self.dataOut.data_spc[2] = jspectra_tmp | |||
|
897 | ||||
|
898 | return self.dataOut No newline at end of file |
@@ -146,7 +146,7 class selectChannels(Operation): | |||||
146 |
|
146 | |||
147 | class selectHeights(Operation): |
|
147 | class selectHeights(Operation): | |
148 |
|
148 | |||
149 | def run(self, dataOut, minHei=None, maxHei=None): |
|
149 | def run(self, dataOut, minHei=None, maxHei=None, minIndex=None, maxIndex=None): | |
150 | """ |
|
150 | """ | |
151 | Selecciona un bloque de datos en base a un grupo de valores de alturas segun el rango |
|
151 | Selecciona un bloque de datos en base a un grupo de valores de alturas segun el rango | |
152 | minHei <= height <= maxHei |
|
152 | minHei <= height <= maxHei | |
@@ -164,34 +164,30 class selectHeights(Operation): | |||||
164 |
|
164 | |||
165 | self.dataOut = dataOut |
|
165 | self.dataOut = dataOut | |
166 |
|
166 | |||
167 |
if minHei |
|
167 | if minHei and maxHei: | |
168 | minHei = self.dataOut.heightList[0] |
|
|||
169 |
|
168 | |||
170 | if maxHei == None: |
|
169 | if (minHei < self.dataOut.heightList[0]): | |
171 |
|
|
170 | minHei = self.dataOut.heightList[0] | |
172 |
|
171 | |||
173 |
if (m |
|
172 | if (maxHei > self.dataOut.heightList[-1]): | |
174 |
|
|
173 | maxHei = self.dataOut.heightList[-1] | |
175 |
|
174 | |||
176 | if (maxHei > self.dataOut.heightList[-1]): |
|
175 | minIndex = 0 | |
177 | maxHei = self.dataOut.heightList[-1] |
|
176 | maxIndex = 0 | |
178 |
|
177 | heights = self.dataOut.heightList | ||
179 | minIndex = 0 |
|
|||
180 | maxIndex = 0 |
|
|||
181 | heights = self.dataOut.heightList |
|
|||
182 |
|
178 | |||
183 | inda = numpy.where(heights >= minHei) |
|
179 | inda = numpy.where(heights >= minHei) | |
184 | indb = numpy.where(heights <= maxHei) |
|
180 | indb = numpy.where(heights <= maxHei) | |
185 |
|
181 | |||
186 | try: |
|
182 | try: | |
187 | minIndex = inda[0][0] |
|
183 | minIndex = inda[0][0] | |
188 | except: |
|
184 | except: | |
189 | minIndex = 0 |
|
185 | minIndex = 0 | |
190 |
|
186 | |||
191 | try: |
|
187 | try: | |
192 | maxIndex = indb[0][-1] |
|
188 | maxIndex = indb[0][-1] | |
193 | except: |
|
189 | except: | |
194 | maxIndex = len(heights) |
|
190 | maxIndex = len(heights) | |
195 |
|
191 | |||
196 | self.selectHeightsByIndex(minIndex, maxIndex) |
|
192 | self.selectHeightsByIndex(minIndex, maxIndex) | |
197 |
|
193 |
General Comments 0
You need to be logged in to leave comments.
Login now