Camera scripting
Andreas Mittelberger
Camera scripting Andreas Mittelberger Outline 1. Nion Swift camera - - PowerPoint PPT Presentation
Camera scripting Andreas Mittelberger Outline 1. Nion Swift camera API 2. Scientific cameras 3. Webcams 4. Simple scientific cameras Nion Swift camera API User interface ... (nionui) Core (nionswift) hardware control extensions
Andreas Mittelberger
Core (nionswift) User interface (nionui) extensions ... hardware control (nionswift-instrumentation)
nionswift-instrumentation scan device camera device video device
camera device video device
frame_parameters object)
interface (control panel)
the data item panel
camera device
camera_panel_type = "ronchigram" camera_panel_type = "eels" camera_panel_type = "andor_eels"
conda install -n nionswift -c nion nionswift-video-capture opencv pip install nionswift-video-capture opencv-python
First we have to install the nionswift-video-capture plugin: video device
Edit Preferences video device
video device Edit Preferences
video device
video device
video device
from nion.utils import Registry stem_controller = Registry.get_component("stem_controller") ronchigram = stem_controller.ronchigram_camera frame_parameters = ronchigram.get_current_frame_parameters() # adjust frame_parameters here if desired frame_parameters["exposure_ms"] = 200 # start the camera ronchigram.start_playing(frame_parameters) # grab two consecutive frames, with a guaranteed start time after the first call frame1 = ronchigram.grab_next_to_start()[0] frame2 = ronchigram.grab_next_to_finish()[0] # stop the camera ronchigram.stop_playing()
https://github.com/Brow71189/SwiftCam
https://github.com/Brow71189/matrix_vision
18