de_twin.optics.realism.ColumnRealism#
- class de_twin.optics.realism.ColumnRealism(seed=0, rotation_jitter_deg=2.0, image_rotation=True, pixel_scale_sigma=0.02, is_scale_sigma=0.05, is_skew_sigma=0.02, is_rotation_sigma_deg=3.0, mag_offset_fraction=0.02, backlash_um=0.3, bs_scale_sigma=0.05, bs_skew_sigma=0.02, bs_rotation_sigma_deg=5.0, crossover_intensity=0.35, crossover_sigma=0.02, is_coma_mrad_per_um=0.43, is_astig_nm_per_um=15.0, hd_scale_per_um=0.0002, hd_rotation_deg_per_um=0.01)[source]#
Bases:
DefocusAndTruthThe imperfect geometry of a real column (see the module docstring).
- Parameters:
seed (int)
rotation_jitter_deg (float)
image_rotation (bool)
pixel_scale_sigma (float)
is_scale_sigma (float)
is_skew_sigma (float)
is_rotation_sigma_deg (float)
mag_offset_fraction (float)
backlash_um (float)
bs_scale_sigma (float)
bs_skew_sigma (float)
bs_rotation_sigma_deg (float)
crossover_intensity (float)
crossover_sigma (float)
is_coma_mrad_per_um (float)
is_astig_nm_per_um (float)
hd_scale_per_um (float)
hd_rotation_deg_per_um (float)
- __init__(seed=0, rotation_jitter_deg=2.0, image_rotation=True, pixel_scale_sigma=0.02, is_scale_sigma=0.05, is_skew_sigma=0.02, is_rotation_sigma_deg=3.0, mag_offset_fraction=0.02, backlash_um=0.3, bs_scale_sigma=0.05, bs_skew_sigma=0.02, bs_rotation_sigma_deg=5.0, crossover_intensity=0.35, crossover_sigma=0.02, is_coma_mrad_per_um=0.43, is_astig_nm_per_um=15.0, hd_scale_per_um=0.0002, hd_rotation_deg_per_um=0.01)#
- Parameters:
seed (int)
rotation_jitter_deg (float)
image_rotation (bool)
pixel_scale_sigma (float)
is_scale_sigma (float)
is_skew_sigma (float)
is_rotation_sigma_deg (float)
mag_offset_fraction (float)
backlash_um (float)
bs_scale_sigma (float)
bs_skew_sigma (float)
bs_rotation_sigma_deg (float)
crossover_intensity (float)
crossover_sigma (float)
is_coma_mrad_per_um (float)
is_astig_nm_per_um (float)
hd_scale_per_um (float)
hd_rotation_deg_per_um (float)
- Return type:
None
Methods
__init__([seed, rotation_jitter_deg, ...])2x2: specimen micrometres (world frame) per beam-shift unit.
crossover(spot[, probe_mode])The Intensity at the C2 crossover for this spot size and probe mode.
defocus_rotation_rad(defocus_um)defocus_scale(defocus_um)True pixel size factor at this defocus (the magnification drops as it grows).
is_astig_nm(isx_um, isy_um)The axial astigmatism A1 (complex nm) an image shift of (x, y) um adds.
is_matrix(mag_mode, magnification)2x2: specimen micrometres (world frame) per image-shift unit.
is_tilt_mrad(isx_um, isy_um)The effective beam tilt (mrad) of an image shift of (x, y) specimen micrometres.
mag_offset_um(mag_mode, magnification)Where this magnification puts the image centre, relative to the ideal, micrometres: mag_offset_fraction of a nominal field of 1e5 / mag um (5 um at 20 kx).
pixel_scale(mag_mode, magnification)True pixel size / nominal pixel size.
rotation_rad(mag_mode, magnification)How far the image is rotated on the camera, radians (world -> camera).
truth(mag_mode, magnification)Every value at one magnification, for tests that calibrate against the twin.
Attributes
The stage stops short by half of this against its approach direction, micrometres.
one for all magnifications): scale / skew / rotation spreads, as for image shift.
the Intensity at which the beam is smallest, and its spread over spot sizes and probe modes (SerialEM's Beam Crossover calibration).
the magnification changes by this fraction and the image rotates by this many degrees per micrometre of defocus (SerialEM's high-defocus magnification / image-shift calibrations; -200 um: ~4 %, ~2 deg).
The base angle of each imaging mode is drawn over the full circle.
an effective beam tilt of this many mrad per micrometre of image shift (~1 / f_obj, f_obj ~ 2.3 mm), at a small seeded angle, and an axial astigmatism of this many nm per micrometre.
spread of each axis's scale, of the skew, and of its rotation (deg).
Image-centre offset on a magnification change, as a fraction of that mag's field width.
Spread of true / nominal pixel size, per magnification (fraction).
Spread of the per-magnification image rotation around its mode's base angle, degrees.
- rotation_jitter_deg: float = 2.0#
Spread of the per-magnification image rotation around its mode’s base angle, degrees.
- is_scale_sigma: float = 0.05#
spread of each axis’s scale, of the skew, and of its rotation (deg).
- Type:
Image-shift matrix
- mag_offset_fraction: float = 0.02#
Image-centre offset on a magnification change, as a fraction of that mag’s field width.
- backlash_um: float = 0.3#
The stage stops short by half of this against its approach direction, micrometres.
- bs_scale_sigma: float = 0.05#
one for all magnifications): scale / skew / rotation spreads, as for image shift.
- Type:
Beam-shift matrix (illumination system
- crossover_intensity: float = 0.35#
the Intensity at which the beam is smallest, and its spread over spot sizes and probe modes (SerialEM’s Beam Crossover calibration).
- Type:
C2 crossover
- is_coma_mrad_per_um: float = 0.43#
an effective beam tilt of this many mrad per micrometre of image shift (~1 / f_obj, f_obj ~ 2.3 mm), at a small seeded angle, and an axial astigmatism of this many nm per micrometre. What SerialEM’s coma-vs-image-shift calibration measures.
- Type:
Image shift images the specimen off the objective’s coma-free axis
- hd_scale_per_um: float = 0.0002#
the magnification changes by this fraction and the image rotates by this many degrees per micrometre of defocus (SerialEM’s high-defocus magnification / image-shift calibrations; -200 um: ~4 %, ~2 deg).
- Type:
High defocus weakens the objective
- rotation_rad(mag_mode, magnification)[source]#
How far the image is rotated on the camera, radians (world -> camera).
- is_matrix(mag_mode, magnification)[source]#
2x2: specimen micrometres (world frame) per image-shift unit.
- mag_offset_um(mag_mode, magnification)[source]#
Where this magnification puts the image centre, relative to the ideal, micrometres: mag_offset_fraction of a nominal field of 1e5 / mag um (5 um at 20 kx).
- crossover(spot, probe_mode=0)[source]#
The Intensity at the C2 crossover for this spot size and probe mode.