Nion Swift Acquisition Scripting
Introduce STEM control, scan devices, cameras, and also programming techniques, instrument simulator, and threading concerns.
Nion Swift Workshop Chris Meyer 2018 October 4
Acquisition Scripting Nion Swift Workshop Chris Meyer 2018 October - - PowerPoint PPT Presentation
Nion Swift Acquisition Scripting Nion Swift Workshop Chris Meyer 2018 October 4 Introduce STEM control, scan devices, cameras, and also programming techniques, instrument simulator, and threading concerns. Nion Swift Acquisition Scripting
Nion Swift Workshop Chris Meyer 2018 October 4
In this session, we will cover preliminary material regarding STEM control, scan devices, cameras, and also review the programming techniques that we'll be using in the following sessions to access those devices. We will introduce the instrument simulator and show how it can be used to experiment offline with instruments and acquisition devices. We will also discuss issues related to threading.
In this talk you'll learn about: The STEM controller, scan controller, and cameras. The instrument simulator. Acquisition and Python threading.
Ronchigram and EELS cameras, video
(EDS, CL, etc.)
from nion.utils import Registry stem_controller = Registry.get_component("stem_controller") scan = stem_controller.scan_controller ronchigram = stem_controller.ronchigram_camera eels = stem_controller.eels_camera
Full documentation: https://nionswift-instrumentation.readthedocs.io/en/latest/
from nion.utils import Registry stem_controller = Registry.get_component("stem_controller") defocus = stem_controller.GetVal("C10") stem_controller.SetValAndConfirm("C10", -2000E-9, 1.0, 3000)
Full documentation: https://nionswift-instrumentation.readthedocs.io/en/latest/
different modes of operation
from nion.utils import Registry stem_controller = Registry.get_component("stem_controller") ronchigram_camera = stem_controller.ronchigram_camera ronchigram_camera.start_playing() time.sleep(5.0) ronchigram_camera.stop_playing()
Full documentation: https://nionswift-instrumentation.readthedocs.io/en/latest/
Full documentation: https://nionswift-instrumentation.readthedocs.io/en/latest/
to describe desired acquisition.
and set when playing
users are called settings; limited support.
from nion.utils import Registry stem_controller = Registry.get_component("stem_controller") camera = stem_controller.ronchigram_camera frame_params = camera.get_current_frame_parameters() frame_params["exposure_ms"] = 50 ronchigram_camera.start_playing(frame_params)
Full documentation: https://nionswift-instrumentation.readthedocs.io/en/latest/
cameras expose detector.
exposed after a state change.
compensate.
from nion.utils import Registry stem_controller = Registry.get_component("stem_controller") camera = stem_controller.ronchigram_camera stem_controller.SetValAndConfirm("C10", 1E-9, 1.0, 3000) camera.grab_next_to_start() # throw away data_list = camera.grab_next_to_start() # real data
Full documentation: https://nionswift-instrumentation.readthedocs.io/en/latest/
Full documentation: https://nionswift-instrumentation.readthedocs.io/en/latest/
acquisition
frames, must prepare memory
channel
Full documentation: https://nionswift-instrumentation.readthedocs.io/en/latest/
from nion.utils import Registry stem_controller = Registry.get_component("stem_controller") camera = stem_controller.eels_camera camera.start_playing() if camera.grab_sequence_prepare(10): data_list = camera.grab_sequence(10)
grabbing previously acquired data.
for each channel)
Full documentation: https://nionswift-instrumentation.readthedocs.io/en/latest/
from nion.utils import Registry stem_controller = Registry.get_component("stem_controller") camera = stem_controller.eels_camera camera.start_playing() data_list = camera.grab_buffer(10)
from nion.utils import Registry stem_controller = Registry.get_component("stem_controller") scan = stem_controller.scan_controller
Full documentation: https://nionswift-instrumentation.readthedocs.io/en/latest/
rotation)
parameters when finished
from nion.utils import Registry stem_controller = Registry.get_component("stem_controller") scan = stem_controller.scan_controller params = scan.get_current_frame_parameters() params["fov_nm"] = 20 params["pixel_time_us"] = 4
Full documentation: https://nionswift-instrumentation.readthedocs.io/en/latest/
parameters (currently)
from nion.utils import Registry stem_controller = Registry.get_component("stem_controller") scan = stem_controller.scan_controller scan.set_enabled_channels([0, 1]) print(scan.get_enabled_channels())
Full documentation: https://nionswift-instrumentation.readthedocs.io/en/latest/
that reference frame
configured within the reference frame
from nion.utils import Registry stem_controller = Registry.get_component("stem_controller") scan = stem_controller.scan_controller params = scan.get_current_frame_parameters() params["subscan_fractional_size"] = (0.40, 0.25) params["subscan_fractional_center"] = (0.60, 0.70)
Full documentation: https://nionswift-instrumentation.readthedocs.io/en/latest/
to the scan so that one camera frame is acquired for each scan position.
properly.
it, too!)
combined_data = scan.grab_synchronized( scan_frame_parameters=scan_frame_param eters, camera=eels, camera_frame_parameters= eels_frame_parameters) scan_datas, camera_datas = combined_data haadf_data = scan_datas[0] eels_data = camera_datas[0]
Full documentation: https://nionswift-instrumentation.readthedocs.io/en/latest/
reference frame, possible to position probe within that reference frame.
controller
from nion.utils import Registry stem_controller = Registry.get_component("stem_controller") probe_position = stem_controller.probe_position Stem_controller.probe_position = (0.6, 0.7)
Full documentation: https://nionswift-instrumentation.readthedocs.io/en/latest/
them difficult to synchronize
required
from nion.utils import Registry stem_controller = Registry.get_component("stem_controller") scan = stem_controller.scan_controller ronchigram = stem_controller.ronchigram_camera eels = stem_controller.eels_camera
Full documentation: https://nionswift-instrumentation.readthedocs.io/en/latest/
controllers
add new cameras
from nion.utils import Registry stem_controller = Registry.get_component("stem_controller") video = stem_controller.get_video_controller("slit")
Full documentation: https://nionswift-instrumentation.readthedocs.io/en/latest/
Full documentation: https://nionswift-instrumentation.readthedocs.io/en/latest/
Full documentation: https://nionswift-instrumentation.readthedocs.io/en/latest/
Full documentation: https://nionswift-instrumentation.readthedocs.io/en/latest/
Full documentation: https://nionswift-instrumentation.readthedocs.io/en/latest/
Full documentation: https://nionswift-instrumentation.readthedocs.io/en/latest/
Full documentation: https://nionswift-instrumentation.readthedocs.io/en/latest/
Full documentation: https://nionswift-instrumentation.readthedocs.io/en/latest/
Full documentation: https://nionswift-instrumentation.readthedocs.io/en/latest/
Full documentation: https://nionswift-instrumentation.readthedocs.io/en/latest/
Full documentation: https://nionswift-instrumentation.readthedocs.io/en/latest/
reference_key = scan.make_reference_key(channel_index=0, subscan=True) data_item = api.library.get_data_item_for_reference_key(reference_key)
In this talk you've learned: The STEM controller, scan controller, and cameras. The instrument simulator. Acquisition and Python threading.