pyemaps.emcontrols module¶
This class is a helper for handling pyEMAPS microscope controls.
There are two controls classes this module defines: microscope controls and simulations controls.
Since the latter changes much less frequently than the former, simulation control is embedded as a member of a microscope controls class.
Simulation control constants and default values¶
- pyemaps.emcontrols.DEF_EXCITATION = (0.3, 2.0)¶
- pyemaps.emcontrols.DEF_GMAX = 3.5¶
- pyemaps.emcontrols.DEF_BMIN = 0.1¶
- pyemaps.emcontrols.DEF_INTENSITY = (0.0, 5)¶
- pyemaps.emcontrols.DEF_GCTL = 6.0¶
- pyemaps.emcontrols.DEF_ZCTL = 5.0¶
- pyemaps.emcontrols.DEF_OMEGA = 10¶
- pyemaps.emcontrols.DEF_SAMPLING = 8¶
- pyemaps.emcontrols.SAMPLE_THICKNESS = (200, 200, 100)¶
Microscope control constants and default values¶
- pyemaps.emcontrols.DEF_TILT = (0.0, 0.0)¶
- pyemaps.emcontrols.DEF_ZONE = (0, 0, 1)¶
- pyemaps.emcontrols.DEF_DEFL = (0.0, 0.0)¶
- pyemaps.emcontrols.DEF_KV = 200.0¶
- pyemaps.emcontrols.DEF_CL = 1000.0¶
- pyemaps.emcontrols.DEF_APERTURE = 1.0¶
- pyemaps.emcontrols.DEF_XAXIS = (0, 0, 0)¶
- pyemaps.emcontrols.DEF_PIXSIZE = 25¶
- pyemaps.emcontrols.DEF_DETSIZE = 512¶
- pyemaps.emcontrols.DEF_MODE = 1¶
- pyemaps.emcontrols.DEF_CBED_DSIZE = 0.16 ¶
- pyemaps.emcontrols.doc_dec_simc(k)¶
- class pyemaps.emcontrols.SIMControl(excitation=DEF_SIMC['excitation'], gmax=DEF_SIMC['gmax'], bmin=DEF_SIMC['bmin'], intensity=DEF_SIMC['intensity'], gctl=DEF_SIMC['gctl'], zctl=DEF_SIMC['zctl'])¶
Bases:
object
Simulation controls, to be embedded in EMControl
- __init__(excitation=DEF_SIMC['excitation'], gmax=DEF_SIMC['gmax'], bmin=DEF_SIMC['bmin'], intensity=DEF_SIMC['intensity'], gctl=DEF_SIMC['gctl'], zctl=DEF_SIMC['zctl'])¶
- property excitation¶
Excitation error range in (min, max)
- property gmax¶
Maximum recipricol vector length
- property bmin¶
Beta perturbation cutoff
- property intensity¶
Kinematic diffraction intensity cutoff level and scale in (level, scale)
- property gctl¶
Maximum index number for g-list
- property zctl¶
Maximum zone or Miller index number
- property omega¶
Diagnization cutoff value
- property sampling¶
Number of sampling points
- property sth¶
Samples thickness
- plot_format()¶
Format simulation controls in builtin display functions Only plot those parameter that are not defaults
- classmethod from_random()¶
For backward compatibility only
- pyemaps.emcontrols.doc_dec(k)¶
- class pyemaps.emcontrols.EMControl(tilt=DEF_TILT, zone=DEF_ZONE, defl=DEF_DEFL, vt=DEF_KV, cl=DEF_CL, simc=SIMControl())¶
Bases:
object
Microscope and sample property controls class. Its attributes include:
tilt: sample tilt in x and y directory (x,y)
zone: starting zone axis
defl: shifts in x and y direction (x, y)
cl: cameral length
vt: hight voltage in kilo-volts
**simc*: SIMControl object
Other optional emcontrol parameters:
aperture: Objective len aperture
pix_size: detector pixel size
det_size: detector size
xaxis: crystal horizontal axis in reciprical space
mode: simulation mode: 1- normal, 2-CBED
dsize: diffracted beam size
- __init__(tilt=DEF_TILT, zone=DEF_ZONE, defl=DEF_DEFL, vt=DEF_KV, cl=DEF_CL, simc=SIMControl())¶
- classmethod from_dict(emc_dict)¶
Create an EMControl object from a python dict object
- Parameters:
emc_dict (dict, required) – Microscope control dict object
- Raises:
EMCError, if validation fails
- property zone¶
Starting zone axis
- property tilt¶
Tilt in x and y directions (x,y)
- property defl¶
Shifts in x and y directions (x, y)
- property cl¶
Camera length
- property vt¶
High voltage
- property xaxis¶
Crystal horizontal axis in reciprical space
- property simc¶
Simulation Controls
- property aperture¶
Objective lense aperture
- property pix_size¶
Detector pixel size in microns
- property det_size¶
Detector size in microns
- property mode¶
Simulation mode
- property dsize¶
Diffracted beam size
- plot_format()¶
Format simulation controls in builtin display functions Only plot those parameter that are not defaults
- static def_dict()¶