Skip to content

Instantly share code, notes, and snippets.

@hirokai
hirokai / auto_detect.py
Last active August 29, 2015 14:16
Auto cell detection by RICM, for 20150206 FC1 fixed
# auto_detect.py
from ij import IJ
from ij.plugin import ImageCalculator
IJ.run("Close All")
IJ.run("Stack From List...", "open=/Users/hiroyuki/Desktop/images.txt")
IJ.run("Gaussian Blur...", "sigma=5 stack")
imp = IJ.getImage()
imp.setTitle("all")
@hirokai
hirokai / microjson.py
Created February 21, 2015 21:18
microjson by Patrick Hensley
# microjson - Minimal JSON parser/emitter for use in standalone scripts.
# No warranty. Free to use/modify as you see fit. Trades speed for compactness.
# Send ideas, bugs, simplifications to http://github.com/phensley
# Copyright (c) 2010 Patrick Hensley <spaceboy@indirect.com>
# std
import math
import StringIO
import types
@hirokai
hirokai / linescan.fiji.py
Last active August 29, 2015 14:15
Line scan
# Fiji Jython macro
# Dependencies
# (1) Microjson: https://github.com/phensley/microjson
# Copy is here: https://gist.github.com/hirokai/2fc4353cf6b28e5d2aac
# (2) hiroutil.py: https://gist.github.com/hirokai/77779cdade6d33d0702b
from ij import IJ
from ij.gui import Line, ProfilePlot
import csv
@hirokai
hirokai / mk_list.rb
Last active August 29, 2015 14:15
Make a json of list of images of MicroManager
#!/usr/bin/env ruby
#
require 'rubygems'
require 'json'
require 'find'
require 'csv'
def parent(f)
@hirokai
hirokai / make_pos.rb
Last active August 29, 2015 14:14
MicroManager grid positions
#!/usr/bin/env ruby
require 'json'
include Math
# User parameters
# a: origin (in um)
# b: the 2nd point to define an axis
# Two axes will be (1) b-a and (2) 90 deg clockwise rotation of b-a.
# len: grid interval
@hirokai
hirokai / combine_stats.rb
Created January 23, 2015 23:03
Combining stats from ImagePipeline
#!/usr/bin/env ruby
$chs = ["488nm", "561nm", "647nm"]
def readall
res = {}
for ch in $chs
res[ch] = {}
for i in 1..6
file = "./stats/FC#{i}_#{ch}.csv"
@hirokai
hirokai / 20150121 FC1 568nm images.txt
Created January 23, 2015 01:22
20150121 FC1 568nm images
/Volumes/MacintoshHD/Google Drive/Groves/Scope 7/20150121 T cells fixed on PLL-PEG two color staining of LAT and pLAT/01 FC1 negative control/tirf4ch_144pos_1/1-Pos_000_000/img_000000000_561multi_000.tif
/Volumes/MacintoshHD/Google Drive/Groves/Scope 7/20150121 T cells fixed on PLL-PEG two color staining of LAT and pLAT/01 FC1 negative control/tirf4ch_144pos_1/1-Pos_000_001/img_000000000_561multi_000.tif
/Volumes/MacintoshHD/Google Drive/Groves/Scope 7/20150121 T cells fixed on PLL-PEG two color staining of LAT and pLAT/01 FC1 negative control/tirf4ch_144pos_1/1-Pos_000_002/img_000000000_561multi_000.tif
/Volumes/MacintoshHD/Google Drive/Groves/Scope 7/20150121 T cells fixed on PLL-PEG two color staining of LAT and pLAT/01 FC1 negative control/tirf4ch_144pos_1/1-Pos_000_003/img_000000000_561multi_000.tif
/Volumes/MacintoshHD/Google Drive/Groves/Scope 7/20150121 T cells fixed on PLL-PEG two color staining of LAT and pLAT/01 FC1 negative control/tirf4ch_144pos_1/1-Pos_000_004/img_000000000_561multi_000.tif
/Vol
@hirokai
hirokai / 20150121 FC1 ROIs.txt
Last active August 29, 2015 14:13
20150121 FC1 ROIs
Area_um Mean Stdev Mode Min Max XM_um YM_um BX BY Width Height BX_um BY_um Width_um Height_um Slice Frame name don't use Mean-Mode
1 4128.06 857.12 55.6 854 594 1119 87.64 122.01 215 350 250 250 55.26 89.95 64.25 64.25 2 1-Pos_000_001
2 4128.06 970.18 70.68 957 751 1293 178.73 202.11 567 661 250 250 145.72 169.88 64.25 64.25 2 1-Pos_000_001
3 4128.06 893.37 61.95 894 635 1389 136.22 149.6 404 458 250 250 103.83 117.71 64.25 64.25 3 1-Pos_000_002
4 4128.06 916.1 61.7 904 676 1294 150.72 228.68 459 765 250 250 117.96 196.61 64.25 64.25 6 1-Pos_000_005
5 4128.06 915.16 66.52 892 563 1268 162.86 151.37 507 463 250 250 130.3 118.99 64.25 64.25 7 1-Pos_000_006
6 4128.06 865.06 52.89 852 622 1277 178.91 38.13 571 23 250 250 146.75 5.91 64.25 64.25 7 1-Pos_000_006
7 4128.06 834.14 54.18 841 482 1176 51.71 109.69 76 302 250 250 19.53 77.61 64.25 64.25 7 1-Pos_000_006
8 4128.06 872.76 65.11 865 428 1613 130.63 102.43 383 273 250 250 98.43 70.16 64.25 64.25 8 1-Pos_000_007
9 4128.06 893.05 65.73 892 558
@hirokai
hirokai / 20150103 FC1 488 nm image list.txt
Created January 19, 2015 06:14
20150103 FC1 488 nm image list
/Volumes/Hiro Groves Lab/20150103 T cells fixed on PLL-PEG pattern/02 FC2/01 tirf_4ch_144pos_1/1-Pos_000_000/img_000000000_488multi_000.tif
/Volumes/Hiro Groves Lab/20150103 T cells fixed on PLL-PEG pattern/02 FC2/01 tirf_4ch_144pos_1/1-Pos_001_000/img_000000000_488multi_000.tif
/Volumes/Hiro Groves Lab/20150103 T cells fixed on PLL-PEG pattern/02 FC2/01 tirf_4ch_144pos_1/1-Pos_002_000/img_000000000_488multi_000.tif
/Volumes/Hiro Groves Lab/20150103 T cells fixed on PLL-PEG pattern/02 FC2/01 tirf_4ch_144pos_1/1-Pos_003_000/img_000000000_488multi_000.tif
/Volumes/Hiro Groves Lab/20150103 T cells fixed on PLL-PEG pattern/02 FC2/01 tirf_4ch_144pos_1/1-Pos_004_000/img_000000000_488multi_000.tif
/Volumes/Hiro Groves Lab/20150103 T cells fixed on PLL-PEG pattern/02 FC2/01 tirf_4ch_144pos_1/1-Pos_005_000/img_000000000_488multi_000.tif
/Volumes/Hiro Groves Lab/20150103 T cells fixed on PLL-PEG pattern/02 FC2/01 tirf_4ch_144pos_1/1-Pos_006_000/img_000000000_488multi_000.tif
/Volumes/Hiro Groves Lab/20150103 T cells fi
@hirokai
hirokai / 0_reuse_code.js
Last active August 29, 2015 14:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console