A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
// Upload image from stack to SLM before each frame in MDA. | |
// | |
// We have to use the core API to upload each frame individually, | |
// since there is no public sequencing API for SLM devices. | |
// | |
// Pariksheet Nanda <[email protected]> July 2014 | |
// | |
// License: Public Domain | |
import ij.io.Opener; // To load TIFF stack file from disk. |
// Close shutter after specified delay. | |
// | |
// In response to James' question on the mailing list: | |
// http://micro-manager.3463995.n2.nabble.com/Tethered-Cam-Sutter-Shutter-Closure-Delay-td7583216.html | |
// Set this variable to however long you need your shutter to be open. | |
delayBeforeShutterCloseMs = 800; | |
// Opens shutter and sets timer to close shutter. | |
Runnable synchronizedShutter = new Runnable() { |
// Map time stamps to image labels. | |
// | |
// Running this script adds a timestamp label to each image slice. | |
// Thus the timestamp shows up in paranthesis in the info bar on top | |
// of the image. | |
// | |
// Adapted from planeTimings.txt in bioformats repository: | |
// https://github.com/openmicroscopy/bioformats/blob/v5.0.2/components/bio-formats-plugins/utils/macros/planeTimings.txt | |
// | |
// Pariksheet Nanda <[email protected]> 2014-06-19 |
@echo off | |
rem Copy settings from 32-bit MetaMorph to fresh 64-bit MetaMorph. | |
rem | |
rem Usage: Change the values of mm_old_folder and mm_new_folder as | |
rem necessary and run the script. | |
rem | |
rem Pariksheet Nanda <[email protected]> 2014-05-06 | |
rem | |
rem License: Public Domain |
// Prints time intervals from most recently selected MDA data window. | |
// | |
// Reads "ElapsedTime-ms" property from image metadata to calculate | |
// image intervals. Sets first frame to 0 ms. | |
// | |
// One current limitation of the MM API (and therefore this script) is | |
// we to the most recently selected MDA data window (it's possible the | |
// user most recently selected the snap window or an ImageJ image | |
// window), so one has to prompt the user to select an MDA data | |
// window. One could add a "getActiveAcquisitionName()" to the gui |
""" | |
Reset MetaMorph user toolbars to default value. | |
When migrating from 32-bit to 64-bit MetaMorph, sometimes the | |
mmproc.cfg files have toolbar information that causes MetaMorph to | |
crash on startup. Reset these to the state found in a new mmproc.cfg | |
file. | |
Pariksheet Nanda <[email protected]> 2014-03-27 | |
License: Public Domain |
// ==ClosureCompiler== | |
// @output_file_name default.js | |
// @compilation_level SIMPLE_OPTIMIZATIONS | |
// ==/ClosureCompiler== | |
/* | |
**Notes** | |
In some cases, forms will still get submitted when you click the submit button. |
/** | |
* Split Stack macro | |
* | |
* Fixes MetaMorph dual camera image files, by splitting them into | |
* their separate channel files. | |
* | |
* Usage: In ImageJ, use Plugins > Macros > Run... | |
* | |
* Description: | |
* |
#SHELL | |
""" | |
Calculate Spinning Disk uniformity and compare with Andor's specification. | |
Usage: | |
Start the Python IDE from iQ from under Plugins. Run this Plugin from | |
the iQ menu and select the "Progress" tab. | |
Run a protocol with just "Snap" and loop protocol enabled to collect images. | |
The bar will update to show how close the image drop-off. |