eradiate.scenes.measure.DirectionLayout#

class eradiate.scenes.measure.DirectionLayout(directions, *, 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 EradiateConfig).

  • directions (array-like) – A sequence of 3-vectors specifying distant sensing directions. Note that directions point outward the target. Required, no default.

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