Skip to content

Instantly share code, notes, and snippets.

@omsai
omsai / zip_iQ_settings.py
Created December 1, 2011 20:39
Creates a zip file containing 'Kinetic Imaging' iQ settings folder and 'kiconfig.ini' configurations file
'''
Zip Andor iQ settings
Creates a zip file on the desktop containing:
- iQ settings folder
C:\Documents and Settings\All Users\Application Data\Kinetic Imaging\
C:\ProgramData\Kinetic Imaging\
- Configurations file
C:\Program Files\Andor Bioimaging\Common Files\kiconfig.ini
C:\Program Files (x86)\Andor Bioimaging\Common Files\kiconfig.ini
@omsai
omsai / generate_test_ROI_for_micropoint.py
Created December 2, 2011 00:03
Test Micropoint calibration with configurable pattern for e.g. 365nm objective
'''
Generate an Andor iQ .rgn file with a scalable and repositionable pattern of
FRAPPA points
'''
# User variables
SENSOR_SIZE = [512, 512]
CENTER = [255,255]
SIDE_LENGTH = 360
POINT_SPACING = 20
@omsai
omsai / LineMeasure.txt
Created March 9, 2012 00:55
ImageJ line profile signal length over time
/*
Calculate specimen width in pixels using a line profile
Requires:
- Single channel image stack
- Line profile drawn on image
Algorithm:
- Assumes a single signal level threashold
- Checks each line profile pixel intensity from the left for start
@omsai
omsai / gist:2029530
Created March 13, 2012 15:51
ImageJ macro - Stack Profile Plot
/*
Calculate specimen width in pixels using a line profile
Requires:
- Single channel image stack
- Line profile drawn on image
Output:
- Bitmap image stack of profile plots of original stack (not usable data!)
- Text file on desktop with numeric data with format:
@omsai
omsai / timestamp.py
Last active October 5, 2015 13:48
iQ IDE plugin to export image stamps with sorting
#BACKGROUND
'''
Saves image stamps, sorted by time, in CSV file on desktop.
FIXME: For this to work, upstream needs to patch imagedisk/__init__.py to use
new 3.x Python style class foo(object): instead of class foo: syntax.
'''
import imagedisk
import iqtools
@omsai
omsai / Review Screen Data.js
Last active October 11, 2015 09:18
ImageJ macro - import MetaMorph 7 Screen Acquisition data
/**
* Make montage stacks from MetaMorph 7 High Throughput Screening.
*
* MetaMorph 7's Screen Acquisition (screenacq) does not natively
* support time and Z acquisitions from it's UI or journal functions.
* Therefore it's easier to assemble the experiment with FIJI
* including stitch TIF files together with overlap. It is
* assumed the grid of all sites in a well are imaged, i.e. supports
* Metamorph's "Well Selection" but not "Site Selection".
*
@omsai
omsai / $Drop Off.py
Created October 16, 2012 15:55
Andor iQ Python IDE script to calculate Yokogawa excitation uniformity
#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.
@omsai
omsai / gist:5179296
Last active December 15, 2015 01:19
Split Stack ImageJ macro to fix MetaMorph dual camera image files, by splitting them into their separate channel files
/**
* 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:
*
@drinks
drinks / gist:6188712
Last active December 20, 2015 20:09
Paste this into your browser's console (view>developer>javascript console in chrome, tools>web developer>web console in firefox) each time you load the page to be walked through the steps of generating a YAML file in the contact-congress format. See comments in the script below for some caveats.
// ==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.
@sloria
sloria / bobp-python.md
Last active July 24, 2024 02:53
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens