code: def _find_closest_trackpointaA(self,Or,Op,Oz,ar,ap,az,interp=True):
          
          #Calculate angle offset along the stream parallel to the stream track,
          # finding first the angle among a few wraps where the point is 
          # closest to the parallel track and then the closest trackpoint to that
          # point
          da= numpy.stack(\
              numpy.meshgrid(_TWOPIWRAPS+ar-self._progenitor_angle[0],
                             _TWOPIWRAPS+ap-self._progenitor_angle[1],
                             _TWOPIWRAPS+az-self._progenitor_angle[2],
                             indexing='xy')).T.reshape((len(_TWOPIWRAPS)**3,3))
          dapar= self._sigMeanSign*numpy.dot(da[numpy.argmin(numpy.linalg.norm(\
                          numpy.cross(da,self._dsigomeanProgDirection),axis=1))],
                                             self._dsigomeanProgDirection)       
          if interp:
              dist= numpy.fabs(dapar-self._interpolatedThetasTrack)
          else:
              dist= numpy.fabs(dapar-self._thetasTrack)
          return numpy.argmin(dist)
docs: NAME:
             _find_closest_trackpointaA
          PURPOSE:
             find the closest point on the stream track to a given point in
             frequency-angle coordinates
          INPUT:
             Or,Op,Oz,ar,ap,az - phase-space coordinates of the given point
             interp= (True), if True, return the index of the interpolated track
          OUTPUT:
             index into the track of the closest track point
          HISTORY:
             2013-12-22 - Written - Bovy (IAS)