angle
This module implements three classes Vector3, LorentzVector, EulerAngle .
- class AlignmentAngle(alpha=0.0, beta=0.0, gamma=0.0)[source]
Bases:
EulerAngle
- class EulerAngle(alpha=0.0, beta=0.0, gamma=0.0)[source]
Bases:
dict
This class provides methods for Eular angle \((\alpha,\beta,\gamma)\)
- static angle_zx_z_getx(z1, x1, z2)[source]
The Eular angle from coordinate 1 to coordinate 2. Only the z-axis is provided for coordinate 2, so \(\gamma\) is set to be 0.
- Parameters:
z1 – Vector3 z-axis of the initial coordinate
x1 – Vector3 x-axis of the initial coordinate
z2 – Vector3 z-axis of the final coordinate
- Return eular_angle:
EularAngle object with \(\gamma=0\).
- Return x2:
Vector3 object, which is the x-axis of the final coordinate when \(\gamma=0\).
- static angle_zx_zx(z1, x1, z2, x2)[source]
The Euler angle from coordinate 1 to coordinate 2 (right-hand coordinates).
- Parameters:
z1 – Vector3 z-axis of the initial coordinate
x1 – Vector3 x-axis of the initial coordinate
z2 – Vector3 z-axis of the final coordinate
x2 – Vector3 x-axis of the final coordinate
- Returns:
Euler Angle object
- static angle_zx_zzz_getx(z, x, zi)[source]
The Eular angle from coordinate 1 to coordinate 2. Z-axis of coordinate 2 is the normal vector of a plane.
- Parameters:
z1 – Vector3 z-axis of the initial coordinate
x1 – Vector3 x-axis of the initial coordinate
z – list of Vector3 of the plane point.
- Return eular_angle:
EularAngle object.
- Return x2:
list of Vector3 object, which is the x-axis of the final coordinate in zi.
- class LorentzVector[source]
Bases:
Tensor
This class provides methods for Lorentz vectors (T,X,Y,Z). or -T???
- class Vector3[source]
Bases:
Tensor
This class provides methods for 3-d vectors (X,Y,Z)
- angle_from(x, y)[source]
The angle from x-axis providing the x,y axis to define a 3-d coordinate.
x -> self | / | ang / | / | / | / | / |/ -------- y
- Parameters:
x – A Vector3 instance as x-axis
y – A Vector3 instance as y-axis. It should be perpendicular to the x-axis.