dispel.signal.orientation module#
A module to detect and process phone orientation during tests.
- class dispel.signal.orientation.OrientationRange#
Bases:
tuple
tuple of phone range orientation in degree
- static __new__(_cls, lower, upper)#
Create new instance of OrientationRange(lower, upper)
- lower#
Alias for field number 0
- upper#
Alias for field number 1
- class dispel.signal.orientation.PhoneOrientation[source]#
Bases:
AVEnum
A class enumerator regrouping supported phone orientations.
- FACE_DOWN = 6#
- FACE_UP = 5#
- LANDSCAPE_LEFT = 2#
- LANDSCAPE_RIGHT = 1#
- PORTRAIT_UPRIGHT = 3#
- PORTRAIT_UPSIDE_DOWN = 4#
- get_classifier(pitch_freedom, yaw_freedom)[source]#
Get the phone orientation classifier.
- Parameters:
pitch_freedom (float | OrientationRange) – The degree of freedom of the pitch angle in degrees.
yaw_freedom (float | OrientationRange) – The degree of freedom of the yaw angle in degrees.
- Returns:
A function that takes as input the gravity data frame and output a pandas series of boolean corresponding to the phone orientation classification.
- Return type:
Callable[[pandas.DataFrame], pandas.Series]