Coordinates#
The following introduces the concept of the
coordinates
class and the coordinate systems that
are available in pyfar.
Coordinates Class#
Different coordinate systems are frequently used in acoustics research and
handling sampling points and different systems can be cumbersome. The
Coordinates class
was
designed with this in mind. It can convert between coordinate systems and
rotate, query and plot coordinates points. Functions for converting coordinates
not stored in a Coordinates
object are
available for convenience. However, it is strongly recommended to
use the Coordinates
class for all
conversions.
Coordinate Systems#
Coordinate systems are defined by their domain (cartesian, spherical, cylindrical), and, if multiple definitions of the domain exist, also by their convention. The available coordinate systems are shown in the image below
The unit for length is always meter, while the unit for angles is radians. For more details see the table below.
Coordinate 
Descriptions 


x, y, z coordinate of a right handed Cartesian coordinate system in meter (\(\infty\) < x,y,z < \(\infty\)). 

Counter clockwise angle in the xy plane of the right handed Cartesian coordinate system in radians. \(0\) radians are defined in positive xdirection, \(\pi/2\) radians in positive ydirection and so on (\(\infty\) < azimuth < \(\infty\), \(2\pi\)cyclic). 

Angle in the xz plane of the right handed Cartesian coordinate system in radians. \(0\) radians elevation are defined in positive zdirection, \(\pi/2\) radians in positive xdirection, and \(\pi\) in negative zdirection (\(\pi/2\) < elevation < \(\pi/2\)). The elevation is a variation of the elevation angle. 

Angle in the xz plane of the right handed Cartesian coordinate system in radians. \(0\) radians colatitude are defined in positive xdirection, \(\pi/2\) radians in positive zdirection, and \(\pi/2\) in negative zdirection (\(0\) < colatitude < \(\pi\)). The colatitude is a variation of the colatitude. 

Counter clockwise angle in the xy plane of the right handed Cartesian coordinate system in radians. \(0\) radians are defined in positive xdirection, \(\pi/2\) radians in positive ydirection and \(\pi/2\) in negative ydirection (\(\pi/2\) < lateral < \(\pi/2\)). 

Angle in the xz plane of the right handed Cartesian coordinate system in radians. \(0\) radians elevation are defined in positive xdirection, \(\pi/2\) radians in positive zdirection, \(\pi\) in negative xdirection and so on (\(\infty\) < polar < \(\infty\), \(2\pi\)cyclic). 

Angle in the yz plane of the right handed Cartesian coordinate system in radians. \(0\) radians elevation are defined in positive ydirection, \(\pi/2\) radians in positive zdirection, \(\pi\) in negative ydirection and so on (\(\infty\) < frontal < \(\infty\), \(2\pi\)cyclic). 

Angle in the xz plane of the right handed Cartesian coordinate system in radians. \(0\) radians elevation are defined in positive xdirection, \(\pi/2\) radians in positive zdirection, and \(\pi\) in negative xdirection (\(0\) < upper < \(\pi\)). 

Distance to the origin of the right handed Cartesian coordinate system in meters (\(0\) < radius < \(\infty\)). 

Distance perpendicular to the the zaxis of the right handed Cartesian coordinate system (\(0\) < rho < \(\infty\)). 
Samplings#
A plethora of sampling schemes to generate coordinate objects is contained in
samplings
.