eradiate._mode
#
Functions#
- eradiate._mode.modes(filter=None)[source]#
Get list of registered operational modes.
- Parameters:
filter (
callable()
, optional) – A callable used to filter the returned modes. Operates on aMode
instance.- Returns:
modes (
dict[str
,Mode]
) – List of registered operational modes.
Examples
Return the full list of registered modes:
>>> eradiate.modes()
Return only CKD modes:
>>> eradiate.modes(lambda x: x.is_ckd)
- 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:
ValueError –
mode_id
does not match any of the known mode identifiers.
- eradiate._mode.supported_mode(**kwargs)[source]#
Check whether the current mode has specific features. If not, raise.
- Parameters:
kwargs – Keyword arguments passed to
Mode.check()
.- Raises:
.UnsupportedModeError – Current mode does not pass the check.
- eradiate._mode.unsupported_mode(**kwargs)[source]#
Check whether the current mode has specific features. If so, raise.
- Parameters:
kwargs – Keyword arguments passed to
Mode.check()
.- Raises:
.UnsupportedModeError – Current mode has the requested flags.
Classes#
|
Data structure describing Eradiate's operational mode and associated ancillary data. |
|
Spectral dimension handling flags. |
|
Mitsuba backend flags. |
|
Mitsuba color mode flags. |