ptyrad.optics.aberrations#
Aberrations class for aberration coefficients parsing and conversion
Classes
|
Intermediate storage for export. |
|
Handles probe aberrations with support for Krivanek/Haider notations. |
|
The resolved address and context for a user key. |
- class ptyrad.optics.aberrations.ParsedKey(nm, param, scale)[source]#
Bases:
objectThe resolved address and context for a user key.
- Parameters:
nm (Tuple[int, int])
param (Literal['magnitude', 'angle', 'a', 'b'])
scale (float)
- nm: Tuple[int, int]#
- param: Literal['magnitude', 'angle', 'a', 'b']#
- scale: float#
- class ptyrad.optics.aberrations.AberrationValue(nm, mag, angle)[source]#
Bases:
objectIntermediate storage for export.
- Parameters:
nm (Tuple[int, int])
mag (float)
angle (float)
- nm: Tuple[int, int]#
- mag: float#
- angle: float#
- class ptyrad.optics.aberrations.Aberrations(data=None)[source]#
Bases:
objectHandles probe aberrations with support for Krivanek/Haider notations. Internal state is always Polar Krivanek (Magnitude [Å], Angle [deg]).
Note that for round lens aberrations (m=0), the internal storage is always (mag, 0.0) for type uniformity. However, setting or getting “components” from these round lens aberrations is strictly forbidden for users. For example, ‘phi30’, ‘C10a’ are not allowed.
- Parameters:
data (Optional[Dict])
- get_coefficients(style='cartesian')[source]#
Get raw coefficients for computation (nested dictionary).
- Parameters:
style (Literal['polar', 'cartesian', 'complex'])
- Return type:
Dict[Tuple[int, int], Any]
- get_haider(decimals=3)[source]#
Get flattened dictionary in Haider notation.
- Return type:
Dict[str, float]
- get_krivanek_polar(decimals=3)[source]#
Export Krivanek Polar (Flat dictionary).
- Return type:
Dict[str, float]
- get_krivanek_cartesian(decimals=3)[source]#
Export Krivanek Cartesian (Flat dictionary).
- Return type:
Dict[str, float]