Skip to content

brpz_to_bxyz.m

Basic Information

 PURPOSE:
         convert a vector of fields brpz to rectangular coordinates bxyz
         brpz = [Br, Bphi, Bz] to xyz points: xpt = [x, y, z].

 SYNTAX:
       bxyz= brpz_to_bxyz(rpz,brpz);

 INPUT:
       rpz  = toroidal coordinates of each point 3 columns: [r,phi(radians),z]
            NOTE THIS IS IN CORRECT RIGHT HAND ROTATION (Not rzp)
       brpz = Field in each direction [Br, Bphi, Bz]

 NOTE:  phi is zero along x-axis and increased toward +y. This is counter-
        clockwise when viewed from top. (DIII-D has Phi clockwise)


 OUTPUT:
       bxyz  = Field in rectangular coordinates in 3-space. [Bx,By,Bz]

 SEE ALSO: rzp_to_pts rzpn_to_pts pts_to_fil ptsn_to_fil

Dependencies