(self)
return n, l, m
Returns 3 orthognal base vectors, the first one colinear to
            the axis of the loop.
Returns 3 orthognal base vectors, the first one colinear to
            the axis of the loop.
Returns 3 orthognal base vectors the first one colinear to the axis of the loop .
def base_vectors(self):
        """ Returns 3 orthognal base vectors, the first one colinear to
            the axis of the loop.
        """
        # normalize n
        n = self.direction / (self.direction**2).sum(axis=-1)

        # choose two vectors perpendicular to n 
        # choice is arbitrary since the coil is symetric about n
        if  np.abs(n[0])==1 :
            l = np.r_[n[2], 0, -n[0]]
        else:
            l = np.r_[0, n[2], -n[1]]

        l /= (l**2).sum(axis=-1)
        m = np.cross(n, l)
        return n, l, m
def base_vectors ( self ) : # normalize n n = self . direction / ( self . direction ** 2 ) . sum ( axis = - 1 ) # choose two vectors perpendicular to n  # choice is arbitrary since the coil is symetric about n if np . abs ( n [ 0 ] ) == 1 : l = np . r_ [ n [ 2 ] , 0 , - n [ 0 ] ] else : l = np . r_ [ 0 , n [ 2 ] , - n [ 1 ] ] l /= ( l ** 2 ) . sum ( axis = - 1 ) m = np . cross ( n , l ) return n , l , m