##// END OF EJS Templates
amountdata from statistics150km method as a user parameter. By default is 3 and it represents the minimun quantity of velocity samples to be considering to proccess.
imanay -
r1799:72fde67b5cb4 v3.0-devel
parent child
Show More
@@ -3120,7 +3120,7 class JULIA_DayVelocities(Operation):
3120
3120
3121
3121
3122 def statistics150km(self, veloc , sigma , threshold , old_veloc=None, count=0, \
3122 def statistics150km(self, veloc , sigma , threshold , old_veloc=None, count=0, \
3123 currTime=None, oldTime=None, amountdata=2, clearAll = None, timeFactor=1800, debug = False):
3123 currTime=None, oldTime=None, amountdata=3, clearAll = None, timeFactor=1800, debug = False):
3124
3124
3125 if oldTime == None:
3125 if oldTime == None:
3126 oldTime = currTime
3126 oldTime = currTime
@@ -3159,7 +3159,7 class JULIA_DayVelocities(Operation):
3159 print('numpy.where(numpy.abs(veloc-veloc_prof) < threshold/factor)[0]:', numpy.where(numpy.abs(veloc-veloc_prof) < threshold/factor)[0])
3159 print('numpy.where(numpy.abs(veloc-veloc_prof) < threshold/factor)[0]:', numpy.where(numpy.abs(veloc-veloc_prof) < threshold/factor)[0])
3160
3160
3161 junk = numpy.where(numpy.abs(veloc-veloc_prof) < threshold/factor)[0]
3161 junk = numpy.where(numpy.abs(veloc-veloc_prof) < threshold/factor)[0]
3162 if junk.size > 2:
3162 if junk.size >= amountdata:
3163 veloc_prof = self.newtotal(veloc[junk]/numpy.power(sigma[junk],2))/self.newtotal(1/numpy.power(sigma[junk],2))
3163 veloc_prof = self.newtotal(veloc[junk]/numpy.power(sigma[junk],2))/self.newtotal(1/numpy.power(sigma[junk],2))
3164 sigma_prof1 = numpy.sqrt(1/self.newtotal(1/numpy.power(sigma[junk],2)))
3164 sigma_prof1 = numpy.sqrt(1/self.newtotal(1/numpy.power(sigma[junk],2)))
3165 sigma_prof2 = numpy.sqrt(self.newtotal(numpy.power(veloc[junk]-veloc_prof,2)/numpy.power(sigma[junk],2)))*sigma_prof1
3165 sigma_prof2 = numpy.sqrt(self.newtotal(numpy.power(veloc[junk]-veloc_prof,2)/numpy.power(sigma[junk],2)))*sigma_prof1
@@ -3206,7 +3206,7 class JULIA_DayVelocities(Operation):
3206 return sets, old_veloc, count, oldTime, aver_veloc, aver_sigma, clearAll
3206 return sets, old_veloc, count, oldTime, aver_veloc, aver_sigma, clearAll
3207
3207
3208
3208
3209 def run(self, dataOut, zenith, zenithCorrection=0.0, heights=[125, 185], nchan=2, chan=0, clean=False, driftstdv_th=100, zonalstdv_th=200):
3209 def run(self, dataOut, zenith, zenithCorrection=0.0, heights=[125, 185], nchan=2, chan=0, clean=False, driftstdv_th=100, zonalstdv_th=200, amountdata=3):
3210
3210
3211 dataOut.lat=-11.95
3211 dataOut.lat=-11.95
3212 dataOut.lon=-76.87
3212 dataOut.lon=-76.87
@@ -3278,7 +3278,7 class JULIA_DayVelocities(Operation):
3278 # Vertical
3278 # Vertical
3279 sets1, self.old_drift, self.count_drift, self.oldTime_drift, aver_veloc, aver_sigma, clearAll = self.statistics150km(drift, w_w_err, driftstdv_th, \
3279 sets1, self.old_drift, self.count_drift, self.oldTime_drift, aver_veloc, aver_sigma, clearAll = self.statistics150km(drift, w_w_err, driftstdv_th, \
3280 old_veloc=self.old_drift, count=self.count_drift, currTime=dataOut.utctime, \
3280 old_veloc=self.old_drift, count=self.count_drift, currTime=dataOut.utctime, \
3281 oldTime=self.oldTime_drift, timeFactor=120)
3281 oldTime=self.oldTime_drift, amountdata = amountdata, timeFactor=120, debug = False)
3282 if clearAll == 1:
3282 if clearAll == 1:
3283 mean_zonal = numpy.nan
3283 mean_zonal = numpy.nan
3284 sigma_zonal = numpy.nan
3284 sigma_zonal = numpy.nan
@@ -3296,7 +3296,7 class JULIA_DayVelocities(Operation):
3296 if nchan == 2:
3296 if nchan == 2:
3297 sets2, self.old_zonal, self.count_zonal, self.oldTime_zonal, aver_veloc, aver_sigma, clearAll = self.statistics150km(zonal, w_e_err, zonalstdv_th, \
3297 sets2, self.old_zonal, self.count_zonal, self.oldTime_zonal, aver_veloc, aver_sigma, clearAll = self.statistics150km(zonal, w_e_err, zonalstdv_th, \
3298 old_veloc=self.old_zonal, count=self.count_zonal, currTime=dataOut.utctime, \
3298 old_veloc=self.old_zonal, count=self.count_zonal, currTime=dataOut.utctime, \
3299 oldTime=self.oldTime_zonal, timeFactor=600)
3299 oldTime=self.oldTime_zonal, amountdata = amountdata, timeFactor=600, debug = False)
3300 if clearAll == 1:
3300 if clearAll == 1:
3301 mean_zonal = numpy.nan
3301 mean_zonal = numpy.nan
3302 sigma_zonal = numpy.nan
3302 sigma_zonal = numpy.nan
General Comments 0
You need to be logged in to leave comments. Login now