eradiate._mode#

Functions#

eradiate._mode.mode()[source]#

Get current operational mode.

Returns

Mode or None – Current operational mode.

eradiate._mode.modes()[source]#

Get list of registered operational modes.

Returns

dict – List of registered operational modes

eradiate._mode.set_mode(mode_id)[source]#

Set Eradiate’s operational mode.

This function sets and configures Eradiate’s operational mode. Eradiate’s modes map to Mitsuba’s variants and are used to make contextual decisions when relevant during the translation of a scene to its kernel format.

Valid mode IDs

  • mono (monochromatic mode, single precision)

  • mono_double (monochromatic mode, double-precision)

  • ckd (CKD mode, single precision)

  • ckd_double (CKD mode, double-precision)

  • none (no mode selected)

Parameters

mode_id (str) – Mode to be selected (see list below).

Raises

ValueErrormode_id does not match any of the known mode identifiers.

eradiate._mode.supported_mode(flags)[source]#

Check whether the current mode has specific flags. If not, raise.

Parameters

flags (ModeFlags) – Flags the current mode is expected to have.

Raises

.UnsupportedModeError – Current mode does not have the requested flags.

eradiate._mode.unsupported_mode(flags)[source]#

Check whether the current mode has specific flags. If so, raise.

Parameters

flags (ModeFlags) – Flags the current mode is expected not to have.

Raises

.UnsupportedModeError – Current mode has the requested flags.

Classes#

Mode(id, flags, spectral_coord_label)

Data structure describing Eradiate's operational mode and associated ancillary data.

ModeFlags(value)

Flags defining Eradiate mode features.