from enum import IntEnum
[docs]
class TEMScriptingError(IntEnum):
""" Scripting error codes. """
E_NOT_OK = -2147155969 # 0x8004ffff
E_VALUE_CLIP = -2147155970 # 0x8004fffe
E_OUT_OF_RANGE = -2147155971 # 0x8004fffd
E_NOT_IMPLEMENTED = -2147155972 # 0x8004fffc
# The following are also mentioned in the manual
E_UNEXPECTED = -2147418113 # 0x8000FFFF
E_NOTIMPL = -2147467263 # 0x80004001
E_INVALIDARG = -2147024809 # 0x80070057
E_ABORT = -2147467260 # 0x80004004
E_FAIL = -2147467259 # 0x80004005
E_ACCESSDENIED = -2147024891 # 0x80070005
[docs]
class VacuumStatus(IntEnum):
""" Vacuum system status. """
UNKNOWN = 1
OFF = 2
CAMERA_AIR = 3
BUSY = 4
READY = 5
ELSE = 6
[docs]
class GaugeStatus(IntEnum):
"""Vacuum gauge status. """
UNDEFINED = 0
UNDERFLOW = 1
OVERFLOW = 2
INVALID = 3
VALID = 4
[docs]
class GaugePressureLevel(IntEnum):
""" Vacuum gauge pressure level. """
UNDEFINED = 0
LOW = 1
LOW_MEDIUM = 2
MEDIUM_HIGH = 3
HIGH = 4
[docs]
class StageStatus(IntEnum):
""" Stage status. """
READY = 0
DISABLED = 1
NOT_READY = 2
GOING = 3
MOVING = 4
WOBBLING = 5
[docs]
class MeasurementUnitType(IntEnum):
""" Stage measurement units. """
UNKNOWN = 0
METERS = 1
RADIANS = 2
[docs]
class StageHolderType(IntEnum):
""" Specimen holder type. """
NONE = 0
SINGLE_TILT = 1
DOUBLE_TILT = 2
INVALD = 4
POLARA = 5
DUAL_AXIS = 6
ROTATION_AXIS = 7
[docs]
class StageAxes(IntEnum):
""" Stage axes. """
NONE = 0
X = 1
Y = 2
XY = 3
Z = 4
A = 8
B = 16
[docs]
class IlluminationNormalization(IntEnum):
""" Normalization modes for condenser / objective lenses. """
SPOTSIZE = 1 # C1
INTENSITY = 2 # C2+C3
CONDENSER = 3 # C1+C2+C3
MINI_CONDENSER = 4
OBJECTIVE = 5 # minicondenser + objective
ALL = 6
[docs]
class IlluminationMode(IntEnum):
""" Illumination mode: nanoprobe or microprobe. """
NANOPROBE = 0
MICROPROBE = 1
[docs]
class DarkFieldMode(IntEnum):
""" Dark field mode. """
OFF = 1
CARTESIAN = 2
CONICAL = 3
[docs]
class CondenserMode(IntEnum):
""" Condenser mode: parallel or probe. """
PARALLEL = 0
PROBE = 1
[docs]
class ProjectionNormalization(IntEnum):
""" Normalization modes for objective/projector lenses. """
OBJECTIVE = 10
PROJECTOR = 11 # Diffraction + Intermediate + P1 + P2
ALL = 12
[docs]
class ProjectionMode(IntEnum):
""" Imaging or diffraction. """
IMAGING = 1
DIFFRACTION = 2
[docs]
class ProjectionSubMode(IntEnum):
""" Magnification range mode. """
LM = 1
M = 2
SA = 3
MH = 4
LAD = 5
D = 6
[docs]
class LensProg(IntEnum):
""" TEM or EFTEM mode. """
REGULAR = 1
EFTEM = 2
[docs]
class ProjectionDetectorShift(IntEnum):
""" Sets the extra shift that projects the image/diffraction
pattern onto a detector. """
ON_AXIS = 0
NEAR_AXIS = 1
OFF_AXIS = 2
[docs]
class ProjDetectorShiftMode(IntEnum):
""" This property determines whether the chosen DetectorShift
is changed when the fluorescent screen is moved down. """
AUTO_IGNORE = 1
MANUAL = 2
ALIGNMENT = 3
[docs]
class HighTensionState(IntEnum):
""" High Tension status. """
DISABLED = 1
OFF = 2
ON = 3
[docs]
class InstrumentMode(IntEnum):
""" TEM or STEM mode. """
TEM = 0
STEM = 1
[docs]
class AcqShutterMode(IntEnum):
""" Shutter mode. """
PRE_SPECIMEN = 0
POST_SPECIMEN = 1
BOTH = 2
[docs]
class AcqImageSize(IntEnum):
""" Image size. """
FULL = 0
HALF = 1
QUARTER = 2
[docs]
class AcqImageCorrection(IntEnum):
""" Image correction: unprocessed or corrected (gain/bias). """
UNPROCESSED = 0
DEFAULT = 1
[docs]
class AcqExposureMode(IntEnum):
""" Exposure mode. """
NONE = 0
SIMULTANEOUS = 1
PRE_EXPOSURE = 2
PRE_EXPOSURE_PAUSE = 3
[docs]
class ProductFamily(IntEnum):
""" Microscope product family. """
TECNAI = 0
TITAN = 1
TALOS = 2
[docs]
class CondenserLensSystem(IntEnum):
""" Two or three-condenser lens system. """
TWO_CONDENSER_LENSES = 0
THREE_CONDENSER_LENSES = 1
[docs]
class ScreenPosition(IntEnum):
""" Fluscreen position. """
UNKNOWN = 1
UP = 2
DOWN = 3
[docs]
class RefrigerantDewar(IntEnum):
""" Nitrogen dewar. """
AUTOLOADER_DEWAR = 0
COLUMN_DEWAR = 1
HELIUM_DEWAR = 2
[docs]
class CassetteSlotStatus(IntEnum):
""" Cassette slot status. """
UNKNOWN = 0
OCCUPIED = 1
EMPTY = 2
ERROR = 3
[docs]
class ImagePixelType(IntEnum):
""" Image type: uint, int or float. """
UNSIGNED_INT = 0
SIGNED_INT = 1
FLOAT = 2
[docs]
class MechanismId(IntEnum):
""" Aperture name. """
UNKNOWN = 0
C1 = 1
C2 = 2
C3 = 3
OBJ = 4
SA = 5
[docs]
class MechanismState(IntEnum):
""" Aperture state. """
DISABLED = 0
INSERTED = 1
MOVING = 2
RETRACTED = 3
ARBITRARY = 4
HOMING = 5
ALIGNING = 6
ERROR = 7
[docs]
class ApertureType(IntEnum):
""" Aperture type. """
UNKNOWN = 0
CIRCULAR = 1
BIPRISM = 2
ENERGY_SLIT = 3
FARADAY_CUP = 4
[docs]
class HatchState(IntEnum):
""" User door hatch state. """
UNKNOWN = 0
OPEN = 1
OPENING = 2
CLOSED = 3
CLOSING = 4
[docs]
class FegState(IntEnum):
""" FEG state. """
NOT_EMITTING = 0
EMITTING = 1
[docs]
class FegFlashingType(IntEnum):
""" Cold FEG flashing type. """
LOW_T = 0
HIGH_T = 1
# ---------------- Low Dose enums ---------------------------------------------
[docs]
class LDStatus(IntEnum):
""" Low Dose status: on or off. """
IS_OFF = 0
IS_ON = 1
[docs]
class LDState(IntEnum):
""" Low Dose state. """
SEARCH = 0
FOCUS1 = 1
FOCUS2 = 2
EXPOSURE = 3
# ---------------- FEI Tecnai CCD enums ---------------------------------------
[docs]
class AcqSpeed(IntEnum):
""" CCD acquisition mode for TecnaiCCD plugin. """
TURBO = 0
CONTINUOUS = 1
SINGLEFRAME = 2
[docs]
class AcqMode(IntEnum):
""" CCD acquisition preset for TecnaiCCD plugin."""
SEARCH = 0
FOCUS = 1
RECORD = 2
# ----------------- CalGetter enums -------------------------------------------
[docs]
class CalibrationStatus(IntEnum):
""" Calgetter calibratino status. """
NOT_CALIBRATED = 0
INVALID_CALIBRATION = 1
CALIBRATED = 2
[docs]
class CalibrationTypes(IntEnum):
""" Calgetter calibration types. """
MAGNIFICATION = 1
BEAM_SHIFT = 2
BEAM_TILT = 3
IMAGE_SHIFT = 4
DIFFRACTION_SHIFT = 5
STAGE_SHIFT = 6
FOCUS_STIGMATOR = 7
ILLUMINATED_AREA = 8
COUNT_TO_ELECTRONS = 9
STAGE_TILT = 10
FULL_STAGEX_LINEARIZATION = 11
STEM_CALIBRATION = 12
STEM_FOCUS_CALIBRATION = 13
BEAM_TILT_AZIMUTH = 14
STEM_HARDWARE_CORRECTION = 15
[docs]
class ModeTypes(IntEnum):
""" Illumination mode used by Calgetter. """
LM = 1
MICROPROBE = 2
NANOPROBE = 3
LAD = 4
MICROPROBE_D = 5
NANOPROBE_D = 6
LM_STEM = 7
MICROPROBE_STEM = 8
NANOPROBE_STEM = 9
[docs]
class LensSeriesTypes(IntEnum):
""" Projection mode used by Calgetter: normal (zoom) or EFTEM. """
ZOOM = 1
EFTEM = 2
[docs]
class LorentzTypes(IntEnum):
""" Lorentz lens status used by Calgetter. """
OFF = 1
ON = 2
[docs]
class ActualMagnificationElements(IntEnum):
""" Details of calibrated magnification from Calgetter. """
NOMINAL_MAGNIFICATION = 0
CALIBRATED_MAGNIFICATION = 1
MAGNIFICATION_INDEX = 2
MAGNIFICATION_MODE = 3
MAGNIFICATION_ROTATION = 4
CERTIFIED = 5
YEAR = 6
MONTH = 7
DAY = 8
HOUR = 9
MINUTE = 10
SECOND = 11
TOOLMATCH = 12
BASE_MAGNIFICATION = 13