TEM3: control magnification¶
This page presents a simple sample code using the TEM3 package.
The functions to be introduced are as follows
Get a list of detectors that can be controlled
Get or set a detector information
Image capturing
Prerequisites
TEMCenter is running (in the case of online)
TEMServer is running (in the case of online)
Ver.1.3.0 (Operation check environment)
0. Import TEM3¶
1# online
2from PyJEM import TEM3
3TEM3.connect()
4
5## offline
6#from PyJEM,offline import TEM3
7#TEM3.connect()
1. Get current mag value¶
Use GetMagValue() function in EOS class to get the value.
1.1. Create EOS instance¶
1eos = TEM3.EOS3()
1.2. Call GetMagValue method¶
1eos.GetMagValue()
[200, 'X', 'X200']
2. Change the magnification¶
The magnification can be changed with SetSelector() defined in TEM3.EOS3().
SetSelector () has one argument and will be changed to a magnification according to the entered value.
The input value is 0 to 40 in index.
The Set function has no return value. You can check the changed magnification with GetMagValue ().
2.1. Call a SetSelector method¶
change to 1 (index) mag value.
1eos.SetSelector(1)
2.2. Check TEM state¶
1eos.GetMagValue()
[250, 'X', 'X250']
3. Increase the magnification by some step¶
10 steps from the current magnification using the for statement
Use “for” statement
>>> for i in range(10):
Use function UpSelector() to increase the magnification one step at a time.
3.1. Execute¶
1for i in range(10):
2 eos.UpSelector()
3 print(eos.GetMagValue())
[300, 'X', 'X300']
[400, 'X', 'X400']
[500, 'X', 'X500']
[600, 'X', 'X600']
[800, 'X', 'X800']
[1000, 'X', 'X1000']
[1200, 'X', 'X1200']
[1500, 'X', 'X1500']
[2000, 'X', 'X2000']
[2500, 'X', 'X2500']