Example #1
0
 def prep_ridge_plotting(self):
     '''get the data needed to make a plot of the search'''
     wt = self._wtset[0]
     
     ridgewtscatter=[]
     for r in self._ridgesset[0]: # r is all ridge candidates
         scaleinds=np.where((r!=32767)&(r>=0)) #scaleinds are those that haven't been rejected (set to 32767)
         posninds=r[scaleinds] #actual ridge positions
         scaleinds_increasingscale=wt.shape[0]-scaleinds[0]-1
         motherind=pywaves.motherridgeind_childridge(r)
         if motherind is None:
             mothertochildplotcoords=None
         else:
             xmother=ridgewtscatter[motherind][0][-1]
             ymother=ridgewtscatter[motherind][1][-1]
             xchild=posninds[0]
             xchild=self._x[xchild]
             ychild=scaleinds_increasingscale[0]
             mothertochildplotcoords=([xmother, xchild], [ymother, ychild])#assume that mother ridges always appear in "ridges" before the children ridges
         #print x[posninds]
         ridgewtscatter+=[(self._x[posninds], scaleinds_increasingscale, wt[(scaleinds_increasingscale, posninds)], mothertochildplotcoords)]
  
     return ridgewtscatter