Hotkey aquisition! - Automation of (simultaneous) electrical & optical recordings with single keystrokes

This script automates electrical and/or optical acquisition in response to single keystrokes, saving time and enabling easyily synchronised electrical and optical data recording.

I got fed up of missing intertesing events in difficult to perform experiments through spending too long switching manually between winEDR and Andor having to setup and activate electrical and optical aquisitions. This script saves important time (when cool stuff is happening that you need to be recording), by assigning these functions to single keystrokes, once you have initially setup win EDR and Andor Solis. This means no more fiddling with the mouse to switch between windows, or find the right small icon, menu button or hurridly enter in a fresh file name for the next recording, you can just hit a single key whilst operating the microscope to collect your data.

In addition, linking video and electrical recordings is made simple by the ability to easily generate a separate electical recording files for each video acquisiation. Thus, electrical & optical recordings are easily paired and time synchronised. Precise time registration can be achieved by employing a second voltage recording channel in winEDR (Ch2) to record the the open/close status of the Andor camera (instructions included). The ability to easily generate separate electrical files for each optical recording eliminates the problems in data analysis of having to sift through very long electrical traces to find the time regions corresponding to video acquisitions - in such circumstances the recording of camera shutter status alone helps a great deal, but this does not distinguish between the events of video recording and live previewing, so marrying up optical events to the correct period of a long electrical recording can be an ardious task.

The program is named 'Automate and Sync winEDR and Andor.exe' and can be found on fastnet at \\Chem-ds5\fastnet\_Software\Ollie sync winEDR and Andor and aquisition shortcut keys\Automate and Sync winEDR and Andor.exe feel free to instal on any suitable experimental bay.

How to use: (this information together with the controls is presented on launching the program):

Setup WinEDR and Andor Solis ready for aquisition.

WinEDR

(a) 'WinEDR' -> 'File' -> 'New' -> Define save location and create first recording file.

(b) 'Setup' -> 'Recording Setup' -> Ensure number of channels = 3, channels 0 and 1 set as normal, to record current and voltage respectively and channel 2 added to record the voltage signal reporting the camera shutter status (Name = camera, V/Units = 0.001, Units = mV).

(c) 'Record' -> 'Record to Disk' such that recording is ready to commence.

Andor Solis

'Andor Solis' -> 'Setup Aquisition' -> Define acquition parameters as desired and enable autosave.

'Hardware' -> 'Shutter Control' -> Ensure 'Shutter Control' is set to 'Fully Auto'

Setup all other parameters as desired such that recording is ready to commence.

Connect the Andor camera 'shutter output' pin to BNC-2090 ACH2 so that winEDR can record the camera shutter status.

Launch the program 'Automate and Sync winEDR and Andor.exe'

Controls:

For ease of use, controls are based around the island of six keys above the arrow keys.

Page Up : Start simulataneous electrical & camera recording

Page Down : Stop electrical recording and ready winEDR for next recording

Home : Aquire video only

End : Aquire electrical only

Insert : Video preview

Delete : End video preview

Number Lock : Toggle camera EM gain on/off

/ on numberpad : Opens Andor setup configuration

* on numberpad : Tiles winEDR and Andor Solis side-by-side (1280x1084 resolution)

- on numberpad : Stops electrical recording WITHOUT readying new file (i.e. paused) for appending several recordings in one file

Use 'Page Up' to start both electrical & camera recording simultaneously. Press 'Page Down' to stop and save the current electrical recording and ready the next electrical file so you're good to record the second, third, fouth, fifth, etc. traces with the next button press.

Pressing 'Home' will aquire video only, and 'End' will aquire electrical only. Again, use 'Page Down' to stop and save the current electrical recording and ready the next electrical file.

If you prefer to append several electrical recordings into a single file use '-' (on the numberpad) to stop electrical recording without readying a new electrical file. Subsequent recordings with 'Page Up' or 'End' will be added onto the end of the current file. Continue using '-' (on the numberpad) to add further recordings, use 'Page Down' to finalise and save the electrical recording and ready the next electrical file if required.

To prevent undue noise on electrical recordings, speakers will mute automatically when aquiring electrical data with 'Page Up' or 'End' and unmute upon ending either type of recording with 'Page Down' or '-' (on the numberpad).

'Insert' and 'Delete' start and stop live video preview, respectively.

Caveats...

To save having to fiddle with the mouse to select the appropriate program, these shortcut keys will function with any window as the current focus (great!). However, this does mean that these keys can not be used for their standard functions (not so cool). End the synchronise program (right click the yellow Lego brick in the taskbar -> Exit) to return their standard functions. I guess Delete is about the only key used with any regularity but in most instances backspace will surfice.

If you're keen to use the numberpad keys for entering numbers, ensure number lock is enabled before launching this program.

If any files or folders with names beinging with "Andor Solis" or "winEDR" are open (e.g. Program file folders or EDR.ini setup file), this will likely cause some problems so close and continue or relaunch the automation program after closing the culprit files/folders.

I (Ollie) wrote and tested this for winEDR V3.2.6 and Andor Solis v4.21.30004.0 or v4.16.30003.0. It should work with other versions of these programs provided that neither Andor nor John Dempster make too great a changes to the operation of their software!

It's not perfect but it should hopefully speed up your workflow, so feel free to use it :)