From pariksheet.nanda at gmail.com Wed Jun 20 23:26:54 2012 From: pariksheet.nanda at gmail.com (Pariksheet Nanda) Date: Wed, 20 Jun 2012 17:26:54 -0400 Subject: [iQ-users] Hardware control Message-ID: On Jun 16, 2012, at 3:14 PM, "Renat Khaliullin" wrote: > I was hoping to ... obtain image, process it with python and adjust > microscope settings on the fly. For instance, change focal plane, or > laser intensity. > Laser intensity control isn't built into the Andor Python bindings in version 2.5.3 You can control the stage XYZ, focus and snap images from the iqapp iQ class instance [1] > As far as I understood, it is very possible to achieve with micromanager > to python binding. Please, let me know if something like that is > possible with IQ+python. > Micromanager exposes all it's device properties and in that respect is more capable for pure hardware scripting. ?The iQ main application allows that capability of ordering hardware actions graphically in "user space" with it's flexible protocols feature. ?So iQ has a different approach. It brings the convenience of setting up complex execution structures in the main application as you would in a script, graphically, without needing any coding experience. The "iQ way" to run a Python script for augmenting hardware control during an experiment, is to use the event observer: 1) You could process data and make decisions to reposition the specimen 2) You can control other hardware that iQ is *not* controlling in the main application, but instead directly through Python (possibly using Micromanager) Or do both. However, you typically would setup a lot of the experiment device control in setting up the protocol through the GUI. Another difference with Micromanager is their Python bindings don't seem to allow you to run the Java application concurrently with the Python interface. There are only bindings for MMCore, and not ij and MMJ_. If you were instead to run Jython to control both the core and the GUI, then you lose out on the NumPy bindings MMCorePy provides. The Andor Python IDE can be run concurrently with the main iQ GUI. --- [1] >>> import iqapp >>> info(iqapp.iQ) iQ(URI=None) Connect to an iQ instance and control it. Methods: ?setZAxisPosition ?-- ?Set the Z position. ?setXYAxisPosition ?-- ?Set the XY position. ?getCurrentImagePosition ?-- ?Returns the frame position of the currently selected image in iQ. ?isZAxisAvailable ?-- ?Returns true if a Z-stage is available to be controled. ?getXYAxisPosition ?-- ?Returns current XY position. ?listConnections ?-- ?Lists the computers connected via IDE to Andor iQ. ?getZAxisPosition ?-- ?Returns current Z position. ?live ?-- ?Sets iQ in Live mode. ?getChannel ?-- ?Returns the currently select channel in iQ. ?setCurrentImagePosition ?-- ?Returns the frame position of the currently selected image in iQ. ?setCurrentImageName ?-- ?Selects the image to be displayed on the ImageViewer. ?idle ?-- ?If iQ is in Live mode then sets it back to idle. ?setChannel ?-- ?Sets a specific channel (see also L{getChannels}). ?isXYAxisAvailable ?-- ?Returns true if an XY-stage is available to be controled. ?getChannels ?-- ?Returns the available channels. ?isLive ?-- ?Returns is iQ is in Live mode. ?snap ?-- ?getCurrentImageName ?--