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
: Alias tomono_double
ckd
: Alias tockd_double
mono_polarized
: Alias tomono_polarized_double
ckd_polarized
: Alias tockd_polarized_double
mono_single
: Monochromatic, single-precisionmono_polarized_single
: Monochromatic, polarized, single-precisionmono_double
: Monochromatic, double-precisionmono_polarized_double
: Monochromatic, polarized, double-precisionckd_single
: CKD, single-precisionckd_polarized_single
: CKD, polarized, single-precisionckd_double
: CKD, double-precisionckd_polarized_double
: CKD, polarized, double-precisionnone
(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. |
|
Flags defining the various possible features associated to an Eradiate mode. |
|
This is a very simple factory intended to map mode-specific flags to mode-dependent subtypes. |