eradiate.scenes.measure.AngleLayout#

class eradiate.scenes.measure.AngleLayout(angles, *, azimuth_convention=None)[source]#

Bases: Layout

A viewing direction layout directly defined by explicit (zenith, azimuth) pairs.

Parameters:
  • azimuth_convention (AzimuthConvention or str, optional, default: None) – Azimuth convention used by this layout. If None, the global default configuration is used (see Configuration).

  • angles (array-like) – A sequence of viewing angles, corresponding to the direction sequence produced by directions, as a (N, 2) array. The last dimension is ordered as (zenith, azimuth). Zenith values must be between 0 and 180°. Required, no default.

    Unit-enabled field (default: ucc[‘angle’]).

Fields:

azimuth_convention (AzimuthConvention) – Azimuth convention used by this layout.

static convert(value)#

Attempt to instantiate a Layout concrete class from an object.

This conversion protocol accepts:

  • a dictionary of the form {"type": type_name, **kwargs};

  • a (N, 2)-array or a (2,)-array;

  • a (N, 3)-array or a (3,)-array.

Other values pass through the converter.

Dictionaries have their parameters forwarded to the type selected by the type parameter. A (N, 2) or (2,)-array is passed to an AngleLayout. A (N, 3) or (3,)-array is passed to a DirectionLayout.

Type key

Class

angles

AngleLayout

aring

AzimuthRingLayout

directions

DirectionLayout

grid

GridLayout

hplane

HemispherePlaneLayout

property angles#

A sequence of viewing angles, corresponding to the direction sequence produced by directions, as a (N, 2) array. The last dimension is ordered as (zenith, azimuth).

Type:

quantity

property directions#

A sequence of viewing directions, pointing outwards the observed target, as a (N, 3) array.

Type:

ndarray

property n_directions#

Number of viewing directions defined by this layout.

Type:

int