diff --git a/schainpy/scripts/test_zdr.py b/schainpy/scripts/test_zdr.py index 7f7a125..e7309e0 100644 --- a/schainpy/scripts/test_zdr.py +++ b/schainpy/scripts/test_zdr.py @@ -121,13 +121,13 @@ class Readsophy(): if count==1: fig = plt.figure(figsize=(8,6)) plt.pcolormesh(x,y,z,cmap =cmap, vmin = vmin, vmax = vmax) - title = 'Sophy Plot'+label+"-"+ my_time+" "+mode+" "+grado + title = 'Sophy Plot '+label+"-"+ my_time+" "+mode+" "+grado+" N° "+str(count) t = plt.title(title, fontsize=12,y=1.05) cbar = plt.colorbar() cbar.set_label(label+'[' + unit + ']') else: plt.pcolormesh(x,y,z, cmap =cmap, vmin = vmin, vmax = vmax) - title = 'Sophy Plot'+label+"-"+ my_time+" "+mode+" "+grado + title = 'Sophy Plot '+label+"-"+ my_time+" "+mode+" "+grado+" N° "+str(count) t = plt.title(title, fontsize=12,y=1.05) cbar = plt.colorbar() cbar.set_label(label+'[' + unit + ']') @@ -135,8 +135,8 @@ class Readsophy(): def plot_PROFILE(self,count,z,y,my_time,label,mode,grado): if count==1: fig = plt.figure(figsize=(8,6)) - plt.plot(z,y) - title = 'Sophy Plot '+label+"-"+ my_time+" "+mode+" "+grado + plt.plot(numpy.nanmean(z,1),y) + title = 'Sophy Plot '+label+"-"+ my_time+" "+mode+" "+grado+" N° "+str(count) t = plt.title(title, fontsize=12,y=1.05) plt.ylim(0,self.range+1) plt.xlabel(label) @@ -145,9 +145,11 @@ class Readsophy(): plt.xlim(-1,3) if self.variable=='D': plt.xlim(-10,10) + if self.variable=='Z': + plt.xlim(-20,80) else: - plt.plot(z,y) - title = 'Sophy Plot '+label+"-"+ my_time+" "+mode+" "+grado + plt.plot(numpy.nanmean(z,1),y) + title = 'Sophy Plot '+label+"-"+ my_time+" "+mode+" "+grado+" N° "+str(count) t = plt.title(title, fontsize=12,y=1.05) plt.ylim(0,self.range+1) plt.xlabel(label) @@ -156,6 +158,8 @@ class Readsophy(): plt.xlim(-1,3) if self.variable=='D': plt.xlim(-10,10) + if self.variable=='Z': + plt.xlim(-20,80) def save_PIC(self,count,time_save): if count ==1: @@ -172,7 +176,8 @@ class Readsophy(): filename = "SOPHY"+"_"+time_save+"_"+"E."+self.grado+"_"+self.variable+str(self.range)+".png" plt.savefig(filesavepath+filename) - def seleccion_roHV_min(self,count,z,arr): + def seleccion_roHV_min(self,count,z,y,arr_): + ##print("y",y) if self.variable=='R': len_Z= z.shape[1] min_CC=numpy.zeros(len_Z) @@ -180,27 +185,69 @@ class Readsophy(): for i in range(len_Z): tmp=numpy.nanmin(z[:,i]) tmp_index = numpy.nanargmin((z[:,i])) - - if tmp <0.6: + if tmp <0.5: tmp_index= numpy.nan value = numpy.nan else: - value= new_heightList[tmp_index] + value= y[tmp_index] min_CC[i] =value moda_,count_m_ = stats.mode(min_CC) - print(moda_) + #print("MODA",moda_) for i in range(len_Z): if min_CC[i]>moda_[0]+0.15 or min_CC[i]moda_[0]+0.15 or min_CC[i]