Conventions

Coodrinate system

Positions in three dimensional space are described in a right-handed cartesian coordinate system with \(x\), \(y\) and \(z\) axis. In the lab reference frame \(x\) and \(y\) are often referred to by horizontal and vertical coordinate, respectively. The \(z\) axis is codirectional with the primary beam propagation.

Rotations

Rotations follow the right hand rule and can be expressed by quaternions, Euler angles or rotation matrices. For more details about the implementation of rotations see condor.utils.rotation.

Representations of non-scalar variables

Vectors

Vectors \(\vec{v}=(x, y, z)\) are repesented by numpy arrays \([x, y, z]\).

Matrices

Two-dimensional matrices \(M_{i, j}\) (row index \(i\); column index \(j\)) are represented by two-dimensional numpy arrays \(M[i, j]\) (\(j\) being the fastest changing dimension).

Grid data

Two-dimensional (e.g. image) data \(D(x,y)\) are represented by two-dimensional numpy arrays \(D[y, x]\) (\(x\) being the fastest changing dimension).

Three-dimensional volume data \(D(x,y,z)\) are represented by numpy arrays \(D[z, y, x]\) (\(x\) being the fastest and \(z\) being the slowest changing dimension).

Quaternions

Quaternions \(q = w + ix + jy + kz\) are represented by numpy arrays \([w, x, y, z]\) and represent rotations around the unit vector \(\vec{u} = (u_x,u_y,u_z)\) by the angle \(\theta\):

\[q = \cos(\theta/2) + i \, u_x \sin(\theta/2) + j \, u_y \sin(\theta/2) + k \, u_z \sin(\theta/2)\]

Physical units

All physical variables are in (derived) SI units if not stated otherwise in the variable name.