Common Structures¶
Position Classes¶
- class ear.common.Position¶
A 3D position represented in polar or Cartesian coordinates.
- class ear.common.PolarPosition(azimuth, elevation, distance=1.0)¶
Bases:
ear.common.Position,ear.common.PolarPositionMixinA 3D position represented in ADM-format polar coordinates.
- class ear.common.CartesianPosition(X, Y, Z)¶
Bases:
ear.common.Position,ear.common.CartesianPositionMixinA 3D position represented in ADM-format Cartesian coordinates.
Position Mixins¶
These two classes provide common methods for the various real position classes:
- class ear.common.PolarPositionMixin¶
Methods to be defined on all polar position objects which have azimuth, elevation and distance attributes.
- as_cartesian_array()¶
Get the position as a Cartesian array.
- Returns
equivalent X, Y and Z coordinates
- Return type
np.array of shape (3,)
- as_cartesian_position()¶
Get the equivalent cartesian position.
- Return type
- class ear.common.CartesianPositionMixin¶
Methods to be defined on all Cartesian position objects which have X, Y and Z attributes.
- as_cartesian_array()¶
Get the position as a Cartesian array.
- Returns
equivalent X, Y and Z coordinates
- Return type
np.array of shape (3,)
- as_polar_position()¶
Get the equivalent cartesian position.
- Return type
Screen Classes¶
- class ear.common.CartesianScreen(aspectRatio, centrePosition, widthX)¶
ADM screen representation using Cartesian coordinates.
This is used to represent the audioProgrammeReferenceScreen, as well as the screen position in the reproduction room.
- centrePosition¶
screenCentrePosition element
- Type
- class ear.common.PolarScreen(aspectRatio, centrePosition, widthAzimuth)¶
ADM screen representation using Cartesian coordinates.
This is used to represent the audioProgrammeReferenceScreen, as well as the screen position in the reproduction room.
- centrePosition¶
screenCentrePosition element
- Type
- ear.common.default_screen = PolarScreen(aspectRatio=1.78, centrePosition=PolarPosition(azimuth=0.0, elevation=0.0, distance=1.0), widthAzimuth=58.0)¶
The default screen position, size and shape.