top bar

Difference between revisions of "High Speed Acquisition in Micro-Manager"

(Necessary computer hardware: Replace link to CrystalDiskMark (whose page has an ad banner that links to malware!))
 
(17 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The latest Scientific CMOS (sCMOS) cameras such as the [http://www.andor.com/scientific-cameras/neo-and-zyla-scmos-cameras/zyla-55-scmos Andor Zyla], [http://www.hamamatsucameras.com/flash4/ Hamamatsu Orca Flash 4.0], and [http://www.pco.de/categories/scmos-cameras/pcoedge/ PCO edge] boast large format sensors and high frame rates, producing image data of up to 1.1 GB/s. As of version 1.4.15, Micro-Manager is capable of acquiring images from cameras at these high speeds. Some care must be taken to ensure that these images are properly stored.
+
The latest Scientific CMOS (sCMOS) cameras such as the [http://www.andor.com/scientific-cameras/neo-and-zyla-scmos-cameras/zyla-55-scmos Andor Zyla], [http://www.hamamatsucameras.com/flash4/ Hamamatsu Orca Flash 4.0], and [http://www.pco.de/categories/scmos-cameras/pcoedge/ PCO edge] boast large format sensors and high frame rates, producing image data at up to 1.1 GB/s. As of version 1.4.15, [http://micro-manager.org Micro-Manager] has been optimized to be able to acquire images from cameras at these high speeds. Some preparations must be made to be able to store images at that rate, however.
  
First, acquire a computer that can handle these data rates. It is possible to temporarily store the images in RAM, or to store them directly to permanent storage.
+
=== Necessary computer hardware ===
  
For RAM storage, make sure the computer has relatively recent RAM (such as PC1600 or faster) and enough RAM for the desired acquisition. The Micro-Manager team has tested a computer with 128 GB of RAM, storing 100 GB of images from the Andor Zyla and Hamamatsu Orca Flash 4.0 at full frame and full frame rate (90 seconds of images).
+
First, you need a computer that can handle these high data rates. With the right hardware, you can store the images either in RAM (for later copying to disk) or on [http://en.wikipedia.org/wiki/Solid-state_drive solid state drives] (SSDs).
  
For disk storage, we have used a number of solid state drives in tandem using a RAID controller. Our setups included 3 or 4 Samsung 840 Series 256 GB Solid State Drives (SSDs). We used the RAID controller configuration software to create a [http://en.wikipedia.org/wiki/Standard_RAID_levels#RAID_0 RAID0] virtual drive, setting the [http://en.wikipedia.org/wiki/Data_striping stripe size] to 1MB and the write policy to Always Write Back. Then we used the [http://technet.microsoft.com/en-us/magazine/gg309170.aspx Windows 7 disk management tool] to format the virtual drive and set the Allocation Unit Size to 64 kB. We found we were able to fill the virtual drive (up to 900 GB over ~13 min) with a time series at 1.1 GB/s (full frame rate and full frame for the 10-tap Andor Zyla).
+
To use RAM storage, make sure the computer has relatively recent RAM (such as PC1600 or faster) and enough RAM for the desired acquisition. The Micro-Manager team has tested a computer with 128 GB of RAM, storing 100 GB of full frame images from the Andor Zyla and Hamamatsu Orca Flash 4.0 at the full frame rate (90 seconds of images).
  
We discovered after purchasing our test computer did not support [http://en.wikipedia.org/wiki/TRIM TRIM]. This meant that the virtual drive performance would fall dramatically after several acquisitions. We could restore performance by reformatting the virtual drive the Windows disk management tool (with "Quick Format" turned off). Nonetheless, we strongly recommend purchasing a computer and RAID controller that are compatible with TRIM.
+
For SSD storage, we have used a number of SSDs in tandem using a RAID controller. Our setups included 3 or 4 Samsung 840 Series 256 GB SSDs, which offer write speeds of up to ~500 MB/s. We used the RAID controller configuration software to create a [http://en.wikipedia.org/wiki/Standard_RAID_levels#RAID_0 RAID0] virtual drive, setting the [http://en.wikipedia.org/wiki/Data_striping stripe size] to 1MB and the write policy to Always Write Back. Then we used the [http://technet.microsoft.com/en-us/magazine/gg309170.aspx Windows 7 disk management tool] to format the virtual drive and set the Allocation Unit Size to 64 kB. It was convenient to use a benchmark utility such as [http://www.hdtune.com/ HD Tune] to measure the writing speed of the virtual drive, which was, as expected for a RAID0 setup, the sum of the SSDs' speed (~1500 MB/s for 3 SSDs).
  
One the computer is set up, the camera driver is installed, Micro-Manager is installed (on a drive other than the virtual drive) and configured with the camera, we are ready to start testing acquisition. After starting Micro-Manager, select "Options" under the Tools menu. Please ensure that the "Fast Storage" option is checked. In the future, Fast Storage mode is likely to become the default and the checkbox will be hidden.
+
We were able to soup up Micro-Manager's various code modules to enable it to acquire long image sequences at 1.1 GB/s (the full frame rate and full 2560x2160 frame for the 10-tap Andor Zyla), filling the virtual drive with over 900 GB of frames in ~13 min.
  
Starting live mode lets us test that the camera is working. For the sCMOS cameras such as the Zyla or Flash 4.0, setting exposure time to 10 ms should result in 100 fps reported in the Live window.
+
Despite this success, we discovered (after purchase) that our test computer did not support [http://en.wikipedia.org/wiki/TRIM TRIM]. This lack of TRIM seems to be the reason we experienced a dramatic fall in virtual drive performance after several acquisitions. We were able to restore performance to the highest speed by reformatting the virtual drive using the Windows disk management tool (with "Quick Format" turned off). Reformatting is very inconvenient, so we strongly recommend purchasing a computer and RAID controller that are compatible with TRIM.
  
Once the camera is confirmed to be working, open Multi-Dimensional Acquisition, and select Time points. Multiple positions, Z-stacks, Autofocus, and Channels should be unchecked. For RAM storage, leave "Save images" unchecked. For disk storage, check "Save images" and make sure "Image stack file" is selected. Choose a directory and name prefix for the file. Then press the "Acquire!" button. A window should appear that shows a live view from the camera, and the progress of the acquisition. Micro-Manager's display will drop frames when necessary to avoid falling behind the acquisition (which does not drop frames).
+
=== How to run a high speed acquisition ===
  
At this point, the CPU usage should not be too high -- our test computer often shows only about 20% CPU consumption during a high speed acquisition. If images are being stored to RAM, you can open the Windows Task Manager and watch RAM usage ramp up linearly.
+
Once the computer is running, you'll need to install the camera driver and the latest version of Micro-Manager, and then configure Micro-Manager to operate the camera. Now you can start testing acquisition. After launching Micro-Manager, select "Options" under the Tools menu and ensure that the "Fast Storage" option is checked. In the future, Fast Storage mode is likely to become the standard acquisition and the checkbox will be hidden.
  
Once acquisition has finished, you can immediately review the movie by dragging the time slider on the display. If the images have been acquired to RAM, one can press the save button to save the images to disk (which, depending on the disk type, may take much longer than the acquisition itself). When the image window is closed, Micro-Manager's memory usage should fall back to the level before acquisition was started.
+
Start live mode to test that the camera is working. The Live window should appear and the live view should continuously update as new images arrive from the camera. For sCMOS cameras such as the Zyla or Flash 4.0, setting exposure time to 10 ms should result in images arriving at 100 fps, which should be reported in the Live window.
  
Micro-Manager's high speed hardware triggering capabilities can be combined with high speed cameras to produce sophisticated image sets. A microcontroller compatible with Micro-Manager, can pass trigger signals from the camera to an AOTF- or LED-based illuminator to produce high speed multi-channel movies, and by triggering a piezo-driven focus drive, can produce high speed Z stacks.
+
When the camera is confirmed to be working, open Multi-Dimensional Acquisition, and activate Time points. Multiple positions, Z-stacks, Autofocus, and Channels should be deactivated. To acquire to RAM, leave "Save images" unchecked. For disk storage, activate "Save images" and make sure "Image stack file" is selected. Choose a root directory and enter a name prefix for the image file(s). Then press the "Acquire!" button. A window should appear that shows a live view from the camera, and captions indicating the speed of acquisition and number of images already acquired. Micro-Manager's display will skip frames when necessary to avoid falling behind the most recent images. (Note that the Micro-Manager acquisition itself will not drop frames but report an error if the application is unable to keep up with the frame rate).
 +
 
 +
At this point, the CPU usage should not be too high -- our test computer often shows only about 20% CPU consumption during a high speed acquisition. If images are being stored to RAM, you can open the Windows Task Manager and watch RAM usage ramp up linearly with time.
 +
 
 +
When acquisition has finished, you can immediately review the movie by dragging the time slider on the display window. If the images have been acquired to RAM, one can press the save button to save the images to disk. (Depending on the disk type, saving from RAM may take much longer than the acquisition itself.) When the image window is closed, Micro-Manager's memory usage should fall back to the level before acquisition was started.
 +
 
 +
Micro-Manager's high-speed [[Hardware-based_synchronization|hardware triggering capabilities]] can be combined with high-speed cameras to produce fast multi-dimensional image sets. A microcontroller compatible with Micro-Manager can pass trigger signals from the camera to an AOTF- or LED-based illuminator to produce high-speed multi-channel movies, and by triggering a piezo-driven focus drive, can produce high-speed Z stacks.
 +
 
 +
 
 +
 
 +
{{Documentation_Sidebar}}

Latest revision as of 11:07, 9 December 2013

The latest Scientific CMOS (sCMOS) cameras such as the Andor Zyla, Hamamatsu Orca Flash 4.0, and PCO edge boast large format sensors and high frame rates, producing image data at up to 1.1 GB/s. As of version 1.4.15, Micro-Manager has been optimized to be able to acquire images from cameras at these high speeds. Some preparations must be made to be able to store images at that rate, however.

Necessary computer hardware

First, you need a computer that can handle these high data rates. With the right hardware, you can store the images either in RAM (for later copying to disk) or on solid state drives (SSDs).

To use RAM storage, make sure the computer has relatively recent RAM (such as PC1600 or faster) and enough RAM for the desired acquisition. The Micro-Manager team has tested a computer with 128 GB of RAM, storing 100 GB of full frame images from the Andor Zyla and Hamamatsu Orca Flash 4.0 at the full frame rate (90 seconds of images).

For SSD storage, we have used a number of SSDs in tandem using a RAID controller. Our setups included 3 or 4 Samsung 840 Series 256 GB SSDs, which offer write speeds of up to ~500 MB/s. We used the RAID controller configuration software to create a RAID0 virtual drive, setting the stripe size to 1MB and the write policy to Always Write Back. Then we used the Windows 7 disk management tool to format the virtual drive and set the Allocation Unit Size to 64 kB. It was convenient to use a benchmark utility such as HD Tune to measure the writing speed of the virtual drive, which was, as expected for a RAID0 setup, the sum of the SSDs' speed (~1500 MB/s for 3 SSDs).

We were able to soup up Micro-Manager's various code modules to enable it to acquire long image sequences at 1.1 GB/s (the full frame rate and full 2560x2160 frame for the 10-tap Andor Zyla), filling the virtual drive with over 900 GB of frames in ~13 min.

Despite this success, we discovered (after purchase) that our test computer did not support TRIM. This lack of TRIM seems to be the reason we experienced a dramatic fall in virtual drive performance after several acquisitions. We were able to restore performance to the highest speed by reformatting the virtual drive using the Windows disk management tool (with "Quick Format" turned off). Reformatting is very inconvenient, so we strongly recommend purchasing a computer and RAID controller that are compatible with TRIM.

How to run a high speed acquisition

Once the computer is running, you'll need to install the camera driver and the latest version of Micro-Manager, and then configure Micro-Manager to operate the camera. Now you can start testing acquisition. After launching Micro-Manager, select "Options" under the Tools menu and ensure that the "Fast Storage" option is checked. In the future, Fast Storage mode is likely to become the standard acquisition and the checkbox will be hidden.

Start live mode to test that the camera is working. The Live window should appear and the live view should continuously update as new images arrive from the camera. For sCMOS cameras such as the Zyla or Flash 4.0, setting exposure time to 10 ms should result in images arriving at 100 fps, which should be reported in the Live window.

When the camera is confirmed to be working, open Multi-Dimensional Acquisition, and activate Time points. Multiple positions, Z-stacks, Autofocus, and Channels should be deactivated. To acquire to RAM, leave "Save images" unchecked. For disk storage, activate "Save images" and make sure "Image stack file" is selected. Choose a root directory and enter a name prefix for the image file(s). Then press the "Acquire!" button. A window should appear that shows a live view from the camera, and captions indicating the speed of acquisition and number of images already acquired. Micro-Manager's display will skip frames when necessary to avoid falling behind the most recent images. (Note that the Micro-Manager acquisition itself will not drop frames but report an error if the application is unable to keep up with the frame rate).

At this point, the CPU usage should not be too high -- our test computer often shows only about 20% CPU consumption during a high speed acquisition. If images are being stored to RAM, you can open the Windows Task Manager and watch RAM usage ramp up linearly with time.

When acquisition has finished, you can immediately review the movie by dragging the time slider on the display window. If the images have been acquired to RAM, one can press the save button to save the images to disk. (Depending on the disk type, saving from RAM may take much longer than the acquisition itself.) When the image window is closed, Micro-Manager's memory usage should fall back to the level before acquisition was started.

Micro-Manager's high-speed hardware triggering capabilities can be combined with high-speed cameras to produce fast multi-dimensional image sets. A microcontroller compatible with Micro-Manager can pass trigger signals from the camera to an AOTF- or LED-based illuminator to produce high-speed multi-channel movies, and by triggering a piezo-driven focus drive, can produce high-speed Z stacks.


© Micro-Manager : Vale Lab, UCSF 2006-2011 | All Rights Reserved | Contact