eradiate._mode.Mode#
- class eradiate._mode.Mode(id, spectral_mode, mi_backend, mi_color_mode, mi_polarized=False, mi_double_precision=True)[source]#
Bases:
object
Data structure describing Eradiate’s operational mode and associated ancillary data.
- Parameters:
id (
str
) – Mode identifier.spectral_mode (
SpectralMode
orstr
) – Spectral dimension handling.mi_backend (
MitsubaBackend
orstr
) – Mitsuba computational backend.mi_color_mode (
MitsubaColorMode
orstr
) – Mitsuba color mode.mi_polarized (
bool
, default:False
) – Mitsuba polarized mode.mi_double_precision (
bool
, default:True
) – Mitsuba double precision.
- Fields:
id (
str
) – Mode identifier.spectral_mode (
SpectralMode
) – Spectral dimension handling.mi_backend (
MitsubaBackend
) – Mitsuba computational backend.mi_color_mode (
MitsubaColorMode
) – Mitsuba color mode.mi_polarized (
bool
) – Mitsuba polarized mode.mi_double_precision (
bool
) – Mitsuba double precision.
Warning
Instances are immutable.
- check(spectral_mode=None, mi_backend=None, mi_color_mode=None, mi_polarized=None, mi_double_precision=None)[source]#
Check if the currently active mode has the passed flags.
- Parameters:
spectral_mode (
SpectralMode
orstr
, optional) – Spectral mode to check. If unset, the check is skipped.mi_backend (
MitsubaBackend
orstr
, optional) – Mitsuba backend to check. If unset, the check is skipped.mi_color_mode (
MitsubaColorMode
orstr
, optional) – Mitsuba color mode to check. If unset, the check is skipped.mi_polarized (
bool
, optional) – Mitsuba polarized mode to check. If unset, the check is skipped.mi_double_precision (
bool
, 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_single
: Monochromatic, single-precisionmono_double
: Monochromatic, double-precisionmono
: Alias tomono_double
ckd_single
: CKD, single-precisionckd_double
: CKD, double-precisionckd
: Alias tockd_double
- property mi_variant#
Mitsuba variant associated with the selected mode.
- property spectral_coord_label#
Spectral coordinate label.