eradiate._mode.Mode#
- class eradiate._mode.Mode(id, spectral_mode, mi_backend, mi_color_mode, mi_polarized, mi_double_precision)[source]#
Bases:
object
Data structure describing Eradiate’s operational mode and associated ancillary data.
- Parameters:
- Fields:
Warning
Instances are immutable.
- check(spectral_mode=<ModeFlag.NONE: 0>, mi_backend=<ModeFlag.NONE: 0>, mi_color_mode=<ModeFlag.NONE: 0>, mi_polarized=<ModeFlag.NONE: 0>, mi_double_precision=<ModeFlag.NONE: 0>)[source]#
Check if the currently active mode has the passed flags.
- Parameters:
spectral_mode (
ModeFlag
orstr
, optional) – Spectral mode to check. If unset, the check is skipped.mi_backend (
ModeFlag
orstr
, optional) – Mitsuba backend to check. If unset, the check is skipped.mi_color_mode (
ModeFlag
orstr
, optional) – Mitsuba color mode to check. If unset, the check is skipped.mi_polarized (
ModeFlag
orbool
, optional) – Mitsuba polarized mode to check. If unset, the check is skipped.mi_double_precision (
ModeFlag
orbool
, optional) – Mitsuba double precision mode to check. If unset, the check is skipped.
- Returns:
bool
–True
if current mode has the passed flags,False
otherwise.
- static new(mode_id)[source]#
Create a
Mode
instance given its identifier. Available modes are: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-precision
- property flags#
All flags combined.
- property mi_flags#
Combined Mitsuba-specific flags.
- property mi_variant#
Mitsuba variant associated with the selected mode.