Gatan | AMETEKSkip to Main Content
No options found

Microscope access

Python Script

Example script basic microscope access. For further info please also refer to the DigitalMicrograph scripting documentation on microscope access.

Preview

'''
Example script basic microscope access.
For further info please also refer to the DM-scripting documentation
on Microscope access.
'''
import DigitalMicrograph as DM

mic = DM.Py_Microscope()

# Ouptut some microscope parameters
print( 'Brightness:', mic.GetBrightness() ) 
print( 'Focus:', mic.GetFocus() ) 
print( 'Condenser aperture:', mic.GetCondenserAperture() )

# Set microscope focus
mic.SetFocus( 30 )
print( 'Focus (changed):', mic.GetFocus() )