eradiate._mode.Mode#

class eradiate._mode.Mode(id, flags, spectral_coord_label)[source]#

Bases: object

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

Important

Instances are immutable.

Parameters
  • id (str) – Mode identifier.

  • flags (ModeFlags) – Mode flags.

  • spectral_coord_label (str) – Mode spectral coordinate label.

Fields
  • id (str) – Mode identifier.

  • flags (ModeFlags) – Mode flags.

  • spectral_coord_label (str) – Mode spectral coordinate label.

has_flags(flags)[source]#

Check if the currently active mode has the passed flags.

Parameters

flags (ModeFlags or str) – Flags to check for. If a string is passed, conversion to a ModeFlags instance will be attempted.

Returns

boolTrue 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-precision

  • mono_double: Monochromatic, double-precision

  • mono: Alias to mono_double

  • ckd_single: CKD, single-precision

  • ckd_double: CKD, double-precision

  • ckd: Alias to ckd_double

Parameters

mode_id (str) – String identifier for the created Mode instance.

Returns

Mode – Created Mode instance.

property kernel_variant#

Mode kernel variant.