Difference between revisions of "Software2"

From Wiki
Jump to navigation Jump to search
Line 1,002: Line 1,002:
 
  /home/lml/krypton/bin/em -h  
 
  /home/lml/krypton/bin/em -h  
  
== Statistics ==
+
===  makebeads2 ===
===  cluster_distances.pl ===
+
/home/lml/krypton/bin/makebeads2
  
  Takes output from channel_current2 (after 11/24/09) and pulls out statistics about
+
randomly distributes beads within a volume.  created to let Jack simulate
  mean distance to each BK clusterThen produces average stats from all the files
+
distribution of glut4 labels vesicles in the TIRF field of a microscope.
  analyzed. Output to stdout.
+
A bead has a constant value between its inner and outer diameters. This value
 +
falls to zero 3 standard deviations inside the inner diameter and 3 sd outside
 +
the outer diameter. Beads are not allowed to intersect each other.
 +
Writes info about beads created or moved to stdout (can be read back in with -b option).
 +
note: coords written out are zero indexed (not 1-indexed like addlines and play) in pixels.
 +
usage:
 +
makebeads2 [options] outimage.i2i
 +
options:
 +
-d x y z: image dimensions in pixels, default = (256,256,64)
 +
-D # #: bead inner and outer diameters in microns, default = 0.200000 and 0.200000
 +
  -R #: inner rise standard deviation (in microns), default = 0.012500
 +
-F #: outer fall standard deviation (in microns), default = 0.012500
 +
-S x y z: x, y, and z pixel dimensions (in microns), default = (0.040000,0.040000,0.010000)
 +
  -c x y z: x, y, and z pixel dimensions for new image size.  If you are planning on taking the
 +
image produced by makebeads2 and using chres to change pixel size, put the new
 +
pixel sizes here. This is used when calculating the intensity of the brightest pixel
 +
from each bead. This output info can be useful for signal to noise ratio tests.
 +
  -X #: number of subpixels per pixels, default = 10
 +
-p # val: set z plane # (0 indexed) to val (modelling diffuse fluorescence on the plasma membrane)
 +
If val is < 1 it is interpreted as a fraction of total light in the image.
 +
For example: val = .2 means set the z plane to the intensity necessary so that the total
 +
light in that plane is 2012f the total in the final image (i.e., after exponential if -e or -E)
 +
  -e dist: apply an exponential scale factor exp(-z/dist) to each zslice; like a TIRF excitation intensity
 +
dist is the 1/e distance in microns (.1 is a good value)
 +
This exponential also get applied to z plane value set via "-p # val" if val >= 1. It does
 +
NOT apply to that if val < 1.
 +
-E amp2 dist2:apply a second an exponential scale factor amp2*exp(-z/dist2) to each zslice
 +
must also use -e option.  Each intensity will be scaled by (amp1*exp(-z/dist)+amp2*exp(-z/dist2)).
 +
amp1 + amp2 = 1 and is automatically set when -E is used (amp1 = 1-amp2).
  
 +
options related to output:
 +
-i #: outimage.i2i should be scaled by # before writing it.  Format is short int (our default format).
 +
-f #: outimage.i2i should be scaled by # before writing it.  Format is float.
 +
-v: verbose.
 +
-A: don't create outimage.i2i (still need a dummy name on command line though).
 +
-B: don't even simulate voxels (just prints beads centers, amplitudes, sizes).  Automatically sets -A.
 +
-u file.objs: create file, which has a list of bead objects created, in the same format countobjs produces.
 +
this lets utilities written to analyze files in that format to then be used
 +
(e.g., objs2dist.pl, objs2bb.pl). COM field is the bead center even if part of it is outside
 +
the image. Size field is in pixels (only counting what is within the image).
 +
IOD is the total bead light in the image after exponential weighting (if -e or -E) and scaling (-i, -f).
 +
AVG = IOD/size.  MAX is the max pixel (after -e,-E,-i,-f) . Some file header info may be wrong.
 +
-U file.objs: like -u, but all z coords are replaced by 1, and coordinates are for the new resolution specified
 +
by -c option. MAX value and max coord come from a sum projection in z at the new resolution.
 +
(after -e,-E,-i,-f).
 +
-W: print some warning messages to stderr if appropriate.  note: This will mess up the output in the file
 +
if you are running it as:  makebeads2 -W .... >& file.out
  
  usage:
+
options controlling randomization (of a uniform random distribution unless otherwise noted):
 +
-s min max: mininum and maximum range of allowed bead sizes. This number scales the
 +
bead inner and outer diameters (does not change sd). default = 1.000000 and 1.000000
 +
-G mean sd:  make bead sizes (scales) a Gaussian variable with specified mean and sd (instead of -s).
 +
note: since beads can't intersect, if you place beads densely you will tend to get more
 +
small beads (since the program generates a new random bead if one doesn't fit), and hence
 +
the size distribution will no longer match the parameters specified here.
 +
-g mean sd shell: like -G, but also specify bead shell thickness in microns.  mean doesn't scale the shell thickness.
 +
mean is the diameter to midway between the inner and outer diameters (so don't use -D option).
 +
-a min max: min and max amplitude (brightness) of bead, default = 1000.000000 and 1000.000000
 +
a pixel which is entirely covered by the shell of the bead (between -D numbers) will have this value.
 +
So this is like specifying a fluorescent concentration.
 +
-P lambda scale:  make amplitude a Poisson variable with the specified mean (lambda) value (instead of -a option).
 +
this value then gets multiplied by scale.  Amplitudes of 0 get ignored (a new amplitude is calculated).
 +
note: this is still just the amplitude of a covered pixel, not of the entire bead unless -T used too.
 +
-T: The amplitude specified with -a or -P option is the total light in the bead, not the light
 +
of one fully covered pixel.  Takes about double the time to run.
 +
note: if the amplitude isn't large compared to number of pixels in the bead's shell, then
 +
individual pixel intensities will be small and truncation may effect total intensity.
 +
-x min max:  allowed position of beads, in pixels, zero indexed, inclusive. The entire bead must fit in this region
 +
unless -o option also specified.
 +
-y min max:  allowed position of beads, in pixels, zero indexed (default = anywhere within image)
 +
-z min max:  allowed position of beads, in pixels, zero indexed (default = anywhere within image)
 +
-o: allow bead centers to fall outside the image volume (except in low z direction, i.e. coverslip).
 +
This is a more accurate way to represent a small view of a large cell.
 +
This option is ignored if -b option used.
 +
-O: like -o, but beads in low z direction outside the volume reflect back inside the volume (i.e. get
 +
moved back inside volume instead of thrown away).
 +
note: if bead density is too high, reflecting a bead inside may cause it to intersect with a previous
 +
bead, in which case the reflecting bead will be thrown away and a new randomly placed bead created.
 +
-w #: use # as the seed for random number generator, so can reproduce exact runs. must be negative.
 +
-b file xyspeed zspeed:  read initial bead params (e.g., size, position) from file, just add random position to this.
 +
the random position uses the speeds (in microns) as the max the vesicle can move in each direction
 +
in this time period (i.e., dx = ran(0 to 1)*xyspeed, etc).
 +
Set xyspeed and zspeed = 0 if you don't want to move the beads.
 +
  -j #: long int starting seed for random number generator. specify the same number (not 0) each time you run this
 +
program if you want to exactly repeat the random numbers generated. The default is to use a different
 +
starting seed each time based upon the process id when you run the program.
 +
  -n #: number of beads to make, default = 100, max = 10000
  
  -files:file1:file2:...:filen       which files to analyze. Defaults are files named 2_*.currents in cwd.
+
Examples:
  -numBKvsProb       also prints numBK vs prob data suitable for xmgrace
+
#create 200 beads, with a 50 nm (5 z plane) gap before the pm, which has an
 +
#intensity of 50. Apply a TIRF exponential excitation scale to it.
 +
makebeads2 -e .1 -z 5 63 -p 5 50 -n 200 beads1.i2i > beads1.info
 +
# apply microscope psf
 +
blur3d -P -N 256 256 128 beads1.i2i empiricalpsf_seg_40nm_seg.i2i beads1_blur3d.i2i
 +
# bin (averge) to 100/160 nm resolution
 +
reduceima -A -X 1 256 4 -Y 1 256 4 beads1_blur3d.i2i beads1_blur3d4x4.i2i
 +
# extract infocus plane
 +
segment -Z 16 16 1 beads1_blur3d4x4.i2i beads1_blur2d4x4.i2i
 +
# add ScratchNG camera noise
 +
noise -e 1.4 -n 8 beads1_blur2d4x4.i2i beads1_blur2d4x4N.i2i
 +
histima -size 10 -bins 100 beads1_blur2d4x4N.i2i > beads1_blur2d4x4N.hist
  
 +
#creates beads, move them, look at the results
 +
makebeads2 -z 5 63 beads1.i2i > beads1.info
 +
#read those beads in and move them. but still must stay outside the first 50 nm.
 +
makebeads2 -z 5 63 -b beads1.info .05 .05 beads2.i2i > beads2.info
 +
concateima beads1.i2i beads2.i2i beads.i2i
 +
imsets beads.i2i 2
 +
dave -tdim 2 -4 -I beads.i2i
  
example:
+
#just create scripts (very fast) with positions of beads, and move them around.
  (channel_current2  .... > file.channel_current) >& file1.currents
+
makebeads -z 5 63 -n 200 -A dummy.i2i > beads1.info
  (channel_current2  .... > file2.channel_current) >& file2.currents
+
makebeads -b beads1.info .05 .05 -z 5 63 -A dummy.i2i > beads2.info
  cluster_distances.pl -numBKvsProb -files=file1.currents:file2.currents > avg_distances.txt
+
makebeads -b beads2.info .05 .05 -z 5 63 -A dummy.i2i > beads3.info
  fgrep -v clusters avg_distances.txt |xmgrace -pipe
+
#now create the images
 +
makebeads -b beads1.info 0 0  beads1.i2i > beads1.info2
 +
makebeads -b beads2.info 0 0  beads2.i2i > beads2.info2
 +
makebeads -b beads3.info 0 0  beads3.i2i > beads3.info2
  
  note: mean distances to clusters are not always increasing (e.g., mean distance to 10th
+
see also: makebead, readbeads.pl, blur3d, project, /storage/big1/sh/simul
      cluster could be SMALLER than the mean distance to the 9th cluster).  I think this
 
      has to do with limiting my maximum distance (see comments in this file).
 
  
 +
source code in ~lml/krypton/facil
 
   
 
   
  see also:
+
=== oxygen  ===
  channel_current2
+
Calculates steady state partial oxygen pressure (P) as a function of distance from a blood vessel (r).
  /home/lml/krypton/Zhuge/BKandRyr/analysis6/run12
+
The blood vessel has a radius of R1 (5.0 um) and Oxygen at the vessel is Ps (52.0 mm Hg).
  /home/lml/krypton/Huang/Kth_pt.m
+
The default is to print partial Oxygen pressure (mm Hg) as a function of distance (um) as columns to stdout.
  p. 637 of Cressie.  
+
All models set P at R1 (and r<R1) to Ps. All models clamp P at R1 to be Ps for all time (vessels stay oxygenated).
 +
 
 +
The line source model (-m 1) implements equation 17 from KroghOxygenDiffusionModel1.pdf
 +
  Modeling pO2 Distributions in the Bone Marrow Hematopoietic Compartment.
 +
  I. Krogh's Model  by D.C.Chow, L. A. Wenning, W. M. Miller, and E.T. Papoutsakis
 +
  Biophysical Journal, vol. 81, August 2001, pp. 675-684.
 +
This models O2 assuming a constant oxygen consumption by the tissue and constant O2 (Ps) at the blood vessel.
 +
They claim results don't change by more than a few percent using proportional (or other) O2 consumption models.
 +
The value of dP/dr at R2 is forced to 0.
 +
note: this is an implmentation of O2 from a line source (e.g., blood vessel), not a point source.
 +
So it is not appropriate to convolve (in 3D) this with a 3D image of blood vessels.
 +
But -p (or -m 2) will produce a point source image.
 +
 
 +
The point source model (-m 2) implements equation 14 from HeatConduction.pdf
 +
  Steady Heat Conduction in Layered Mediums: The Half-Space and Sphere, by Henry N. Pollack
 +
  J. of Geophysical Research, vol. 70(22), Nov. 15, 1965, pp. 5645-5648
 +
This models O2 assuming a constant oxygen consumption by the tissue and constant O2 (Ps) at the blood vessel.
 +
note: The value of dP/dr at R2 is forced to 0 unless -b # is specified.
 +
note: Since O2 consumption is constant, it might not make sense to use this in a convolution, since it isn't
 +
      linear.
  
+
Model 3 is a point source model, but O2 consumption by the tissue is proportional to the O2 level in the tissue.
===  coloc.pl  ===
+
  I derived it from Crank's equations 6.60 (infinite hollow sphere model) and 14.13 (see below).
 +
  It requires the specification of an initial O2 level in the tissue (P0, which is the same everywhere).
 +
  R2 is used only to determine how far out to plot the graph (and dP/dr at R2 is not used either).
 +
  See my paper notes or ~/krypton/Corvera/Olga/SteadyStatePointDiffusion.pdf
 +
  Not only is proportional O2 consumption more biological, but I think this should be linear and therefore
 +
  it makes more sense to use in a convolution with a (binarized?) blood vessel image.
  
calls coloc3way with a bunch of different thresholds. Creates an output file which can be
+
note: because R2 really should vary in an image, depending upon the distance between nearby blood vessels
graphed with VennDiagram.m.
+
        and because Ps is not just a scale factor (so, eg, brighter blood vessels in an image, if brightness is
 +
        proportional to Ps, do NOT just cause a scale factor in the P(r) values), it may NOT be appropriate
 +
to take the image produced by this program and convolve it with an image of blood vessels to get
 +
estimates of oxygenation of tissue. This comment may apply to all three models (definitely to -m 1)
  
coloc.pl im1.i2i im2.i2i im3.i2i  > out.coloc3way
+
Usage: oxygen -m # [options] 
 +
    required:
 +
  -m # which model to use.  
 +
        -m 1 :line source model with constant O2 consumption
 +
-m 2: point source model with constant O2 consumption.
 +
        -m 3 :point source model with O2 consumption proportional to O2 concentration.
 +
Use point source models if planning on convolving resulting image with a blood vessel image.
  
options:
+
    options for all models:
-time_vs_thresh just generate a file which shows which times correspond to which thresholds. images can be dummy names.
+
Although these options can be used in all models, different models have different sensitivities to them.
 +
  -R1 # vessel radius (um). Changes to this can change P a lot (if -m 1), and may require R2 to change (see -c).
 +
default = 5.00
 +
  -R2 # max distance any tissue is from a vessel (um). This changes the solution a lot for some models
 +
but for the -m 3 model it only affects how far out data is graphed, default = 2268.00
 +
More precisely, for -m 1 and -m 2 it is the distance at which dP/dr = 0 (ie, a b.c. on the pde).
 +
  -Ps # partial pressure of Oxygen at the blood vessel (mm Hg). Default = 52.00
 +
40 is typical of veins, 95 of arteries. This is held constant over time in all the models right now.
 +
For -m 1, this will affect the O2 value at R1, but how P changes RELATIVE to P(at R1) (as r increases)
 +
will not be affected (ie, it does NOT just scale everything).
 +
    model 1 options:
 +
  -c use with -R1 to automatically calculate R2 based on the specified R1 (since R2 affects the solution).
 +
(this also sets -m 1 as a convenience)
 +
    model 2 options:
 +
  -b # changes the 2nd boundary condition to be P at R2 = # mm Hg
 +
instead of dP/dr = 0 at R2 (this also sets -m 2 as a convenience)
 +
    model 3 options:
 +
  -P0 # the initial oxygenation level of the tissue (mm Hg). Default = 0.000000
 +
This will change the solution a lot, since it is also the level that O2, in steady state, approaches as r->infinity.
 +
Therefore, nonzero P0 may also make convolution with a blood vessel image inappropriate.
 +
-P0 0 seems to produce the same results as -r. (-P0 also sets -m 3 as a convenience)
  
-t1=#:#:# threshold one should go from # to # by #. default = 800:1200:50
+
    output graph options:
-t2=#:#:# threshold two should go from # to # by #. default = 800:1200:50
+
  -n normalize output (doesn't affect -i image.i2i), ie, print r/R1  vs P/Ps  rather than r vs. P
-t3=#:#:# threshold three should go from # to # by #. default = 2000:4000:200
+
  -r add a third reference column which is the "simple" diffusion solution (goes as 1/r)
-numthresh=#1:#2:#3  ignore the third number in the -t1, -t2, and -t3 options (or in the default) and instead calculate a
+
This is for a point source in 3D (not a line source), and ignores O2 consumption.
  threshold step size so that #1 thresholds are applied to im1.i2i (dat image)
+
graph as: oxygen_krogh -r | xmgr -nxy stdin
  #2 thresholds are applied to im2.i2i (ctx image), #3 thresholds are applied to im3.i2i (rin image).
+
 
  e.g., -numthresh=5:10:10 will apply 5 different thresholds to im1.i2i, and 10 thresholds to im2.i2i and im3.i2i.
+
    output image options:
  Using this option lets me insure that each call to coloc.pl will produce exactly the same number of data points;
+
  -i image.i2i xdim ydim zdim: create an image of the values, to use with blur3d to find
  this may make the statistical comparison between cells easier.
+
O2 everywhere in an image as a function of distance from blood vessels.
 +
If you are planning on convolving you should probably specify -m 3 .
 +
  -d x y z if -i is specified. pixel dimensions in um. default = 0.60 0.60 10.00
 +
  -s # if -i is specified. scale output intensities by #. Otherwise max is 52.0 mm Hg
 +
  -o xorig yorig zorig: location of the blood vessel in the image (zero indexed, floating point)
 +
blur3d may care about this, depending upon options. default = (0.00,0.00,0.00)
 +
(maybe I should change this to define a line in the image when -m 1 is specified?)
 +
-p the output image should be for the simple 1/r point source (see -r explanation) rather
 +
for the line source (-m 1) or point source with O2 consumption (-m 2 or -m 3).
  
-Melikian=file in addition to creating output for VennDiagram, create text file with the coloc percentages
+
    other options:
Dr. Melikian is interested in. Graph via xmgr -nxy. See header in file for coloc info.
+
  -v verbose. stuff to stderr.
For this to work the three image files MUST be specified in the order 405  594  488 (i.e., rin.i2i ctx.i2i dat.i2i)
+
  -V more verbose. stuff to stderr. debugging info.
-Melikian2=file Same as -Melikian, but dat (488) is image 1, ctx (594) image 2, and rin (405) image 3
+
  -h print this help
-area=file.xyr also print out Melikian data as xyr where r is proportional to the number of pixels involved
 
(i.e., the denominator used when calculating the percent colocalized).
 
prints to "file.xyr".  Must also specify either -Melikian or -Melikian2
 
xmgrace -graphtype fixed -settype xyr file.xyr
 
-matlab=file:#  like -area but as columns so easy to read into matlab: t p1 n1 p2 n2 p3 n3 p4 n4
 
# is the max n value (ie, all n values are scaled so the max over n1,n2,n3,n4 is #).
 
Since p1,p2,p3,p4 are percent, # is typically set to a small part of that, e.g. .05.
 
If # is negative then abs(#) is just used as a scale factor (so -1 would just keep the
 
n values as the number of voxels). Graph in matlab with line width of 2*n1:
 
matlab  # import data=(tdim,9)
 
>> lowy = data(:,2) - data(:,3); hiy = data(:,2) + data(:,3);  x = data(:,1);
 
>> area(x,hiy,'FaceColor',[1 0 0],'EdgeColor','r','LineWidth',1); hold on;
 
>> area(x,lowy,'FaceColor',[1 1 1],'EdgeColor','r','LineWidth',1);
 
Must also specify -Melikian or -Melikian2.
 
  
-debug
+
Examples:
-verbose
+
      # create a binary image of blood vessels (maybe use BestPath3D_ellipse instead? Maybe thin3D afterwards?):
 +
    mask_image -m 2700 -r 1 G03_x_1_2_r4.i2i G03_x_1_2_r4.i2i G03_x_1_2_r4_binaryvessels.i2i
 +
      # create a psf of blood oxygenation:
 +
    oxygen -s 500 -i O2ptsource.i2i 50 50 21 -d 2.58 2.58 10 -o 25 25 10 -m 3 -r > O2ptsource.xy
 +
    blur3d -S .002 -Z -d -v G03_x_1_2_r4_binaryvessels.i2i O2ptsource.i2i G03_x_1_2_r4_O2.i2i
  
example:
+
see also: /home/lml/krypton/Corvera/Olga/README, SteadyStatePointDiffusion.pdf (my notes)
 +
        Random Walks in Biology (New, expanded edition) by Berg p. 23 eq. 2.11;
 +
The Mathematics of Diffusion (2nd Ed) by Crank p. 32 eq  3.5b; p. 89 eq 6.5; p. 102 eq 6.60; p. 330 eq 14.13
 +
source code in:  /home/lml/krypton/facil
 +
error: A model must be specified, i.e., -m # must be specified.
  
coloc.pl im1.i2i im2.i2i im3.i2i > coloc.data
 
coloc.pl -time_vs_thresh im1.i2i im2.i2i im3.i2i > coloc.times
 
matlab
 
>> VennDiagram('coloc.data','percent')  # and manually look at coloc.times while doing this to convert times to thresholds.
 
  
see also:
+
===  sparkspread  ===
~/krypton/packages/fiji/Fiji.app/plugins/jacob_.jar  - more traditional colocalization measures
+
 
coloc_tseries2
+
Calculates the spread of spark event amplitudes given that two events occur at the same
colocalizeL
+
spark site and compares it to the spread of amplitudes given that two events occur at
 +
different spark sites. A spark site has a unique (x,y) position.
 +
Prints mean and stddev to stdout. Also prints out histograms and cumulative distributions.
 +
 
 +
A valid datafile has either blank lines, comments (start with #) or a data line (spark event).
 +
A data line has 8 or 11 fields. 11 if a stoc is associated with the spark event
 +
A valid stoc (last 3 fields) must have a nonzero stoc amplitude (1st of 3 fields)
 +
See /usr/people/lml/vision/Rhonghua/Sparks/singlesitev2 for a valid file format.
  
 +
Usage: sparkspread [options] datafile
 +
options:
 +
  -h: do NOT print histogram for intraspark data.
 +
  -H: do NOT print histogram for interspark data.
 +
  -c: do NOT print cumulative distribution for intraspark data.
 +
  -C: do NOT print cumulative distribution for interspark data.
 +
  -b #: number of bins for histogram, default = 20
 +
  -n: normalize the histograms so their maximum is 1
 +
  -k: also print ks statistic showing if two distributions are different.
 +
 +
===  spot_diffusion  ===
 +
#/home/lml/krypton/bin/spot_diffusion
 +
0.001  15918.5
 +
0.002  16550.4
 +
0.003  16831.4
 +
0.004  16999.1
 +
0.005  17113.6
 +
0.006  17198.2
 +
0.007  17264
 +
0.008  17317
 +
0.009  17360.9
 +
0.01  17398.1
 +
0.011  17430.1
 +
0.012  17458
 +
0.013  17482.6
 +
0.014  17504.5
 +
0.015  17524.2
 +
0.016  17542.1
 +
0.017  17558.3
 +
0.018  17573.1
 +
0.019  17586.8
 +
0.02  17599.4
 +
0.021  17611.2
 +
0.022  17622.1
 +
0.023  17632.3
 +
0.024  17641.8
 +
0.025  17650.8
 +
0.026  17659.2
 +
0.027  17667.2
 +
0.028  17674.7
 +
0.029  17681.9
 +
0.03  17688.7
 +
0.031  17695.1
 +
0.032  17701.3
 +
0.033  17707.1
 +
0.034  17712.7
 +
0.035  17718.1
 +
0.036  17723.3
 +
0.037  17728.2
 +
0.038  17732.9
 +
0.039  17737.5
 +
0.04  17741.9
 +
0.041  17746.1
 +
0.042  17750.1
 +
0.043  17754.1
 +
0.044  17757.9
 +
0.045  17761.5
 +
0.046  17765.1
 +
0.047  17768.5
 +
0.048  17771.8
 +
0.049  17775
 +
0.05  17778.2
 +
0.051  17781.2
 +
0.052  17784.1
 +
0.053  17787
 +
0.054  17789.8
 +
0.055  17792.5
 +
0.056  17795.1
 +
0.057  17797.7
 +
0.058  17800.2
 +
0.059  17802.6
 +
0.06  17805
 +
0.061  17807.3
 +
0.062  17809.5
 +
0.0629999  17811.7
 +
0.064  17813.9
 +
0.065  17816
 +
0.066  17818
 +
0.067  17820
 +
0.068  17822
 +
0.069  17823.9
 +
0.07  17825.8
 +
0.071  17827.6
 +
0.072  17829.4
 +
0.073  17831.2
 +
0.074  17832.9
 +
0.075  17834.6
 +
0.076  17836.3
 +
0.077  17837.9
 +
0.078  17839.5
 +
0.079  17841
 +
0.08  17842.6
 +
0.081  17844.1
 +
0.082  17845.6
 +
0.083  17847
 +
0.084  17848.4
 +
0.085  17849.8
 +
0.086  17851.2
 +
0.087  17852.6
 +
0.088  17853.9
 +
0.089  17855.2
 +
0.09  17856.5
 +
0.091  17857.8
 +
0.092  17859
 +
0.093  17860.2
 +
0.094  17861.4
 +
0.095  17862.6
 +
0.096  17863.8
 +
0.097  17864.9
 +
0.098  17866
 +
0.099  17867.2
 +
0.1  17868.3
 +
0.101  17869.3
 +
0.102  17870.4
 +
0.103  17871.4
 +
0.104  17872.5
 +
0.105  17873.5
 +
0.106  17874.5
 +
0.107  17875.5
 +
0.108  17876.5
 +
0.109  17877.4
 +
0.11  17878.4
 +
0.111  17879.3
 +
0.112  17880.2
 +
0.113  17881.1
 +
0.114  17882
 +
0.115  17882.9
 +
0.116  17883.8
 +
0.117  17884.7
 +
0.118  17885.5
 +
0.119  17886.4
 +
0.12  17887.2
 +
0.121  17888
 +
0.122  17888.8
 +
0.123  17889.6
 +
0.124  17890.4
 +
0.125  17891.2
 +
0.126  17892
 +
0.127  17892.8
 +
0.128  17893.5
 +
0.129  17894.3
 +
0.13  17895
 +
0.131  17895.7
 +
0.132  17896.4
 +
0.133  17897.2
 +
0.134  17897.9
 +
0.135  17898.6
 +
0.136  17899.3
 +
0.137  17899.9
 +
0.138  17900.6
 +
0.139  17901.3
 +
0.14  17901.9
 +
0.141  17902.6
 +
0.142  17903.2
 +
0.143  17903.9
 +
0.144  17904.5
 +
0.145  17905.1
 +
0.146  17905.8
 +
0.147  17906.4
 +
0.148  17907
 +
0.149  17907.6
 +
0.15  17908.2
 +
0.151  17908.8
 +
0.152  17909.3
 +
0.153  17909.9
 +
0.154  17910.5
 +
0.155  17911.1
 +
0.156  17911.6
 +
0.157  17912.2
 +
0.158  17912.7
 +
0.159  17913.3
 +
0.16  17913.8
 +
0.161  17914.3
 +
0.162  17914.9
 +
0.163  17915.4
 +
0.164  17915.9
 +
0.165  17916.4
 +
0.166  17916.9
 +
0.167  17917.5
 +
0.168  17918
 +
0.169  17918.5
 +
0.17  17918.9
 +
0.171  17919.4
 +
0.172  17919.9
 +
0.173  17920.4
 +
0.174  17920.9
 +
0.175  17921.3
 +
0.176  17921.8
 +
0.177  17922.3
 +
0.178  17922.7
 +
0.179  17923.2
 +
0.18  17923.6
 +
0.181  17924.1
 +
0.182  17924.5
 +
0.183  17925
 +
0.184  17925.4
 +
0.185  17925.9
 +
0.186  17926.3
 +
0.187  17926.7
 +
0.188  17927.1
 +
0.189  17927.6
 +
0.19  17928
 +
0.191  17928.4
 +
0.192  17928.8
 +
0.193  17929.2
 +
0.194  17929.6
 +
0.195  17930
 +
0.196  17930.4
 +
0.197  17930.8
 +
0.198  17931.2
 +
0.199  17931.6
 +
0.2  17932
 +
0.201  17932.3
 +
0.202  17932.7
 +
0.203  17933.1
 +
0.204  17933.5
 +
0.205  17933.9
 +
0.206  17934.2
 +
0.207  17934.6
 +
0.208  17935
 +
0.209  17935.3
 +
0.21  17935.7
 +
0.211  17936
 +
0.212  17936.4
 +
0.213  17936.7
 +
0.214  17937.1
 +
0.215  17937.4
 +
0.216  17937.8
 +
0.217  17938.1
 +
0.218  17938.5
 +
0.219  17938.8
 +
0.22  17939.1
 +
0.221  17939.5
 +
0.222  17939.8
 +
0.223  17940.1
 +
0.224  17940.4
 +
0.225  17940.8
 +
0.226  17941.1
 +
0.227  17941.4
 +
0.228  17941.7
 +
0.229  17942
 +
0.23  17942.3
 +
0.231  17942.7
 +
0.232  17943
 +
0.233  17943.3
 +
0.234  17943.6
 +
0.235  17943.9
 +
0.236  17944.2
 +
0.237  17944.5
 +
0.238  17944.8
 +
0.239  17945.1
 +
0.24  17945.4
 +
0.241  17945.7
 +
0.242  17945.9
 +
0.243  17946.2
 +
0.244  17946.5
 +
0.245  17946.8
 +
0.246  17947.1
 +
0.247  17947.4
 +
0.248  17947.7
 +
0.249  17947.9
 +
0.25  17948.2
 +
0.251  17948.5
 +
0.252  17948.8
 +
0.253  17949
 +
0.254  17949.3
 +
0.255  17949.6
 +
0.256  17949.8
 +
0.257  17950.1
 +
0.258  17950.4
 +
0.259  17950.6
 +
0.26  17950.9
 +
0.261  17951.1
 +
0.262  17951.4
 +
0.263  17951.6
 +
0.264  17951.9
 +
0.265  17952.2
 +
0.266  17952.4
 +
0.267  17952.7
 +
0.268  17952.9
 +
0.269  17953.2
 +
0.27  17953.4
 +
0.271  17953.6
 +
0.272  17953.9
 +
0.273  17954.1
 +
0.274  17954.4
 +
0.275  17954.6
 +
0.276  17954.8
 +
0.277  17955.1
 +
0.278  17955.3
 +
0.279  17955.6
 +
0.28  17955.8
 +
0.281  17956
 +
0.282  17956.2
 +
0.283  17956.5
 +
0.284  17956.7
 +
0.285  17956.9
 +
0.286  17957.2
 +
0.287  17957.4
 +
0.288  17957.6
 +
0.289  17957.8
 +
0.29  17958
 +
0.291  17958.3
 +
0.292  17958.5
 +
0.293  17958.7
 +
0.294  17958.9
 +
0.295  17959.1
 +
0.296  17959.3
 +
0.297  17959.6
 +
0.298  17959.8
 +
0.299  17960
 +
0.3  17960.2
 +
0.301  17960.4
 +
0.302  17960.6
 +
0.303  17960.8
 +
0.304  17961
 +
0.305  17961.2
 +
0.306  17961.4
 +
0.307  17961.6
 +
0.308  17961.8
 +
0.309  17962
 +
0.31  17962.2
 +
0.311  17962.4
 +
0.312  17962.6
 +
0.313  17962.8
 +
0.314  17963
 +
0.314999  17963.2
 +
0.315999  17963.4
 +
0.316999  17963.6
 +
0.317999  17963.8
 +
0.318999  17964
 +
0.319999  17964.2
 +
0.320999  17964.4
 +
0.321999  17964.6
 +
0.322999  17964.7
 +
0.323999  17964.9
 +
0.324999  17965.1
 +
0.325999  17965.3
 +
0.326999  17965.5
 +
0.327999  17965.7
 +
0.328999  17965.9
 +
0.329999  17966
 +
0.330999  17966.2
 +
0.331999  17966.4
 +
0.332999  17966.6
 +
0.333999  17966.8
 +
0.334999  17966.9
 +
0.335999  17967.1
 +
0.336999  17967.3
 +
0.337999  17967.5
 +
0.338999  17967.6
 +
0.339999  17967.8
 +
0.340999  17968
 +
0.341999  17968.2
 +
0.342999  17968.3
 +
0.343999  17968.5
 +
0.344999  17968.7
 +
0.345999  17968.8
 +
0.346999  17969
 +
0.347999  17969.2
 +
0.348999  17969.3
 +
0.349999  17969.5
 +
0.350999  17969.7
 +
0.351999  17969.8
 +
0.352999  17970
 +
0.353999  17970.2
 +
0.354999  17970.3
 +
0.355999  17970.5
 +
0.356999  17970.7
 +
0.357999  17970.8
 +
0.358999  17971
 +
0.359999  17971.1
 +
0.360999  17971.3
 +
0.361999  17971.5
 +
0.362999  17971.6
 +
0.363999  17971.8
 +
0.364999  17971.9
 +
0.365999  17972.1
 +
0.366999  17972.2
 +
0.367999  17972.4
 +
0.368999  17972.5
 +
0.369999  17972.7
 +
0.370999  17972.8
 +
0.371999  17973
 +
0.372999  17973.2
 +
0.373999  17973.3
 +
0.374999  17973.5
 +
0.375999  17973.6
 +
0.376999  17973.8
 +
0.377999  17973.9
 +
0.378999  17974
 +
0.379999  17974.2
 +
0.380999  17974.3
 +
0.381999  17974.5
 +
0.382999  17974.6
 +
0.383999  17974.8
 +
0.384999  17974.9
 +
0.385999  17975.1
 +
0.386999  17975.2
 +
0.387999  17975.3
 +
0.388999  17975.5
 +
0.389999  17975.6
 +
0.390999  17975.8
 +
0.391998  17975.9
 +
0.392998  17976.1
 +
0.393998  17976.2
 +
0.394998  17976.3
 +
0.395998  17976.5
 +
0.396998  17976.6
 +
0.397998  17976.7
 +
0.398998  17976.9
 +
0.399998  17977
 +
0.400998  17977.2
 +
0.401998  17977.3
 +
0.402998  17977.4
 +
0.403998  17977.6
 +
0.404998  17977.7
 +
0.405998  17977.8
 +
0.406998  17978
 +
0.407998  17978.1
 +
0.408998  17978.2
 +
0.409998  17978.4
 +
0.410998  17978.5
 +
0.411998  17978.6
 +
0.412998  17978.7
 +
0.413998  17978.9
 +
0.414998  17979
 +
0.415998  17979.1
 +
0.416998  17979.3
 +
0.417998  17979.4
 +
0.418998  17979.5
 +
0.419998  17979.6
 +
0.420998  17979.8
 +
0.421998  17979.9
 +
0.422998  17980
 +
0.423998  17980.1
 +
0.424998  17980.3
 +
0.425998  17980.4
 +
0.426998  17980.5
 +
0.427998  17980.6
 +
0.428998  17980.8
 +
0.429998  17980.9
 +
0.430998  17981
 +
0.431998  17981.1
 +
0.432998  17981.2
 +
0.433998  17981.4
 +
0.434998  17981.5
 +
0.435998  17981.6
 +
0.436998  17981.7
 +
0.437998  17981.8
 +
0.438998  17982
 +
0.439998  17982.1
 +
0.440998  17982.2
 +
0.441998  17982.3
 +
0.442998  17982.4
 +
0.443998  17982.5
 +
0.444998  17982.7
 +
0.445998  17982.8
 +
0.446998  17982.9
 +
0.447998  17983
 +
0.448998  17983.1
 +
0.449998  17983.2
 +
0.450998  17983.4
 +
0.451998  17983.5
 +
0.452998  17983.6
 +
0.453998  17983.7
 +
0.454998  17983.8
 +
0.455998  17983.9
 +
0.456998  17984
 +
0.457998  17984.1
 +
0.458998  17984.2
 +
0.459998  17984.4
 +
0.460998  17984.5
 +
0.461998  17984.6
 +
0.462998  17984.7
 +
0.463998  17984.8
 +
0.464998  17984.9
 +
0.465998  17985
 +
0.466998  17985.1
 +
0.467998  17985.2
 +
0.468998  17985.3
 +
0.469997  17985.4
 +
0.470997  17985.6
 +
0.471997  17985.7
 +
0.472997  17985.8
 +
0.473997  17985.9
 +
0.474997  17986
 +
0.475997  17986.1
 +
0.476997  17986.2
 +
0.477997  17986.3
 +
0.478997  17986.4
 +
0.479997  17986.5
 +
0.480997  17986.6
 +
0.481997  17986.7
 +
0.482997  17986.8
 +
0.483997  17986.9
 +
0.484997  17987
 +
0.485997  17987.1
 +
0.486997  17987.2
 +
0.487997  17987.3
 +
0.488997  17987.4
 +
0.489997  17987.5
 +
0.490997  17987.6
 +
0.491997  17987.7
 +
0.492997  17987.8
 +
0.493997  17987.9
 +
0.494997  17988
 +
0.495997  17988.1
 +
0.496997  17988.2
 +
0.497997  17988.3
 +
0.498997  17988.4
 +
0.499997  17988.5
 +
0.500997  17988.6
 +
0.501997  17988.7
 +
0.502997  17988.8
 +
0.503997  17988.9
 +
0.504997  17989
 +
0.505997  17989.1
 +
0.506997  17989.2
 +
0.507997  17989.3
 +
0.508997  17989.4
 +
0.509997  17989.5
 +
0.510997  17989.6
 +
0.511997  17989.6
 +
0.512997  17989.7
 +
0.513997  17989.8
 +
0.514997  17989.9
 +
0.515997  17990
 +
0.516997  17990.1
 +
0.517997  17990.2
 +
0.518997  17990.3
 +
0.519997  17990.4
 +
0.520997  17990.5
 +
0.521997  17990.6
 +
0.522997  17990.7
 +
0.523997  17990.8
 +
0.524997  17990.8
 +
0.525997  17990.9
 +
0.526997  17991
 +
0.527997  17991.1
 +
0.528997  17991.2
 +
0.529997  17991.3
 +
0.530997  17991.4
 +
0.531997  17991.5
 +
0.532997  17991.6
 +
0.533997  17991.7
 +
0.534997  17991.7
 +
0.535997  17991.8
 +
0.536997  17991.9
 +
0.537997  17992
 +
0.538997  17992.1
 +
0.539997  17992.2
 +
0.540997  17992.3
 +
0.541997  17992.3
 +
0.542997  17992.4
 +
0.543997  17992.5
 +
0.544997  17992.6
 +
0.545997  17992.7
 +
0.546997  17992.8
 +
0.547997  17992.9
 +
0.548997  17992.9
 +
0.549996  17993
 +
0.550996  17993.1
 +
0.551996  17993.2
 +
0.552996  17993.3
 +
0.553996  17993.4
 +
0.554996  17993.4
 +
0.555996  17993.5
 +
0.556996  17993.6
 +
0.557996  17993.7
 +
0.558996  17993.8
 +
0.559996  17993.9
 +
0.560996  17993.9
 +
0.561996  17994
 +
0.562996  17994.1
 +
0.563996  17994.2
 +
0.564996  17994.3
 +
0.565996  17994.3
 +
0.566996  17994.4
 +
0.567996  17994.5
 +
0.568996  17994.6
 +
0.569996  17994.7
 +
0.570996  17994.8
 +
0.571996  17994.8
 +
0.572996  17994.9
 +
0.573996  17995
 +
0.574996  17995.1
 +
0.575996  17995.1
 +
0.576996  17995.2
 +
0.577996  17995.3
 +
0.578996  17995.4
 +
0.579996  17995.5
 +
0.580996  17995.5
 +
0.581996  17995.6
 +
0.582996  17995.7
 +
0.583996  17995.8
 +
0.584996  17995.8
 +
0.585996  17995.9
 +
0.586996  17996
 +
0.587996  17996.1
 +
0.588996  17996.2
 +
0.589996  17996.2
 +
0.590996  17996.3
 +
0.591996  17996.4
 +
0.592996  17996.5
 +
0.593996  17996.5
 +
0.594996  17996.6
 +
0.595996  17996.7
 +
0.596996  17996.8
 +
0.597996  17996.8
 +
0.598996  17996.9
 +
0.599996  17997
 +
0.600996  17997.1
 +
0.601996  17997.1
 +
0.602996  17997.2
 +
0.603996  17997.3
 +
0.604996  17997.3
 +
0.605996  17997.4
 +
0.606996  17997.5
 +
0.607996  17997.6
 +
0.608996  17997.6
 +
0.609996  17997.7
 +
0.610996  17997.8
 +
0.611996  17997.9
 +
0.612996  17997.9
 +
0.613996  17998
 +
0.614996  17998.1
 +
0.615996  17998.1
 +
0.616996  17998.2
 +
0.617996  17998.3
 +
0.618996  17998.4
 +
0.619996  17998.4
 +
0.620996  17998.5
 +
0.621996  17998.6
 +
0.622996  17998.6
 +
0.623996  17998.7
 +
0.624996  17998.8
 +
0.625996  17998.8
 +
0.626996  17998.9
 +
0.627995  17999
 +
0.628995  17999.1
 +
0.629995  17999.1
 +
0.630995  17999.2
 +
0.631995  17999.3
 +
0.632995  17999.3
 +
0.633995  17999.4
 +
0.634995  17999.5
 +
0.635995  17999.5
 +
0.636995  17999.6
 +
0.637995  17999.7
 +
0.638995  17999.7
 +
0.639995  17999.8
 +
0.640995  17999.9
 +
0.641995  17999.9
 +
0.642995  18000
 +
0.643995  18000.1
 +
0.644995  18000.1
 +
0.645995  18000.2
 +
0.646995  18000.3
 +
0.647995  18000.3
 +
0.648995  18000.4
 +
0.649995  18000.5
 +
0.650995  18000.5
 +
0.651995  18000.6
 +
0.652995  18000.7
 +
0.653995  18000.7
 +
0.654995  18000.8
 +
0.655995  18000.9
 +
0.656995  18000.9
 +
0.657995  18001
 +
0.658995  18001
 +
0.659995  18001.1
 +
0.660995  18001.2
 +
0.661995  18001.2
 +
0.662995  18001.3
 +
0.663995  18001.4
 +
0.664995  18001.4
 +
0.665995  18001.5
 +
0.666995  18001.6
 +
0.667995  18001.6
 +
0.668995  18001.7
 +
0.669995  18001.7
 +
0.670995  18001.8
 +
0.671995  18001.9
 +
0.672995  18001.9
 +
0.673995  18002
 +
0.674995  18002.1
 +
0.675995  18002.1
 +
0.676995  18002.2
 +
0.677995  18002.2
 +
0.678995  18002.3
 +
0.679995  18002.4
 +
0.680995  18002.4
 +
0.681995  18002.5
 +
0.682995  18002.6
 +
0.683995  18002.6
 +
0.684995  18002.7
 +
0.685995  18002.7
 +
0.686995  18002.8
 +
0.687995  18002.9
 +
0.688995  18002.9
 +
0.689995  18003
 +
0.690995  18003
 +
0.691995  18003.1
 +
0.692995  18003.2
 +
0.693995  18003.2
 +
0.694995  18003.3
 +
0.695995  18003.3
 +
0.696995  18003.4
 +
0.697995  18003.4
 +
0.698995  18003.5
 +
0.699995  18003.6
 +
0.700995  18003.6
 +
0.701995  18003.7
 +
0.702995  18003.7
 +
0.703995  18003.8
 +
0.704994  18003.9
 +
0.705994  18003.9
 +
0.706994  18004
 +
0.707994  18004
 +
0.708994  18004.1
 +
0.709994  18004.1
 +
0.710994  18004.2
 +
0.711994  18004.3
 +
0.712994  18004.3
 +
0.713994  18004.4
 +
0.714994  18004.4
 +
0.715994  18004.5
 +
0.716994  18004.5
 +
0.717994  18004.6
 +
0.718994  18004.7
 +
0.719994  18004.7
 +
0.720994  18004.8
 +
0.721994  18004.8
 +
0.722994  18004.9
 +
0.723994  18004.9
 +
0.724994  18005
 +
0.725994  18005.1
 +
0.726994  18005.1
 +
0.727994  18005.2
 +
0.728994  18005.2
 +
0.729994  18005.3
 +
0.730994  18005.3
 +
0.731994  18005.4
 +
0.732994  18005.4
 +
0.733994  18005.5
 +
0.734994  18005.5
 +
0.735994  18005.6
 +
0.736994  18005.7
 +
0.737994  18005.7
 +
0.738994  18005.8
 +
0.739994  18005.8
 +
0.740994  18005.9
 +
0.741994  18005.9
 +
0.742994  18006
 +
0.743994  18006
 +
0.744994  18006.1
 +
0.745994  18006.1
 +
0.746994  18006.2
 +
0.747994  18006.2
 +
0.748994  18006.3
 +
0.749994  18006.4
 +
0.750994  18006.4
 +
0.751994  18006.5
 +
0.752994  18006.5
 +
0.753994  18006.6
 +
0.754994  18006.6
 +
0.755994  18006.7
 +
0.756994  18006.7
 +
0.757994  18006.8
 +
0.758994  18006.8
 +
0.759994  18006.9
 +
0.760994  18006.9
 +
0.761994  18007
 +
0.762994  18007
 +
0.763994  18007.1
 +
0.764994  18007.1
 +
0.765994  18007.2
 +
0.766994  18007.2
 +
0.767994  18007.3
 +
0.768994  18007.3
 +
0.769994  18007.4
 +
0.770994  18007.4
 +
0.771994  18007.5
 +
0.772994  18007.5
 +
0.773994  18007.6
 +
0.774994  18007.6
 +
0.775994  18007.7
 +
0.776994  18007.7
 +
0.777994  18007.8
 +
0.778994  18007.8
 +
0.779994  18007.9
 +
0.780994  18007.9
 +
0.781994  18008
 +
0.782993  18008
 +
0.783993  18008.1
 +
0.784993  18008.1
 +
0.785993  18008.2
 +
0.786993  18008.2
 +
0.787993  18008.3
 +
0.788993  18008.3
 +
0.789993  18008.4
 +
0.790993  18008.4
 +
0.791993  18008.5
 +
0.792993  18008.5
 +
0.793993  18008.6
 +
0.794993  18008.6
 +
0.795993  18008.7
 +
0.796993  18008.7
 +
0.797993  18008.8
 +
0.798993  18008.8
 +
0.799993  18008.9
 +
0.800993  18008.9
 +
0.801993  18009
 +
0.802993  18009
 +
0.803993  18009.1
 +
0.804993  18009.1
 +
0.805993  18009.2
 +
0.806993  18009.2
 +
0.807993  18009.3
 +
0.808993  18009.3
 +
0.809993  18009.4
 +
0.810993  18009.4
 +
0.811993  18009.4
 +
0.812993  18009.5
 +
0.813993  18009.5
 +
0.814993  18009.6
 +
0.815993  18009.6
 +
0.816993  18009.7
 +
0.817993  18009.7
 +
0.818993  18009.8
 +
0.819993  18009.8
 +
0.820993  18009.9
 +
0.821993  18009.9
 +
0.822993  18010
 +
0.823993  18010
 +
0.824993  18010.1
 +
0.825993  18010.1
 +
0.826993  18010.1
 +
0.827993  18010.2
 +
0.828993  18010.2
 +
0.829993  18010.3
 +
0.830993  18010.3
 +
0.831993  18010.4
 +
0.832993  18010.4
 +
0.833993  18010.5
 +
0.834993  18010.5
 +
0.835993  18010.6
 +
0.836993  18010.6
 +
0.837993  18010.6
 +
0.838993  18010.7
 +
0.839993  18010.7
 +
0.840993  18010.8
 +
0.841993  18010.8
 +
0.842993  18010.9
 +
0.843993  18010.9
 +
0.844993  18011
 +
0.845993  18011
 +
0.846993  18011
 +
0.847993  18011.1
 +
0.848993  18011.1
 +
0.849993  18011.2
 +
0.850993  18011.2
 +
0.851993  18011.3
 +
0.852993  18011.3
 +
0.853993  18011.3
 +
0.854993  18011.4
 +
0.855993  18011.4
 +
0.856993  18011.5
 +
0.857993  18011.5
 +
0.858993  18011.6
 +
0.859993  18011.6
 +
0.860992  18011.7
 +
0.861992  18011.7
 +
0.862992  18011.7
 +
0.863992  18011.8
 +
0.864992  18011.8
 +
0.865992  18011.9
 +
0.866992  18011.9
 +
0.867992  18012
 +
0.868992  18012
 +
0.869992  18012
 +
0.870992  18012.1
 +
0.871992  18012.1
 +
0.872992  18012.2
 +
0.873992  18012.2
 +
0.874992  18012.2
 +
0.875992  18012.3
 +
0.876992  18012.3
 +
0.877992  18012.4
 +
0.878992  18012.4
 +
0.879992  18012.5
 +
0.880992  18012.5
 +
0.881992  18012.5
 +
0.882992  18012.6
 +
0.883992  18012.6
 +
0.884992  18012.7
 +
0.885992  18012.7
 +
0.886992  18012.7
 +
0.887992  18012.8
 +
0.888992  18012.8
 +
0.889992  18012.9
 +
0.890992  18012.9
 +
0.891992  18013
 +
0.892992  18013
 +
0.893992  18013
 +
0.894992  18013.1
 +
0.895992  18013.1
 +
0.896992  18013.2
 +
0.897992  18013.2
 +
0.898992  18013.2
 +
0.899992  18013.3
 +
0.900992  18013.3
 +
0.901992  18013.4
 +
0.902992  18013.4
 +
0.903992  18013.4
 +
0.904992  18013.5
 +
0.905992  18013.5
 +
0.906992  18013.6
 +
0.907992  18013.6
 +
0.908992  18013.6
 +
0.909992  18013.7
 +
0.910992  18013.7
 +
0.911992  18013.8
 +
0.912992  18013.8
 +
0.913992  18013.8
 +
0.914992  18013.9
 +
0.915992  18013.9
 +
0.916992  18014
 +
0.917992  18014
 +
0.918992  18014
 +
0.919992  18014.1
 +
0.920992  18014.1
 +
0.921992  18014.1
 +
0.922992  18014.2
 +
0.923992  18014.2
 +
0.924992  18014.3
 +
0.925992  18014.3
 +
0.926992  18014.3
 +
0.927992  18014.4
 +
0.928992  18014.4
 +
0.929992  18014.5
 +
0.930992  18014.5
 +
0.931992  18014.5
 +
0.932992  18014.6
 +
0.933992  18014.6
 +
0.934992  18014.6
 +
0.935992  18014.7
 +
0.936992  18014.7
 +
0.937991  18014.8
 +
0.938991  18014.8
 +
0.939991  18014.8
 +
0.940991  18014.9
 +
0.941991  18014.9
 +
0.942991  18014.9
 +
0.943991  18015
 +
0.944991  18015
 +
0.945991  18015.1
 +
0.946991  18015.1
 +
0.947991  18015.1
 +
0.948991  18015.2
 +
0.949991  18015.2
 +
0.950991  18015.2
 +
0.951991  18015.3
 +
0.952991  18015.3
 +
0.953991  18015.4
 +
0.954991  18015.4
 +
0.955991  18015.4
 +
0.956991  18015.5
 +
0.957991  18015.5
 +
0.958991  18015.5
 +
0.959991  18015.6
 +
0.960991  18015.6
 +
0.961991  18015.7
 +
0.962991  18015.7
 +
0.963991  18015.7
 +
0.964991  18015.8
 +
0.965991  18015.8
 +
0.966991  18015.8
 +
0.967991  18015.9
 +
0.968991  18015.9
 +
0.969991  18015.9
 +
0.970991  18016
 +
0.971991  18016
 +
0.972991  18016
 +
0.973991  18016.1
 +
0.974991  18016.1
 +
0.975991  18016.2
 +
0.976991  18016.2
 +
0.977991  18016.2
 +
0.978991  18016.3
 +
0.979991  18016.3
 +
0.980991  18016.3
 +
0.981991  18016.4
 +
0.982991  18016.4
 +
0.983991  18016.4
 +
0.984991  18016.5
 +
0.985991  18016.5
 +
0.986991  18016.5
 +
0.987991  18016.6
 +
0.988991  18016.6
 +
0.989991  18016.7
 +
0.990991  18016.7
 +
0.991991  18016.7
 +
0.992991  18016.8
 +
0.993991  18016.8
 +
0.994991  18016.8
 +
0.995991  18016.9
 +
0.996991  18016.9
 +
0.997991  18016.9
 +
0.998991  18017
 +
0.999991  18017
 +
%
 
   
 
   
===  probcircle.pl ===
+
===  total_ca ===
  given a sphere of diameter D, what is the prob of oberving a disk of radius r when a random plane intersects it?
+
#/home/lml/krypton/bin/total_ca
  prints to stdout: r  prob(r) 1/prob(r)
 
  
  usage:
+
Reads in a floating point image or short int image as produced by simulation (i.e., cylindrical coords), calculates
      probcircle.pl [options]  
+
the total calcium change (i.e., [ca](r)*pi*r*r - t(0)) as a function of distance from the calcium entry site.
 +
Output is printed to stdout.
 +
All input concentrations should be in nM
 +
Each z slice is analyzed separately (i.e., z is assumed to be time) unless image is rectangular and 3D (-R).
  
  options:
+
Usage: total_ca [options] ca.i2i
-D=# default = 1
+
      options for printing graphs of calcium (not concentration) vs. distance from ca entry location:
-just_prob don't print the third column
+
the units for the graph are nM*um^3, but 1nM = .6ions/um^3 , so multiply be .6 to get ions
 +
                      (and 1pA = 3,000 ions/msec if you want to convert to pA-msec).
 +
        -n: normalize calcium distance graph for each z slice (so sum of amplitudes = 1),
 +
                      (otherwise when graph spacing is changed, -g option, the height of the graph will change).
 +
  -a:    print absolute calcium, not delta calcium (the default).
 +
                      when this is applied to a uniform image it should produce a 4pi*r*r distribution.
 +
            The default, delta calcium, prints the delta (i.e., change) from slice 0 (regardless -z option)
 +
        (but delta calcium not calculated if 3D rectangular, i.e., -R specified).
  
  examples:
+
  -p # #: pixel size in microns in the radial (x) and lengthwise (y) directions,
       probcircle.pl | xmgrace -free -pipe -nxy -
+
default =  0.10 and  0.10
 +
  -P # # #: pixel size in microns in x,y,z directions (rectangular not cylindrical coords),
 +
default = ( 0.10, 0.10, 0.10)
 +
  -r: data is rectangular, not cylindrical coords (-P sets this too)
 +
(e.g., already passed through cyl2cart).
 +
  -R: data is 3D rectangular (not 2D+time), not cylindrical coords.
 +
  -e x y:       0-indexed coords of calcium entry location (default: x= 0, y = ydim/2)
 +
  -E x y x:    0-indexed coords of calcium entry location for 3D rectangular data
 +
(i.e., z direction is not time). sets -R option.
 +
        -g #: graph spacing. default is the pixel size.
 +
        -s #:        subsample each voxel this number of times in the x (radial) and y (longitudinal) directions,
 +
                      (and z if 3D and not 2D+time) default = 3 (anything less tends to introduce errors).
 +
        -z low hi dz: only look at z slices low to hi (0-indexed, inclusive), stepping by dz.
  
  see also: p. 249 stereology_book.pdf
+
see also:
    /home/lml/krypton/packages/fiji/stereology_lml.template
+
    printvals, float2int, in matlab: readxmgr, acurves (see ~lml/krypton/JSinger for an example)
    /home/lml/krypton/Corvera/Raz/stereology/plot_results.pl
 
    /home/lml/krypton/facil/cross_sections_of_sphere
 
  
 +
source code in ~lml/krypton/Walsh directory.
 
   
 
   
===  compare2dist ===
+
===  vcspat-models ===
 +
argc = 1
  
This program calculates whether two amplitude distributions are the same.
+
This program creates a volume image with objects randomly placed
It was written to examine Rhonghua's STOCS data to determine whether the increase
+
within it. The mask image defines where an object is allowed to be placed.
in observed STOC frequency could be explained by an increase in STOC amplitude
+
The mask value can be changed with the -M optionObjects can either be individual
(since then more events above threshold would be observed).   
+
voxels (the default) or tiny images (-o option) or connected voxels in an image (-O).
datafile2 should be the one with larger amplitudes (so we hypothesize it has fewer missing
 
events if it is just a version of datafile1 shifted higher).  It will get shifted down
 
by a range of shifts (-s option) and compared with datafile1.
 
This routine also compares the temporal interarrival time distribution of each datafile with
 
that predicted by a poisson process and with the other datafile; the temporal calculations
 
ignore all missing data issues and shifting issues for now.
 
  
This program reads data in the form:
+
Usage:
     time calcium prior_baseline post_baseline amplitude
+
  vcspat-models [options] mask.i2i out.i2i
      where the values are
+
 
      time:           time of STOC
+
Options:
      calcium:         SR calcium level
+
  -m #     : model number (default 0).
      prior_baseline: amplitude just prior to STOC
+
            0 - grid pattern
      post_baselineamplitude just after STOC
+
            1 - random pattern
      amplitude:       amplitude amplitude of STOC (not relative to baseline)
+
  -M #    : value of mask pixels (default 1).
Data is expected to already be sorted by time (smallest to largest).
+
  -r #    : number of random points to use in random pattern (default 25000)
comment lines must begin with a #
+
  -o name  : image to use at point in pattern (default just turns on a pixel)
 +
(can use up to 256 images - image will be randomly chosen)
 +
  -a : if objects overlap, add their pixel values instead of just replacing
 +
 
 +
Options related to objects:
 +
   -O thresh name.i2i: threshold an image to use for objects. Extracts as an object each
 +
            connected set of voxels above threshold.  Places these  objects randomly
 +
            into the output image (uses each object once). Use with the
 +
            -m 1 option. Do not use the -r option
 +
  -P name.i2i id.i2i: similar to -O option, extracts as an object each of the
 +
    the objects in name.i2i based upon their pixel values (object id) in id.i2i
 +
(e.g., id.i2i was produced via objs_via_ascent). This option preserves the
 +
distinction between objects in name.i2i which may be touching - since simple thresholding is not used.
 +
If only an id.i2i is available (no name.i2i), you can specify -P id.i2i id.i2i
 +
  -v: replace objects (after fitting them into the image) with just the single voxel
 +
at the brightest location in the object.  Only use with -O and -e options.
 +
  -S # #:  minimum and maximum object sizes to allow (use with -O option).
 +
  -e: do not allow (exclude) objects to be placed so that they overlap with each
 +
other, go outside the image, or go outside the mask.  The default is to allow
 +
overlaps and to just zero out that part of an object which goes outside the
 +
image volume or mask.
 +
  -n: number the objects in out.i2i (use with -O or -P options). Rather than all
 +
the pixels in an object being their original values, all the pixels in object 1
 +
will be labeled 1, all those in object 2 labeled 2, etc.  If -e not specied and
 +
objects overlap the first object placed (usually the largest) will prevail.
 +
Can also be used with -v, then output will have the brightest voxel set to object id, others to 0.
 +
The output of this can be analyzed by object_overlap program.
 +
  -N out2.i2i:  create a second output file, number the objects in out2.i2i (like -n).
 +
 
 +
OtherOptions
 +
  -s #    : seed for random number generator (default pid)
 +
  -x #    : x increment for grid pattern (default 3)
 +
  -y #    : y increment for grid pattern (default 3)
 +
  -z #     : z increment for grid pattern (default 3)
 +
  -V: verbose
 +
 
 +
note: entire image name (with extension) is required.
 +
note: a - in place of an image name means stdin or stdout.
 +
Examples:
 +
  objs_via_ascent in1.i2i inid1.i2i
 +
  objs_via_ascent in2.i2i inid2.i2i
 +
  vcspat-models-new -m 1 -M 1 -P in1.i2i inid1.i2i -N outid1.i2i  mask.i2i out1.i2i
 +
  vcspat-models-new -m 1 -M 1 -P in2.i2i inid2.i2i -N outid2.i2i  mask.i2i out2.i2i
 +
  object_overlap outid1.i2i outid2.i2i  > obj_overlap
 +
  overlapL out1.i2i out2.i2i > coloc
 +
 
 +
See also:  krypton/Qiong/run1,  vcspat, randompuncs, spatial_stats2, objs_via_ascent, countobjs
 +
 
 +
Source code in /storage/big1/lml/jac/was_invitro/Projects/cspat-volume
 +
 
 +
== Statistics ==
 +
===  cluster_distances.pl  ===
  
Usage: compare2dist [options] datafile1 datafile2
+
Takes output from channel_current2 (after 11/24/09) and pulls out statistics about
options:
+
mean distance to each BK cluster. Then produces average stats from all the files
    -t #: only include data with an amplitude > #. The default
+
analyzed. Output to stdout.
is to assume a 0 threshold. If you have acquired the data
+
 
using some thresholding criterium (eg, only peaks above
+
 
10picoamps are counted) then you should provide that number
+
  usage:
here, even if all your data is above this (ie, you've applied
 
the threshold in your identification phase). This is because
 
we need to know it when we shift amplitudes of the second
 
distribution to see if it could match the first distribution.
 
    -b: subtract average baseline from amplitude prior to use (ie, prior
 
to any thresholding or intensity shifting of data).
 
    -s delta max: shift datafile2 amplitudes down by a maximum of max, in
 
increments of delta, to see if it will then match datafile1.
 
  -p #: our guess of the percentage of data missing from datafile2 because it was
 
below our threshold/detection criteria (a # from 0 to 1).
 
This plus the amount of datafile2 shifted below threshold determines
 
our estimate of the amount of data missing from the shifted datafile2 and
 
the unshifted datafile1. The larger this number is, the more likely
 
the two curves will appear similar (since differences in actual data
 
examined will be proportionally smaller differences, and we are assuming
 
all missing data matches exactly, but see -m below). Default = 0.000000
 
    -m: assume all missing data maximally MISmatches, this would probably be
 
a worst case scenario, so that if the KS statistic says the distributions
 
could be the same even with the -m option, its probably true.  But I'm
 
not certain of this, since it really depends how this affects the
 
relative spacing between the cumulative distributions. I'd have to
 
think about it some more.
 
  
see also:test_distr, poisson
+
  -files:file1:file2:...:filen       which files to analyze. Defaults are files named 2_*.currents in cwd.
This code is in ~lml/vision/Rhonghua/STOCS
+
  -numBKvsProb       also prints numBK vs prob data suitable for xmgrace
#/home/lml/krypton/bin/compare2dist
 
  
===  compare2gaussian  ===
 
incorrect command line, need 1 data files.
 
This program calculates whether a given set of data could be samples from a known mixture of Gaussians.
 
datafile should have one data point per line. comment lines begin with #.
 
Output statistics to stdout.
 
  
Usage: compare2gaussian [options] datafile
+
example:
options:
+
  (channel_current2  .... > file.channel_current) >& file1.currents
      -t #: only include data with an amplitude > #. The default is to include all data.
+
  (channel_current2  .... > file2.channel_current) >& file2.currents
  -g # amp1 mean1 sd1 ... :
+
  cluster_distances.pl -numBKvsProb -files=file1.currents:file2.currents > avg_distances.txt
The Gaussian mixture model the data should be compared against (using a KS statistic).
+
  fgrep -v clusters avg_distances.txt |xmgrace -pipe
# is the number of Gaussians, this is followed by the amplitude, mean, and sd of
 
each Gaussian. The default is one Gaussian with mean = 0 and sd = 1.
 
You can get these values using the fitgaussians2 program.
 
  -v: verbose. Also prints the observed (first) and theoretical (second) curves to stdout.
 
  -T: test. runs through x = 0 to 10 and prints out cumulative prob. exits.
 
  
See Also: fitgaussians2, fit2gaussians, fit3gaussians
+
note: mean distances to clusters are not always increasing (e.g., mean distance to 10th
 +
      cluster could be SMALLER than the mean distance to the 9th cluster).  I think this
 +
      has to do with limiting my maximum distance (see comments in this file).
  
Source code is in ~lml/krypton/Lefkowitz
+
#/home/lml/krypton/bin/compare2gaussian
+
see also:
 +
  channel_current2
 +
  /home/lml/krypton/Zhuge/BKandRyr/analysis6/run12
 +
  /home/lml/krypton/Huang/Kth_pt.m
 +
  p. 637 of Cressie.
  
===  compare_dist2 ===
+
 +
===  coloc.pl ===
  
This program calculates whether two distributions are the same using chi-square test (unless -k).
+
calls coloc3way with a bunch of different thresholds. Creates an output file which can be
It was written to examine the distribution of sizes of Ryanodine Receptor objects
+
graphed with VennDiagram.m.  
to determine if they are randomly distributed. datafile1 should be the reference
 
data (gotten from many simulations or from a theoretical formula), datafile2
 
should be the real data (max number of data values = 100000).
 
  
This program reads data which is just a list of sizes of objects seen (one per line).
+
coloc.pl im1.i2i im2.i2i im3.i2i  > out.coloc3way
Comment lines must begin with a #
+
 
Floating pt numbers are truncated to integers for bin number (max bin number = 50000).
+
options:
 +
-time_vs_thresh just generate a file which shows which times correspond to which thresholds. images can be dummy names.
 +
 
 +
-t1=#:#:# threshold one should go from # to # by #. default = 800:1200:50
 +
-t2=#:#:# threshold two should go from # to # by #. default = 800:1200:50
 +
-t3=#:#:# threshold three should go from # to # by #. default = 2000:4000:200
 +
-numthresh=#1:#2:#3  ignore the third number in the -t1, -t2, and -t3 options (or in the default) and instead calculate a  
 +
  threshold step size so that #1 thresholds are applied to im1.i2i (dat image)
 +
  #2 thresholds are applied to im2.i2i (ctx image), #3 thresholds are applied to im3.i2i (rin image).
 +
  e.g., -numthresh=5:10:10 will apply 5 different thresholds to im1.i2i, and 10 thresholds to im2.i2i and im3.i2i.
 +
  Using this option lets me insure that each call to coloc.pl will produce exactly the same number of data points;
 +
  this may make the statistical comparison between cells easier.
 +
 
 +
-Melikian=file in addition to creating output for VennDiagram, create text file with the coloc percentages
 +
Dr. Melikian is interested in. Graph via xmgr -nxy. See header in file for coloc info.
 +
For this to work the three image files MUST be specified in the order 405  594  488 (i.e., rin.i2i ctx.i2i dat.i2i)
 +
-Melikian2=file Same as -Melikian, but dat (488) is image 1, ctx (594) image 2, and rin (405) image 3
 +
-area=file.xyr also print out Melikian data as xyr where r is proportional to the number of pixels involved
 +
(i.e., the denominator used when calculating the percent colocalized).
 +
prints to "file.xyr".  Must also specify either -Melikian or -Melikian2
 +
xmgrace -graphtype fixed -settype xyr file.xyr
 +
-matlab=file:#  like -area but as columns so easy to read into matlab: t p1 n1 p2 n2 p3 n3 p4 n4
 +
# is the max n value (ie, all n values are scaled so the max over n1,n2,n3,n4 is #).
 +
Since p1,p2,p3,p4 are percent, # is typically set to a small part of that, e.g. .05.
 +
If # is negative then abs(#) is just used as a scale factor (so -1 would just keep the
 +
n values as the number of voxels). Graph in matlab with line width of 2*n1:
 +
matlab  # import data=(tdim,9)
 +
>> lowy = data(:,2) - data(:,3); hiy = data(:,2) + data(:,3);  x = data(:,1);
 +
>> area(x,hiy,'FaceColor',[1 0 0],'EdgeColor','r','LineWidth',1); hold on;
 +
>> area(x,lowy,'FaceColor',[1 1 1],'EdgeColor','r','LineWidth',1);
 +
Must also specify -Melikian or -Melikian2.
 +
 
 +
-debug
 +
-verbose
  
Usage: compare_dist2 [options] datafile1 datafile2
 
options:
 
  -k perform K-S test instead (I'm not certain the numbins I use to calculate this is correct).
 
  -a also print the histograms produced
 
  -b also print the normalized histograms (total count datafile2 scaled to the same count as in datafile1,
 
  bins with 0 removed), this is only done if -k not specified (ie, only if performing chi-square test).
 
  -c also print the cumulative prob distributions (only done if -k also specified)
 
  -r # #: only analyze sizes within the specified range (inclusive)
 
  -m #: cap the maximum number of counts for any size in datafile1 to #
 
  -M #: cap the maximum number of counts for any size in datafile2 to #
 
  -z: for chi-square keep zero entry bins (chi square only correct if this option is NOT used)
 
so why is this option here?  if you just really want to use this program to do
 
histogram normalization (-b), and don't care about the stat.  xmgrace running avg
 
will produce strange results if you don't use -z, ie, if data not equally spaced.
 
  -v verbose
 
  -V very verbose
 
 
example:
 
example:
      create a simulated distribution and compare it with real restored data (real_ryrr.i2i, run5 does this 100 times):
 
  cluster -wsize 10 43 25 -cylinder 0.001 3 -psize 0.08 0.08 0.25 -mindist 0.030 -numryr 500 -image ryr.i2i
 
  blur3d -S 40000 -P ryr.i2i psf.i2i ryr_b.i2i
 
  noise -c RCA ryr_b.i2i ryr_bn.i2i
 
  setenv myloc /home/lml/krypton/Zhuge/Ryr_clusters
 
  setenv eprloc /storage/big1/epr/queues
 
  echo "  /storage/big1/epr/run_epr -V -log -NSC 4 -sm 1e-05 -it 5000 -sc 0.025 -co 0.001
 
-psf ${myloc}/psf.i2i ${myloc}/ryr_bn.i2i ${myloc}/ryr_bnr.i2i " > /storage/big1/epr/queues/standard/lml.0
 
  while (1==1)  if ( ( ! -e ${eprloc}/standard/lml.0 ) && ( ! -e ${eprloc}/running/lml.0 ) ) then break endif sleep 60s end
 
  countobjs -k -s 5 300 -t 4500 4500 sim_ryr.objs ryr_bnr.i2i
 
  cull -s -c -2 < sim_ryr.objs > sim_ryr.stats
 
  countobjs -k -s 5 300 -t 4500 4500 real_ryr.objs real_ryrr.i2i
 
  cull -s -c -2 < real_ryr.objs > real_ryr.stats
 
  compare_dist2 -b sim_ryr.stats real_ryr.stats  >& chi_ryr
 
  compare_dist2 -k -b sim_ryr.stats real_ryr.stats  >& ks_ryr
 
  tail chi_ryr ks_ryr
 
  xmgrace chi_ryr; xmgrace ks_ryr
 
  
see also: cluster, run5
+
coloc.pl im1.i2i im2.i2i im3.i2i > coloc.data
This code is in /home/lml/krypton/Zhuge/Ryr_clusters/
+
coloc.pl -time_vs_thresh im1.i2i im2.i2i im3.i2i > coloc.times
#/home/lml/krypton/bin/compare_dist2
+
matlab
 +
>> VennDiagram('coloc.data','percent')  # and manually look at coloc.times while doing this to convert times to thresholds.
 +
 
 +
see also:
 +
~/krypton/packages/fiji/Fiji.app/plugins/jacob_.jar  - more traditional colocalization measures
 +
coloc_tseries2
 +
colocalizeL
  
===  correlationL ===
+
/home/lml/krypton/bin/correlationL
+
===  probcircle.pl ===
 +
  given a sphere of diameter D, what is the prob of oberving a disk of radius r when a random plane intersects it?
 +
  prints to stdout: r  prob(r) 1/prob(r)
  
This program plots intensities from image1 vs intensities from
+
  usage:
image2. image1 on the x axis, image 2 on the y axis. Intensities
+
      probcircle.pl [options]
in both images are rescaled 0 to the size of the output image
 
(default = 512).  The intensity at each pixel in the output
 
image is the number of (image1,image2) voxels with that particular
 
intensity combination.
 
The intent is to be able to look at the output image and get a sense
 
for whether there is a correlation between intensities
 
in the two images.  If so, perhaps a least squares line
 
fit should be done to see how well one images correlates with the
 
other, or -s option can be specified.
 
The minimum, maximum, and scale factors are printed to stdout.
 
Version 1.1
 
  
Usage: correlation [options] im1.i2i im2.i2i out.i2i
+
  options:
options:
+
-D=# default = 1
  -d xdim ydim: output dimensions of new image
+
-just_prob don't print the third column
(default = 512,512).
 
  -S im1scale im2scale: scale intensities with these scale factors. newval = (intens-min_intens)*scale
 
  -B b1 b2:    force min_intens (black level) to specified value.  newval1 = (intens-b1)*scale1
 
  -i val1 val2: Ignore any voxels in image1 <= val1 and
 
any voxels in image2 <= val2.
 
  
  -h val1 val2: Ignore any voxels in image1 >= val1 and
+
  examples:
any voxels in image2 >= val2.
+
      probcircle.pl | xmgrace -free -pipe -nxy -
  
  -r: instead of intensities, use the rank
+
  see also: p. 249 stereology_book.pdf
order of the intensities.
+
    /home/lml/krypton/packages/fiji/stereology_lml.template
  -a: automatically calculate the size of the
+
    /home/lml/krypton/Corvera/Raz/stereology/plot_results.pl
output image. attempts to make the scale
+
    /home/lml/krypton/facil/cross_sections_of_sphere
factor = 1.
 
  -b: keep the xdim and ydim scale factors the same.
 
  -s: calculate Spearman rank-order correlation
 
coefficients. print results to stdout.
 
  -z zslice:    only examine the specified z slice (the first
 
slice is considered slice 0).
 
note: entire image name is NOT required.
 
note: a - in place of an image name means stdin or stdout.
 
  
examples:
 
    # to apply this to a set of 3D images, using the same scales and size images for easy comparison
 
correlationL -S s1 s2 -d 512 512 -B 0 0 image1.i2i corr1.i2i    (and same for other images)
 
 
   
 
   
===  create_imagesL ===
+
===  compare2dist ===
  
This program takes output from many runs of "overlap" and
+
This program calculates whether two amplitude distributions are the same.
produces two images. One image is a percent colocalization image
+
It was written to examine Rhonghua's STOCS data to determine whether the increase
and the other is a probability imageThe overlap program MUST be
+
in observed STOC frequency could be explained by an increase in STOC amplitude
run via the "many_overlaps" commandThe probability calculations
+
(since then more events above threshold would be observed).   
are the same as those performed by "probcolocal", but only -n
+
datafile2 should be the one with larger amplitudes (so we hypothesize it has fewer missing
needs to be specified since the other values are automatically
+
events if it is just a version of datafile1 shifted higher)It will get shifted down
extracted from the file produced by "many_overlaps".
+
by a range of shifts (-s option) and compared with datafile1.
 +
This routine also compares the temporal interarrival time distribution of each datafile with
 +
that predicted by a poisson process and with the other datafile; the temporal calculations
 +
ignore all missing data issues and shifting issues for now.
  
The percent image is the percent of voxels above threshold in image1
+
This program reads data in the form:
(as originally specified to "many_overlaps") which overlap with
+
    time calcium prior_baseline post_baseline amplitude
voxels above threshold in image2. A 100 in the output image = 100 percent.
+
      where the values are
The probability of observing as much (or more) overlap as we did due to
+
      time:            time of STOC
random chance is the prob.i2i image.  Probabilities are mulitplied by 100.
+
      calcium:        SR calcium level
 +
      prior_baseline:  amplitude just prior to STOC
 +
      post_baseline:  amplitude just after STOC
 +
      amplitude:      amplitude amplitude of STOC (not relative to baseline)
 +
Data is expected to already be sorted by time (smallest to largest).
 +
comment lines must begin with a #
  
Position along the y-axis (vertical axis) of the image, corresponds to
+
Usage: compare2dist [options] datafile1 datafile2
thresholds for image2. The x-axis represents image1 thresholds. The
+
options:
lowest threshold is the bottom left cornerSee the first line in  
+
    -t #: only include data with an amplitude > #. The default
your datafile for the range of thresholds this represents.
+
is to assume a 0 threshold. If you have acquired the data
Overlap produces statistics for a range of allowed overlaps.
+
using some thresholding criterium (eg, only peaks above
Create_images, by default, chooses an overlap within 1 voxel.
+
10picoamps are counted) then you should provide that number
If you want to use a different overlap distance use the -o option.
+
here, even if all your data is above this (ie, you've applied
 +
the threshold in your identification phase). This is because
 +
we need to know it when we shift amplitudes of the second
 +
distribution to see if it could match the first distribution.
 +
    -b: subtract average baseline from amplitude prior to use (ie, prior
 +
to any thresholding or intensity shifting of data).
 +
    -s delta max: shift datafile2 amplitudes down by a maximum of max, in
 +
increments of delta, to see if it will then match datafile1.
 +
  -p #: our guess of the percentage of data missing from datafile2 because it was
 +
below our threshold/detection criteria (a # from 0 to 1).
 +
This plus the amount of datafile2 shifted below threshold determines
 +
our estimate of the amount of data missing from the shifted datafile2 and
 +
the unshifted datafile1The larger this number is, the more likely
 +
the two curves will appear similar (since differences in actual data
 +
examined will be proportionally smaller differences, and we are assuming
 +
all missing data matches exactly, but see -m below). Default = 0.000000
 +
    -m: assume all missing data maximally MISmatches, this would probably be
 +
a worst case scenario, so that if the KS statistic says the distributions
 +
could be the same even with the -m option, its probably true.  But I'm
 +
not certain of this, since it really depends how this affects the
 +
relative spacing between the cumulative distributions. I'd have to
 +
think about it some more.
  
See also: overlap, probcolocal, many_overlaps
+
see also:test_distr, poisson
 +
This code is in ~lml/vision/Rhonghua/STOCS
 +
#/home/lml/krypton/bin/compare2dist
  
Usage:
+
===  compare2gaussian  ===
create_images [options] datafile percent.i2i prob.i2i
+
incorrect command line, need 1 data files.
options:
+
This program calculates whether a given set of data could be samples from a known mixture of Gaussians.
  -o distance:    voxels within this distance count as overlapped.
+
datafile should have one data point per line. comment lines begin with #.
  -n number:    number of voxels (1000000 default), see probcolocal.
+
Output statistics to stdout.
  
Examples:
+
Usage: compare2gaussian [options] datafile
  many_overlaps -t 100 1000 100 -T 100 1000 100 alpha_T.i2i beta_T.i2i tmp_output
+
options:
  create_images -n 363264 tmp_output percent.i2i prob.i2i
+
      -t #: only include data with an amplitude > #. The default is to include all data.
+
  -g # amp1 mean1 sd1 ... :
== Analysis of Points ==
+
The Gaussian mixture model the data should be compared against (using a KS statistic).
===  components.pl  ===
+
# is the number of Gaussians, this is followed by the amplitude, mean, and sd of  
 +
each Gaussian. The default is one Gaussian with mean = 0 and sd = 1.
 +
You can get these values using the fitgaussians2 program.
 +
  -v: verbose. Also prints the observed (first) and theoretical (second) curves to stdout.
 +
  -T: test. runs through x = 0 to 10 and prints out cumulative prob. exits.
  
Calculates the number of connected components resolved over a range of point densities.
+
See Also: fitgaussians2, fit2gaussians, fit3gaussians
  
components.pl [options]
+
Source code is in ~lml/krypton/Lefkowitz
 +
#/home/lml/krypton/bin/compare2gaussian
  
options:
+
===  compare_dist2  ===
  
-numpts=low:hi:delta
+
This program calculates whether two distributions are the same using chi-square test (unless -k).
-repeat=# number of times to repeat at each point density
+
It was written to examine the distribution of sizes of Ryanodine Receptor objects
-res=# in microns
+
to determine if they are randomly distributed. datafile1 should be the reference
-outfile=name name of output file. otherwise to _tmp. always need write permission in current directory.
+
data (gotten from many simulations or from a theoretical formula), datafile2
 +
should be the real data (max number of data values = 100000).
  
+
This program reads data which is just a list of sizes of objects seen (one per line).
===  convex_hull.pl  ===
+
Comment lines must begin with a #
 +
Floating pt numbers are truncated to integers for bin number (max bin number = 50000).
  
This program takes an object outputfile (unless -rptsin or -tripletsin) produced by countobjs (or maskobjs) and finds the minimal
+
Usage: compare_dist2 [options] datafile1 datafile2
spanning tree connecting the center of mass of the objects, and the convex hull. Writes out connections as an rpts file to stdout.
+
options:
It also loops through 20 thresholds  for the pts, and prints to stderr some stats about the minimal spanning tree and
+
  -k perform K-S test instead (I'm not certain the numbins I use to calculate this is correct).
convex hull of the points above each of these thresholds.
+
  -a also print the histograms produced
 
+
  -b also print the normalized histograms (total count datafile2 scaled to the same count as in datafile1,
Options can be used to only selected a subset of the objects and to constrain the maximum distance (-maxdist).  
+
  bins with 0 removed), this is only done if -k not specified (ie, only if performing chi-square test).
 
+
  -c also print the cumulative prob distributions (only done if -k also specified)
It was written with the hope that triplets (maxima in an image which has a cell in the center) will show a pattern in their
+
  -r # #: only analyze sizes within the specified range (inclusive)
convex hull area, so that when the threshold rises high enough, only maxima inside the cell will still be present and hence
+
  -m #: cap the maximum number of counts for any size in datafile1 to #
the convex hull will be stable and of much smaller area.
+
  -M #: cap the maximum number of counts for any size in datafile2 to #
 
+
  -z: for chi-square keep zero entry bins (chi square only correct if this option is NOT used)
This program requires perl modules Graph::Kruskal and Math::Geometry::Planar, use cpanp to install these:
+
so why is this option here?  if you just really want to use this program to do
    yum install perl-CPANPLUS-0.91.3-202.fc16.noarch  - for cpanp
+
histogram normalization (-b), and don't care about the stat. xmgrace running avg
    cpanp -i Graph::Kruskal
+
will produce strange results if you don't use -z, ie, if data not equally spaced.
    cpanp i Math::Geometry::Planar
+
  -v verbose
 +
  -V very verbose
 +
example:
 +
      create a simulated distribution and compare it with real restored data (real_ryrr.i2i, run5 does this 100 times):
 +
  cluster -wsize 10 43 25 -cylinder 0.001 3 -psize 0.08 0.08 0.25 -mindist 0.030 -numryr 500 -image ryr.i2i
 +
  blur3d -S 40000 -P ryr.i2i psf.i2i ryr_b.i2i
 +
  noise -c RCA ryr_b.i2i ryr_bn.i2i
 +
  setenv myloc /home/lml/krypton/Zhuge/Ryr_clusters
 +
  setenv eprloc /storage/big1/epr/queues
 +
  echo "  /storage/big1/epr/run_epr -V -log -NSC 4 -sm 1e-05 -it 5000 -sc 0.025 -co 0.001
 +
-psf ${myloc}/psf.i2i ${myloc}/ryr_bn.i2i ${myloc}/ryr_bnr.i2i " > /storage/big1/epr/queues/standard/lml.0
 +
  while (1==1)  if ( ( ! -e ${eprloc}/standard/lml.0 ) && ( ! -e ${eprloc}/running/lml.0 ) ) then break endif sleep 60s end
 +
  countobjs -k -s 5 300 -t 4500 4500 sim_ryr.objs ryr_bnr.i2i
 +
  cull -s -c -2 < sim_ryr.objs > sim_ryr.stats
 +
  countobjs -k -s 5 300 -t 4500 4500 real_ryr.objs real_ryrr.i2i
 +
  cull -s -c -2 < real_ryr.objs > real_ryr.stats
 +
  compare_dist2 -b sim_ryr.stats real_ryr.stats  >& chi_ryr
 +
  compare_dist2 -k -b sim_ryr.stats real_ryr.stats  >& ks_ryr
 +
  tail chi_ryr ks_ryr
 +
  xmgrace chi_ryr; xmgrace ks_ryr
  
usage:
+
see also: cluster, run5
  convex_hull.pl -tripletsin file1.triplets > file1_mst.rpts
+
This code is in /home/lml/krypton/Zhuge/Ryr_clusters/
 +
  #/home/lml/krypton/bin/compare_dist2
  
  input options:
+
=== correlationL  ===
    -dx=#   spacing in the x direction, default = 1
+
/home/lml/krypton/bin/correlationL
    -dy=#   spacing in the y direction, default = 1
 
    -dz=#   spacing in the z direction, default = 1
 
    -rptsin     instead of file1.objs, read file1.rpts where file1.rpts was produced by max2d.
 
      -size1 and -iod1 are ignored when this option is specified.
 
    -tripletsin   instead of file1.objs read in file1.xyi,  triplets of x y and intensity.
 
  
  analysis options:
+
This program plots intensities from image1 vs intensities from
    -size1=min:max     min and max object size allowed for file1.objs in pixels (inclusive)
+
image2. image1 on the x axis, image 2 on the y axis. Intensities
    -iod1=min:max   min and max object iod allowed for file1.objs (inclusive), or intensity if -tripletsin was specified.
+
in both images are rescaled 0 to the size of the output image
    -maxdist=#: :  don't allow connections between pts further apart than this distance (after applying dx, dy, dz spacing factors).
+
(default = 512). The intensity at each pixel in the output
  warning: if the distance is too small, then all the pts will not be connected to begin with;
+
image is the number of (image1,image2) voxels with that particular
    this may cause the minimal spanning tree algorithm to fail.
+
intensity combination.
    default maxdist is  3000
+
The intent is to be able to look at the output image and get a sense
 +
for whether there is a correlation between intensities
 +
in the two images.  If so, perhaps a least squares line
 +
fit should be done to see how well one images correlates with the
 +
other, or -s option can be specified.
 +
The minimum, maximum, and scale factors are printed to stdout.
 +
Version 1.1
  
  output options:
+
Usage: correlation [options] im1.i2i im2.i2i out.i2i
    -addlines : output rpts format which addlines is more likely to be happy with (may not work in dave?)
+
options:
    -hist :  calculate histogram of distances (hist[int(dist)]++, where int just truncates to integer). obsolete.
+
  -d xdim ydim: output dimensions of new image
    -sizehist : calculate histogram of object sizes (in voxels) in file1.out. (hist[int(size)]++, where int just
+
(default = 512,512).
        truncates to integer). If you don't care about distances between two files (ie, only want -sizehist)
+
  -S im1scale im2scale: scale intensities with these scale factors. newval = (intens-min_intens)*scale
        put the same file name for both files on the command line.  obsolete.
+
  -B b1 b2:     force min_intens (black level) to specified valuenewval1 = (intens-b1)*scale1
    -rpts=file.rpts : put bounding boxes around objects found and lines between closest objects (similar to objs2bb.pl)
+
  -i val1 val2: Ignore any voxels in image1 <= val1 and
  display this in dave eg:  dave -n 0 -u -I file.i2i file.rpts (use the -n 0 and -u options)
+
any voxels in image2 <= val2.
  note: may not show up in dave until you click on "scale" to force a rescale (or draw?).
 
    -jack=max.rpts:# :  create an rpts file with the maxima in each object displayed as a small jack.
 
    # controls the size of the jack. 1=1 pixel in size, 2 = 2 pixels, etc.
 
-twod   add this (in addition to -jack) if you want 2D jacks rather than 3D jacks.
 
    -strlim=# :  limit length of names of objects in rpts files to # charactersdave sometimes crashes if the
 
        names are too long.
 
    -tyz :  transpose coords in yz before writing them to the rpts (must specify -rpts option)
 
    -color=# : for the w value (color) use the specified value (use -P in play to see this as a color). default = none.
 
        if you have no color (no w value), addlines can put one in (-P option in addlines).
 
  
  diagnostics:
+
  -h val1 val2: Ignore any voxels in image1 >= val1 and
    -silent :  suppress warning messages.
+
any voxels in image2 >= val2.
    -verbose
 
-debug
 
  
example:
+
  -r: instead of intensities, use the rank
  convex_hull2.pl -tripletsin -jack=jack.rpts:5 -addlines -twod -maxdist=100 file1.triplets  > file1_mst.rpts
+
order of the intensities.
  addlines2 -P -1 image.i2i file1_mst.rpts - | addlines2 -P -2 - jack.rpts - | reduceima -bin 3 3 -L - -| play -P -1 R  -P -1 G -
+
  -a: automatically calculate the size of the
 
+
output image. attempts to make the scale
 
+
factor = 1.
see also:
+
  -b: keep the xdim and ydim scale factors the same.
  convex_hull, objs2mst.pl
+
  -s: calculate Spearman rank-order correlation
  objs2bb.pl, objs2dist.pl, objs2dist121.pl, closest_object, closest_voxel, countobjs, maskobjs, objs_via_ascent
+
coefficients. print results to stdout.
  resolve_pts
+
  -z zslice:   only examine the specified z slice (the first
 +
slice is considered slice 0).
 +
note: entire image name is NOT required.
 +
note: a - in place of an image name means stdin or stdout.
  
 +
examples:
 +
    # to apply this to a set of 3D images, using the same scales and size images for easy comparison
 +
correlationL -S s1 s2 -d 512 512 -B 0 0 image1.i2i corr1.i2i    (and same for other images)
 
   
 
   
===  objs2alldists.pl ===
+
===  create_imagesL ===
Like obs2disp.pl but calculates the distance to ALL the objects (within -maxdist), not just the closest.
 
See ~/krypton/Zhuge/grants/AsthmaRO1/README for 5/27/11 and /home/lml/krypton/Zhuge/BKandRyr/analysis6/run18
 
  (which did NOT use this).
 
  
This program takes 2 object outputfiles produced by countobjs (or maskobjs) and finds the shortest distance
+
This program takes output from many runs of "overlap" and
from the center of mass of objects in file1.out to the center of mass of objects in file2.out.
+
produces two images. One image is a percent colocalization image
 +
and the other is a probability image.  The overlap program MUST be
 +
run via the "many_overlaps" command. The probability calculations
 +
are the same as those performed by "probcolocal", but only -n
 +
needs to be specified since the other values are automatically
 +
extracted from the file produced by "many_overlaps".
  
If both file arguments are the same (e.g., objs2dist.pl file1.out file1.out >file.dist), you can use this
+
The percent image is the percent of voxels above threshold in image1
routine to find the distances between objects within an image (an object match with the same id is automatically
+
(as originally specified to "many_overlaps") which overlap with
ignored in this case so objects don't match to themselves). See also the option -skipsame.
+
voxels above threshold in image2. A 100 in the output image = 100 percent.
 +
The probability of observing as much (or more) overlap as we did due to
 +
random chance is the prob.i2i image. Probabilities are mulitplied by 100.
  
(modified from /storage/big1/lml/was_voxel/Corvera/track/objs2bb.pl)
+
Position along the y-axis (vertical axis) of the image, corresponds to
 +
thresholds for image2. The x-axis represents image1 thresholds.  The
 +
lowest threshold is the bottom left corner.  See the first line in
 +
your datafile for the range of thresholds this represents.
 +
Overlap produces statistics for a range of allowed overlaps.
 +
Create_images, by default, chooses an overlap within 1 voxel.
 +
If you want to use a different overlap distance use the -o option.
  
usage:
+
See also: overlap, probcolocal, many_overlaps
  objs2alldists.pl file1.out file2.out >file.dist 
 
  
 +
Usage:
 +
create_images [options] datafile percent.i2i prob.i2i
 
options:
 
options:
  -dx=# : spacing in the x direction ,default = 1
+
  -o distance:   voxels within this distance count as overlapped.
  -dy=# : spacing in the y direction ,default = 1
+
  -n number:     number of voxels (1000000 default), see probcolocal.
  -dz=# : spacing in the z direction ,default = 1
+
 
  -size1=min:max :  min and max object size allowed for file 1 in pixels (inclusive)
+
Examples:
  -size2=min:max : min and max object size allowed for file 2 in pixels (inclusive)
+
  many_overlaps -t 100 1000 100 -T 100 1000 100 alpha_T.i2i beta_T.i2i tmp_output
  -iod1=min:max :  min and max object iod allowed for file 1 (inclusive)
+
  create_images -n 363264 tmp_output percent.i2i prob.i2i
  -iod2=min:max :  min and max object iod allowed for file 2 (inclusive)
+
   
  -maxdist=#: : don't allow matches further away than this distance (after applying dx, dy, dz spacing factors).
+
===  makeGmixtures ===
  default maxdist is ~ 3000.
+
This program creates a set of data which is sampled from a known mixture of Gaussians.
  -hist :  calculate histogram of distances (hist[int(dist)]++, where int just truncates to integer).
+
Output statistics to stdout. This can be used to test the compare2gaussian program.
  -sizehist :  calculate histogram of object sizes (in voxels) in file1.out. (hist[int(size)]++, where int just
+
 
  truncates to integer). If you don't care about distances between two files (ie, only want -sizehist)
+
Usage: makeGmixtures [options]
  put the same file name for both files on the command line.  
+
options:
  -rpts=file.rpts :  put bounding boxes around objects found and lines between closest objects (similar to objs2bb.pl)
+
  -n #: number of data points to calculate, default = 100
  display this in dave eg: dave -n 0 -u -I file.i2i file.rpts (use the -n 0 and -u options)
+
  -g # amp1 mean1 sd1 ... :
  note: may not show up in dave until you click on "scale" to force a rescale (or draw?).
+
The Gaussian mixture model the data drawn from.
  -jack=max.rpts:# : create an rpts file with the maxima in each object displayed as a small jack.
+
# is the number of Gaussians, this is followed by the amplitude, mean, and sd of
  # controls the size of the jack. 1=1 pixel in size, 2 = 2 pixels, etc.
+
each Gaussian. The default is one Gaussian with mean = 0 and sd = 1.
  -strlim=# :  limit length of names of objects in rpts files to # characters. dave sometimes crashes if the
+
Really only the relative amplitudes matter, not their absolute value since they
  names are too long.
+
determine the relative probability of drawing from each distribution.
  -tyz : transpose coords in yz before writing them to the rpts (must specify -rpts option)
+
  -v: verbose. prints extra info to stdout, each point is labeled with which Gaussian
  -skipsame :  don't match an object in file1.out to an object with the same id in file2.out
+
it is from. Use,e.g.,: fgrep G1 output|cull -2 > tmp.dat    to then graph it.
  This is set automatically if file1.out = file2.out.
+
 
  -silent :  don't print the distances (sets -hist)
+
See Also: compare2gaussian, fitgaussians2, fit2gaussians, fit3gaussians
  -simpleprint :  when printing distances, just print distance, one per line, nothing else. to be read in
 
  by ~/Zhuge/grants/AsthmaRO1/distance_distribution.m. note: that program assumes distances
 
  are in pixels and pixels are 80 nm, unless you specify pixelsize=somethingelse.
 
  -simpleprint2 :  like simpleprint, but the first column is id of the Ryr to which this BK is closest.
 
  -onelineprint :  like objs2alldists.pl  but prints the distance to ALL the objects (within -maxdist),  
 
  not just the closest on one line, so we can keep track of which BK are near which Ryr.
 
  see comdists3.pl (which uses this option).
 
  -verbose
 
  
example:
+
Source code is in ~lml/krypton/Lefkowitz
  countobjs -k -t 2000 2000 wave1.objs wave1.i2i
+
#/home/lml/krypton/bin/makeGmixtures -h
  countobjs -k -t 2000 2000 wave2.objs wave2.i2i
 
  objs2dist.pl wave1.objs wave2.objs > wave1and2.dist
 
  
see also:
+
===  mpoisson  ===
  objs2dist121.pl, closest_object, closest_voxel, countobjs, maskobjs, objs_via_ascent, pt_distances
+
Generate the inter-arrival distribution seen from 10 independent poisson processes
 +
(eg, spark sites), to check that it is equivalent to 1 process whose lambda is the
 +
sum of the independent processes
  
 +
Usage: mpoisson
 +
options:
 +
  -t #:  total time (in seconds) to count number of arrivals, default = 1000.000000
 +
  -l #:  lambda of each poisson process (mean number of events per second), default = 10.000000
 +
  -p #:  number of processed, default = 10
 +
  -d dur sep:  drop intervals of specified duration, sep seconds between the start of one dropped
 +
                  interval and the next. This is to test if the resulting process is still Poisson.
 +
                  It mimics how Rhongua acquired the data (a series of disconnected 2 second intervals).
 +
  -i dt:  print histogram of inter-arrival times instead.  bin width is dt (in seconds)
 
   
 
   
===  objs2dist2.pl ===
+
===  probcolocalL ===
objs2dist2.pl: like objs2dist.pl but when -rpts specified prints out lines to ALL objects
 
      within -maxdist (which now defaults to 20), rather than just the closest. 
 
      So we can see all the BK clusters which are close enough
 
      to a Ryr to be activated. see /home/lml/krypton/Zhuge/paper2010/README for 5/20/10.
 
  
This program takes 2 object outputfiles produced by countobjs (or maskobjs) and finds the shortest distance
+
This program calculates the probability of an event occurring
from the center of mass of objects in file1.out to the center of mass of objects in file2.out.
+
k or more times in n trials if the probability of an event is
 +
p and events are independent (see p.182 of Numerical Recipies)
  
If both file arguments are the same (e.g., objs2dist.pl file1.out file1.out >file.dist), you can use this
+
It is intended as one way to determine if an observed level of
routine to find the distances between objects within an image (an object match with the same id is automatically
+
volume colocalization is due to random chance or not. To use it
ignored in this case so objects don't match to themselves). See also the option -skipsame.
+
in this manner, first find the fraction of voxels in each image
 +
which are used to calculate colocalization (e.g., those above
 +
threshold). Call these fractions f1 and f2.  Then, if these
 +
voxels were randomly placed, the probability that identical voxels
 +
are turned on in both images is f1*f2. An "event" is just such
 +
a coincidence, so p = f1*f2. n = number of voxels in one image.
 +
k= number of voxels which are observed to colocalize.
 +
This program then returns the probability that this amount of
 +
colocalization or more would have occurred merely due to chance.
 +
Note: if only an annulus (i.e., a subset of the total image volume)
 +
    is really being analyzed, then f1 and f2 and n should probably be
 +
    derived based on the volume subset, not the entire image.
 +
 
 +
Usage: probcolocal [options]
 +
Output (to standard out): the probability of this or greater occuring randomly.
 +
options:
 +
  -n number:    number of trials (100 default)
 +
  -k occurrences: number of occurrences (50 default).
 +
  -p probability: prob of an event (0.500000 default).
 +
  -h:   print this help message.
 +
 +
===  roc  ===
 +
/home/lml/krypton/bin/roc
 +
This program reads two images. It attempts to use voxel values in
 +
image1 as a predictor of voxel values in image2; ie, as a type of
 +
measure of colocalization.  Both images are first rescaled to be
 +
between 0 and max (100).Then image2 is thresholded. Image1
 +
is then set,sequentially, to all integer thresholds between 0 and
 +
and max (unless -r is used to restrict the range).  If a voxel
 +
in image1 is above threshold then we guess
 +
that the same voxel is above threshold in image2.
 +
It also does the reverse, ie, use image2 to predict image1.
 +
The default cost function is:  1- 255*prob(detection)*(1-prob(false alarm)).
 +
 
 +
OUTPUT: 
 +
TO STDOUT:
 +
  The best thresholds, lowest cost and probability of detection,
 +
  prob of failure, prob of miss and prob of saying nothing when
 +
  there is nothing.
 +
TO A FILE:
 +
  6 images get created, they are the costs and probability of
 +
  detection and false alarm (3 separate images) when im1 is ussed
 +
  to predict im2, and another 3 for when im2 is used to predict im1.
 +
  By default these will be named:
 +
    im1predictingim2_c.i2i, im1predictingim2_pd.i2i, im1predictingim2_pf.i2i
 +
    im2predictingim1_c.i2i, im2predictingim1_pd.i2i, im2predictingim1_pf.i2i
 +
  The -p option changes the prefix (eg,the "im1predictingim2").
 +
  The images all have thresh1 on x axis, thresh2 on y axis.
 +
  The cost images are always scaled 0-255.
 +
  The pd and pf images are scaled 0-100.
 +
  Additional output files can be created with the -c option.
 +
SEE ALSO: playims . This program quickly puts up all 6 images
 +
  created by roc.  It can take arguments.
 +
 
 +
Usage: roc [options] image1 image2
 +
      options:
 +
-m max:    max of intensity range to rescale data to
 +
    the default is 0 to 100.
 +
-b val1 val2: ignore all background voxels. A voxel will be
 +
  ignored in both images if the voxel in image1
 +
  is <= val1 and the voxel in image2<= val2.
 +
-r low hi: range of intensity threshold values to check
 +
          in image1 (in original image intensity units),
 +
  default is entire intensity range.
 +
-R low hi: range of intensity threshold values to check
 +
          in image2 (in original image intensity units),
 +
  default is entire intensity range.
 +
-t thresh: only examine this threshold value for image1.
 +
-T thresh: only examine this threshold value for image2.
 +
  I am not sure -t and -T work completely correctly.
 +
-c file1 file2:
 +
  Creates 2 roc curve data files for graph and plot.
 +
    The probability of false alarm (x coord) and
 +
  detection (y coord) and cost (intensity) for all
 +
  thresholds in image1 for a threshold in image2
 +
  is written file1. A text string
 +
    indicating the image2 threshold level is written out.
 +
  This is then repeated for other image2 threshold levels.
 +
 
 +
  file2 is the same, but for image2 predicting im1.
 +
  Use: graph -f 1 -b <file1 |plot  to display these roc curves.
 +
-C d f m n: d is the "cost" of a correct detection, ie
 +
  a voxel in image1 is above threshold the same time
 +
  that the equivalent voxel is above thresh2 in
 +
  image2.
 +
  f is the cost of a false alarm (voxel in
 +
  image1 > thresh1 but voxel in image2 is < thresh2).
 +
  m is cost of a miss (im 1 <t1, im 2 > t2) and
 +
  n is cost of nothing present ( both im 1 and im 2
 +
  less than threshold, ie correctly predicting that
 +
  nothing is there).
 +
  Given these costs the program will print to stderr
 +
  the thresh1 and thresh2 values which minimize the
 +
  total cost. It will also print the total cost.
 +
  Total cost = d*pd + m*pm + f*pf + n*pn 
 +
  where pd = probability of detection, etc.
 +
  Typically, d = n = 0 and f = m = 1.
 +
-p pre1 pre2: prefixes for the names of the saved images
 +
  which show the sensitivity analysis. 6 images
 +
  get created (regardless of whether the p option
 +
  is specified), they are the costs and prob. of
 +
  detection and false alarm (3 separate images)
 +
  when im1 is used to predict im2, and another 3
 +
  for when im2 is used to predict im1.
 +
  By default these will be named:
 +
  im1predictingim2c.i2i, im1predictingim2pd.i2i,
 +
  im1predictingim2pf.i2i, im2predictingim1c.i2i, etc.
 +
  This option changes the prefix (ie, what comes
 +
  before the "c","pd",and "pf") for the
 +
  images saved. pre1 will be for im1 predicting im2,
 +
  and pre2 will be vis versa.
 +
-s file:  save roc data as an array of floats to "file".
 +
  Once this file is saved, any particular values
 +
  of costs can be examined very
 +
  quickly. In other words, this is the data that
 +
  the roc program is really taking a long time to
 +
  calculate. So if you want to examine the same
 +
  pair of images under different cost
 +
  scenarios, save the data file during the 1st
 +
  scenario, and run the others using the saved data.
 +
  NOT IMPLEMENTED YET.
 +
-f file:  read in a saved array (see -s above). When this
 +
  option is specified the args image1 and image2 are
 +
  not specified on the command line.
 +
  NOT IMPLEMENTED YET.
 +
note: entire image name is NOT required.
 +
note: a - in place of an image name means stdin.
 +
 
 +
 
 +
Typical examples:
 +
1). roc  im1.i2i im2.i2i > roc.info
 +
    playims dummy
 +
2). roc -p 1to2 2to1 -b 0 0 im1.i2i im2.i2i > roc.info
 +
3). roc -C 0 1 1 0  -b 0 0 im1.i2i im2.i2i > roc.info
 +
4). roc -r 20 80 -R 50 200 im1.i2i im2.i2i > roc.info
 +
5). roc -b 5 5 -c roc1to2.dat roc2to1.dat im1.i2i im2.i2i > roc.info
 +
    graph -f 1 -b <roc1to2.dat |plot
 +
    graph -f 1 -b <roc2to1.dat |plot
 +
    playims dummy
 +
 +
 
 +
===  sparkstats5  ===
 +
#/home/lml/krypton/bin/sparkstats5
 +
 
 +
sparkstats5 is similar to sparkstats3 (only examines the first 10 seconds of data from any cell
 +
and ignores cells which don't have 10 seconds of data).
 +
 
 +
It eliminates from any 2 second interval multiple events at the same site, since we guess that is
 +
due to a second "bursting" process which we want to ignore.
 +
All events in the same cell, at the same x,y are considered events from the same spark
 +
 
 +
Usage: sparkstats5 [options] datafile
 +
options:
 +
  -N #: spark events considered the same site if <= # pixels in x and y from first event and
 +
also in the same cell and 2 second interval (note: histogram produced does not compensate for
 +
the longer time some cells were under observation).
 +
  -O #: like -N. in addition, sparks with 0 events in a 2 second interval are added for
 +
each spark that exists in  an interval but does not exhibit spark events
 +
in some other interval in the same cell.
 +
  -i: spark events condidered the same "site" if in same cell and same 2 second interval
 +
this is the default.
 +
  -I: an extra spark id field does NOT precede the spark data (ie, test.data, not bestdata.data).
 +
  -J: datafile is just one cell; data format: x y amp; just calculate spark sites (use specify -N)
 +
 
 +
[source code in /usr/people/lml/vision/Rhonghua/Sparks/sparkstats5.c]
 +
 +
== Analysis of Points ==
 +
===  components.pl  ===
  
(modified from /storage/big1/lml/was_voxel/Corvera/track/objs2bb.pl)
+
Calculates the number of connected components resolved over a range of point densities.
  
usage:
+
components.pl [options]
  objs2dist2.pl file1.out file2.out >file.dist 
 
  
 
options:
 
options:
  -dx=# :  spacing in the x direction ,default = 1
+
 
  -dy=# : spacing in the y direction ,default = 1
+
-numpts=low:hi:delta
  -dz=# : spacing in the z direction ,default = 1
+
-repeat=# number of times to repeat at each point density
  -size1=min:max :  min and max object size allowed for file 1 in pixels (inclusive)
+
-res=# in microns
  -size2=min:max :  min and max object size allowed for file 2 in pixels (inclusive)
+
-outfile=name name of output file. otherwise to _tmp. always need write permission in current directory.
  -iod1=min:max :  min and max object iod allowed for file 1 (inclusive)
 
  -iod2=min:max :  min and max object iod allowed for file 2 (inclusive)
 
  -maxdist=#: :  don't allow matches further away than this distance (after applying dx, dy, dz spacing factors).
 
  default maxdist is 20.
 
  -hist :  calculate histogram of distances (hist[int(dist)]++, where int just truncates to integer).
 
  -sizehist :  calculate histogram of object sizes (in voxels) in file1.out. (hist[int(size)]++, where int just
 
  truncates to integer). If you don't care about distances between two files (ie, only want -sizehist)
 
  put the same file name for both files on the command line.
 
  -rpts=file.rpts :  put bounding boxes around objects found and lines from objects in file1.out to all objects
 
  in file2.out that are <= maxdist away (these lines will become an object named "near_to_file1.out").
 
  display this in dave eg:  dave -n 0 -u -I file.i2i file.rpts (use the -n 0 and -u options)
 
  note: may not show up in dave until you click on "scale" to force a rescale (or draw?).
 
  -jack=max.rpts:# :  create an rpts file with the maxima in each object displayed as a small jack.
 
  # controls the size of the jack. 1=1 pixel in size, 2 = 2 pixels, etc.
 
  -strlim=# :  limit length of names of objects in rpts files to # characters. dave sometimes crashes if the
 
  names are too long.
 
  -tyz :  transpose coords in yz before writing them to the rpts (must specify -rpts option)
 
  -skipsame :  don't match an object in file1.out to an object with the same id in file2.out
 
  This is set automatically if file1.out = file2.out.
 
  -silent :  don't print the shortest distances (sets -hist)
 
  -verbose
 
 
 
example:
 
  countobjs -k -t 2000 2000 wave1.objs wave1.i2i
 
  countobjs -k -t 2000 2000 wave2.objs wave2.i2i
 
  objs2dist2.pl wave1.objs wave2.objs > wave1and2.dist
 
 
 
see also:
 
  objs2dist121.pl, objs2dist.pl, closest_object, closest_voxel, countobjs, maskobjs, objs_via_ascent, pt_distances
 
  
 
   
 
   
===  objs2mst.pl  ===
+
===  convex_hull.pl  ===
  
This program takes an object outputfiles (unless -rptsin) produced by countobjs (or maskobjs) and finds the minimal
+
This program takes an object outputfile (unless -rptsin or -tripletsin) produced by countobjs (or maskobjs) and finds the minimal
spanning tree connecting the center of mass of the objects. Writes out connections as an rpts file to stdout.
+
spanning tree connecting the center of mass of the objects, and the convex hull. Writes out connections as an rpts file to stdout.
Options can be used to only selected a subset of the objects and to constrain max distance (so multiple
+
It also loops through 20 thresholds  for the pts, and prints to stderr some stats about the minimal spanning tree and
trees can be produced).
+
convex hull of the points above each of these thresholds.
 +
 
 +
Options can be used to only selected a subset of the objects and to constrain the maximum distance (-maxdist).
 +
 
 +
It was written with the hope that triplets (maxima in an image which has a cell in the center) will show a pattern in their
 +
convex hull area, so that when the threshold rises high enough, only maxima inside the cell will still be present and hence
 +
the convex hull will be stable and of much smaller area.
 +
 
 +
This program requires perl modules Graph::Kruskal and Math::Geometry::Planar, use cpanp to install these:
 +
    yum install perl-CPANPLUS-0.91.3-202.fc16.noarch  - for cpanp
 +
    cpanp -i Graph::Kruskal
 +
    cpanp i Math::Geometry::Planar
  
 
usage:
 
usage:
   objs2mst.pl file1.objs > file1_mst.rpts
+
   convex_hull.pl -tripletsin file1.triplets > file1_mst.rpts
 +
 
 +
  input options:
 +
    -dx=#   spacing in the x direction, default = 1
 +
    -dy=#   spacing in the y direction, default = 1
 +
    -dz=#   spacing in the z direction, default = 1
 +
    -rptsin     instead of file1.objs, read file1.rpts where file1.rpts was produced by max2d.
 +
      -size1 and -iod1 are ignored when this option is specified.
 +
    -tripletsin   instead of file1.objs read in file1.xyi,  triplets of x y and intensity.
  
options:
+
  analysis options:
  -dx=# :  spacing in the x direction, default = 1
+
    -size1=min:max     min and max object size allowed for file1.objs in pixels (inclusive)
  -dy=# :  spacing in the y direction, default = 1
+
    -iod1=min:max   min and max object iod allowed for file1.objs (inclusive), or intensity if -tripletsin was specified.
  -dz=# :  spacing in the z direction, default = 1
+
    -maxdist=#: :  don't allow connections between pts further apart than this distance (after applying dx, dy, dz spacing factors).
  -size1=min:max min and max object size allowed for file1.objs in pixels (inclusive)
+
  warning: if the distance is too small, then all the pts will not be connected to begin with;
  -iod1=min:max min and max object iod allowed for file1.objs (inclusive)
+
    this may cause the minimal spanning tree algorithm to fail.
  -rptsin :  instead of file1.objs, read file1.rpts where file1.rpts was produced by max2d.
+
    default maxdist is  3000
  -size1 and -iod1 are ignored when this option is specified.
+
 
  -addlines :  output rpts format which addlines is more likely to be happy with (may not work in dave?)
+
   output options:
  -maxdist=#: :  don't allow matches further away than this distance (after applying dx, dy, dz spacing factors).
+
    -addlines :  output rpts format which addlines is more likely to be happy with (may not work in dave?)
  default maxdist is ~ 3000.
+
    -hist :  calculate histogram of distances (hist[int(dist)]++, where int just truncates to integer). obsolete.
   -hist :  calculate histogram of distances (hist[int(dist)]++, where int just truncates to integer).
+
    -sizehist :  calculate histogram of object sizes (in voxels) in file1.out. (hist[int(size)]++, where int just  
  -sizehist :  calculate histogram of object sizes (in voxels) in file1.out. (hist[int(size)]++, where int just  
+
        truncates to integer). If you don't care about distances between two files (ie, only want -sizehist)
  truncates to integer). If you don't care about distances between two files (ie, only want -sizehist)
+
        put the same file name for both files on the command line.  obsolete.
  put the same file name for both files on the command line.  
+
    -rpts=file.rpts :  put bounding boxes around objects found and lines between closest objects (similar to objs2bb.pl)
  -rpts=file.rpts :  put bounding boxes around objects found and lines between closest objects (similar to objs2bb.pl)
 
 
  display this in dave eg:  dave -n 0 -u -I file.i2i file.rpts (use the -n 0 and -u options)
 
  display this in dave eg:  dave -n 0 -u -I file.i2i file.rpts (use the -n 0 and -u options)
 
  note: may not show up in dave until you click on "scale" to force a rescale (or draw?).
 
  note: may not show up in dave until you click on "scale" to force a rescale (or draw?).
  -jack=max.rpts:# :  create an rpts file with the maxima in each object displayed as a small jack.  
+
    -jack=max.rpts:# :  create an rpts file with the maxima in each object displayed as a small jack.  
  # controls the size of the jack. 1=1 pixel in size, 2 = 2 pixels, etc.
+
    # controls the size of the jack. 1=1 pixel in size, 2 = 2 pixels, etc.
  -strlim=# :  limit length of names of objects in rpts files to # characters.  dave sometimes crashes if the
+
-twod   add this (in addition to -jack) if you want 2D jacks rather than 3D jacks.
  names are too long.
+
    -strlim=# :  limit length of names of objects in rpts files to # characters.  dave sometimes crashes if the
  -tyz :  transpose coords in yz before writing them to the rpts (must specify -rpts option)
+
        names are too long.
  -color=# :  for the w value (color) use the specified value (use -P in play to see this as a color). default = none.
+
    -tyz :  transpose coords in yz before writing them to the rpts (must specify -rpts option)
  if you have no color (no w value), addlines can put one in (-P option in addlines).
+
    -color=# :  for the w value (color) use the specified value (use -P in play to see this as a color). default = none.
   -silent : don't print the shortest distances (sets -hist)
+
        if you have no color (no w value), addlines can put one in (-P option in addlines).
  -verbose
+
 
 +
   diagnostics:
 +
    -silent :   suppress warning messages.
 +
    -verbose
 +
-debug
  
 
example:
 
example:
   countobjs -k -t 2000 2000 wave1.objs wave1.i2i
+
   convex_hull2.pl -tripletsin -jack=jack.rpts:5 -addlines -twod -maxdist=100 file1.triplets > file1_mst.rpts
  objs2mst.pl wave1.objs > wave1mst.rpts
+
   addlines2 -P -1 image.i2i file1_mst.rpts - | addlines2 -P -2 - jack.rpts - | reduceima -bin 3 3 -L - -| play -P -1 R  -P -1 G -
   dave -I wave1.i2i -n 0 -u wave1mst.rpts
+
 
  
 
see also:
 
see also:
 +
  convex_hull, objs2mst.pl
 
   objs2bb.pl, objs2dist.pl, objs2dist121.pl, closest_object, closest_voxel, countobjs, maskobjs, objs_via_ascent
 
   objs2bb.pl, objs2dist.pl, objs2dist121.pl, closest_object, closest_voxel, countobjs, maskobjs, objs_via_ascent
 
   resolve_pts
 
   resolve_pts
  
 
   
 
   
===  objs_within_dist.pl  ===
+
===  objs2alldists.pl  ===
 +
Like obs2disp.pl but calculates the distance to ALL the objects (within -maxdist), not just the closest.
 +
See ~/krypton/Zhuge/grants/AsthmaRO1/README for 5/27/11 and /home/lml/krypton/Zhuge/BKandRyr/analysis6/run18
 +
  (which did NOT use this).
  
This program takes 2 object outputfiles produced by countobjs (or maskobjs) and finds the number of objects
+
This program takes 2 object outputfiles produced by countobjs (or maskobjs) and finds the shortest distance  
in the second file which are within a given distance of each object in the first file.  A histogram is
+
from the center of mass of objects in file1.out to the center of mass of objects in file2.out.
printed out.
 
Distances are from the center of mass of objects in file1.out to the center of mass of objects in file2.out.
 
(modified from objs2dist.pl)
 
  
usage:
+
If both file arguments are the same (e.g., objs2dist.pl file1.out file1.out >file.dist), you can use this
   objs_within_dist.pl file1.out file2.out >file.dist   
+
routine to find the distances between objects within an image (an object match with the same id is automatically
 +
ignored in this case so objects don't match to themselves). See also the option -skipsame.
 +
 
 +
(modified from /storage/big1/lml/was_voxel/Corvera/track/objs2bb.pl)
 +
 
 +
usage:
 +
   objs2alldists.pl file1.out file2.out >file.dist   
  
 
options:
 
options:
Line 1,591: Line 3,012:
 
   -maxdist=#: :  don't allow matches further away than this distance (after applying dx, dy, dz spacing factors).
 
   -maxdist=#: :  don't allow matches further away than this distance (after applying dx, dy, dz spacing factors).
 
  default maxdist is ~  3000.
 
  default maxdist is ~  3000.
   -rpts read in file in rpts format
+
   -hist calculate histogram of distances (hist[int(dist)]++, where int just truncates to integer).
   -verbose extra info written to stderr
+
  -sizehist :  calculate histogram of object sizes (in voxels) in file1.out. (hist[int(size)]++, where int just
   -vverbose :  print other info. can be combined with -verbose.
+
  truncates to integer). If you don't care about distances between two files (ie, only want -sizehist)
 +
  put the same file name for both files on the command line.
 +
  -rpts=file.rpts :  put bounding boxes around objects found and lines between closest objects (similar to objs2bb.pl)
 +
  display this in dave eg:  dave -n 0 -u -I file.i2i file.rpts (use the -n 0 and -u options)
 +
  note: may not show up in dave until you click on "scale" to force a rescale (or draw?).
 +
  -jack=max.rpts:# :  create an rpts file with the maxima in each object displayed as a small jack.
 +
  # controls the size of the jack. 1=1 pixel in size, 2 = 2 pixels, etc.
 +
   -strlim=# :  limit length of names of objects in rpts files to # characters.  dave sometimes crashes if the
 +
  names are too long.
 +
  -tyz :  transpose coords in yz before writing them to the rpts (must specify -rpts option)
 +
  -skipsame don't match an object in file1.out to an object with the same id in file2.out
 +
  This is set automatically if file1.out = file2.out.
 +
  -silent :  don't print the distances (sets -hist)
 +
   -simpleprint when printing distances, just print distance, one per line, nothing else. to be read in
 +
  by ~/Zhuge/grants/AsthmaRO1/distance_distribution.m. note: that program assumes distances
 +
  are in pixels and pixels are 80 nm, unless you specify pixelsize=somethingelse.
 +
  -simpleprint2 :  like simpleprint, but the first column is id of the Ryr to which this BK is closest.
 +
  -onelineprint :  like objs2alldists.pl  but prints the distance to ALL the objects (within -maxdist),
 +
  not just the closest on one line, so we can keep track of which BK are near which Ryr.
 +
  see comdists3.pl (which uses this option).
 +
  -verbose
  
 
example:
 
example:
 
   countobjs -k -t 2000 2000 wave1.objs wave1.i2i
 
   countobjs -k -t 2000 2000 wave1.objs wave1.i2i
 
   countobjs -k -t 2000 2000 wave2.objs wave2.i2i
 
   countobjs -k -t 2000 2000 wave2.objs wave2.i2i
   objs_within_dist.pl wave1.objs wave2.objs > wave1and2.dist
+
   objs2dist.pl wave1.objs wave2.objs > wave1and2.dist
  
 
see also:
 
see also:
Line 1,604: Line 3,045:
  
 
   
 
   
===  connected_random_pts ===
+
===  objs2dist2.pl ===
Generates random pts in a planar region, calculates how many connected components are created
+
objs2dist2.pl: like objs2dist.pl but when -rpts specified prints out lines to ALL objects
if a pt is connected to all other pts within a given radius.
+
      within -maxdist (which now defaults to 20), rather than just the closest. 
 +
      So we can see all the BK clusters which are close enough
 +
      to a Ryr to be activated. see /home/lml/krypton/Zhuge/paper2010/README for 5/20/10.
  
Usage:
+
This program takes 2 object outputfiles produced by countobjs (or maskobjs) and finds the shortest distance
connected_random_pts [options]
+
from the center of mass of objects in file1.out to the center of mass of objects in file2.out.
Options:
 
-x lowx hix:         pts have xcoords within this range, default = (0.0,100.0)
 
-y lowy hiy:         pts have ycoords within this range, default = (0.0,100.0)
 
-r #: radius (in pixels), default = 5.0
 
-s #: long int starting seed for random number generator. default = process id.
 
-n #: number of pts to create, default = 1000
 
  -h: help
 
  -v: verbose
 
  
See also:
+
If both file arguments are the same (e.g., objs2dist.pl file1.out file1.out >file.dist), you can use this
krypton/Huang/README, components.pl, Kth_pt.m, num_observed.m, mean_minimum_distance.m,objs2mst.pl
+
routine to find the distances between objects within an image (an object match with the same id is automatically
 +
ignored in this case so objects don't match to themselves). See also the option -skipsame.
  
Source code in ~krypton/lml/facil 
+
(modified from /storage/big1/lml/was_voxel/Corvera/track/objs2bb.pl)
 
== Image Manipulation ==
 
===  align_quadrants.pl ===
 
This program displays the four quadrant images of a well.  The user then saves 3 pairs of points
 
(s when middle mouse is pressed). Each pair of points should be points that match in two
 
neighboring quadrants.  When done, each quadrant must have one (or two) points specified.
 
Points must be in pair order (see recalc_quadrant2.pl).  When done, the use must write them out
 
via z (when middle mouse is also pressed, no confimation is given in play). 
 
The quadrant images are then aligned based on these points and newimage.i2i is created.
 
  
It will also create a file with the output from play, for future reference.
+
usage:
It will be named, eg, G02_combined_play.pts. It can be passed manually to recalc_quadrant2.pl to redo
+
  objs2dist2.pl file1.out file2.out >file.dist 
the alignment if necessary.
 
 
 
usage:
 
  align_quadrants.pl [options] well newimage.i2i
 
 
 
 
 
examples:
 
  align_quadrants.pl [options] G02 G02_combined.i2i
 
  
 
options:
 
options:
-no_pts_output don't produce the pts file
+
  -dx=# :  spacing in the x direction ,default = 1
-noblend by default the quadrant images are blended together where
+
  -dy=# :  spacing in the y direction ,default = 1
they overlapuse this option to turn that off.
+
  -dz=# :  spacing in the z direction ,default = 1
-print_overlap also print the amount of overlap to stderr
+
  -size1=min:max :  min and max object size allowed for file 1 in pixels (inclusive)
-debug
+
  -size2=min:max :  min and max object size allowed for file 2 in pixels (inclusive)
-debug_all
+
  -iod1=min:max :  min and max object iod allowed for file 1 (inclusive)
 
+
  -iod2=min:max :  min and max object iod allowed for file 2 (inclusive)
 
+
  -maxdist=#: :  don't allow matches further away than this distance (after applying dx, dy, dz spacing factors).
see also:
+
  default maxdist is 20.
combine_images
+
  -hist :  calculate histogram of distances (hist[int(dist)]++, where int just truncates to integer).
recalc_quadrant2.pl
+
  -sizehist :  calculate histogram of object sizes (in voxels) in file1.out. (hist[int(size)]++, where int just
/home/lml/krypton/Corvera/Raz/README 5/16/14
+
  truncates to integer). If you don't care about distances between two files (ie, only want -sizehist)
http://wiki.imagej.net/Grid/Collection_Stitching_Plugin
+
  put the same file name for both files on the command line.
 +
  -rpts=file.rpts : put bounding boxes around objects found and lines from objects in file1.out to all objects
 +
  in file2.out that are <= maxdist away (these lines will become an object named "near_to_file1.out").
 +
  display this in dave eg:  dave -n 0 -u -I file.i2i file.rpts (use the -n 0 and -u options)
 +
  note: may not show up in dave until you click on "scale" to force a rescale (or draw?).
 +
  -jack=max.rpts:# :  create an rpts file with the maxima in each object displayed as a small jack.
 +
  # controls the size of the jack. 1=1 pixel in size, 2 = 2 pixels, etc.
 +
  -strlim=# :  limit length of names of objects in rpts files to # characters.  dave sometimes crashes if the
 +
  names are too long.
 +
  -tyz : transpose coords in yz before writing them to the rpts (must specify -rpts option)
 +
  -skipsame :  don't match an object in file1.out to an object with the same id in file2.out
 +
  This is set automatically if file1.out = file2.out.
 +
  -silent :  don't print the shortest distances (sets -hist)
 +
  -verbose
 +
 
 +
example:
 +
  countobjs -k -t 2000 2000 wave1.objs wave1.i2i
 +
  countobjs -k -t 2000 2000 wave2.objs wave2.i2i
 +
  objs2dist2.pl wave1.objs wave2.objs > wave1and2.dist
  
 +
see also:
 +
  objs2dist121.pl, objs2dist.pl, closest_object, closest_voxel, countobjs, maskobjs, objs_via_ascent, pt_distances
  
 
   
 
   
===  combine_images.pl  ===
+
===  objs2mst.pl  ===
  
This program runs combine_images on all the images in the current directory.  All images which have names
+
This program takes an object outputfiles (unless -rptsin) produced by countobjs (or maskobjs) and finds the minimal
like L##_morestuff.i2i (where L is any letter and # is any digit) will be combined;
+
spanning tree connecting the center of mass of the objects. Writes out connections as an rpts file to stdout.
all the A02 will be combined (to produce A02_comb.i2i), all the A03, etc.
+
Options can be used to only selected a subset of the objects and to constrain max distance (so multiple
The resulting image for the combination of the A02 images will be A02_tag.i2i (see -newtag option, e.g. A02_comb.i2i).
+
trees can be produced).
Any images already existing in the current directory with a name like L##_stuff_oldtag.i2i will be ignored.
 
  
 
usage:
 
usage:
combine_images.pl [options]
+
  objs2mst.pl file1.objs  > file1_mst.rpts
  
 
options:
 
options:
-newtag=something The output filename for L##*.i2i will be L##_newtag.i2i. Default = comb
+
  -dx=# : spacing in the x direction, default = 1
-oldtag=something Any files of the form L##*_oldtag.i2i will be ignored. Default = comb
+
  -dy=# :  spacing in the y direction, default = 1
-pixsize=# pass this as -p # to combine_images program (pixel size).
+
  -dz=# :  spacing in the z direction, default = 1
Specify -pixsize=2.41 (um/pixel) for the 2.5X objective.
+
  -size1=min:max :  min and max object size allowed for file1.objs in pixels (inclusive)
-reduceima=#:#:tag After creating output image, apply reduceima to it  
+
  -iod1=min:max min and max object iod allowed for file1.objs (inclusive)
with -bin # # and the specified output tag on the name.
+
  -rptsin :  instead of file1.objs, read file1.rpts where file1.rpts was produced by max2d.
So, e.g., A02_comb.i2i will become A02_tag.i2i
+
  -size1 and -iod1 are ignored when this option is specified.
-flipx flip images in X prior to combining them
+
  -addlines :  output rpts format which addlines is more likely to be happy with (may not work in dave?)
-flipy flip images in Y prior to combining them (can be used at the same time as -flipx)
+
  -maxdist=#: : don't allow matches further away than this distance (after applying dx, dy, dz spacing factors).
-x=#:#:#:# manually specified picture offsets. see combine images
+
  default maxdist is ~  3000.
-y=#:#:#:# manually specified picture offsets. see combine images
+
  -hist :  calculate histogram of distances (hist[int(dist)]++, where int just truncates to integer).
-o=# number of pixels the images overlap (ignores info in image headers). see combine_images
+
  -sizehist :  calculate histogram of object sizes (in voxels) in file1.out. (hist[int(size)]++, where int just
-f do MOT pad images at border (as of 2/3/14). see combine_images.
+
  truncates to integer). If you don't care about distances between two files (ie, only want -sizehist)
-remove Remove the full-size combined image (e.g., A02_comb.i2i) when done (use with -reduceima).
+
  put the same file name for both files on the command line.
-dummy Just echo what would be done, but don't do anything
+
  -rpts=file.rpts :  put bounding boxes around objects found and lines between closest objects (similar to objs2bb.pl)
-verbose Echo as things are done.
+
  display this in dave eg:  dave -n 0 -u -I file.i2i file.rpts (use the -n 0 and -u options)
-debug
+
  note: may not show up in dave until you click on "scale" to force a rescale (or draw?).
 
+
  -jack=max.rpts:# :  create an rpts file with the maxima in each object displayed as a small jack.
note:
+
  # controls the size of the jack. 1=1 pixel in size, 2 = 2 pixels, etc.
combine_images (in /storage/big1/lml/Linux/bin) and reduceima (in /storage/big1/kef/Linuxbin) must be in your
+
  -strlim=# :  limit length of names of objects in rpts files to # characters.  dave sometimes crashes if the
path for this perl script to work. You can check this by just typing: which combine_images  and  which reduceima;
+
  names are too long.
if they are not found you need to add their directory to your PATH environment variable (echo $PATH will show you
+
  -tyz : transpose coords in yz before writing them to the rpts (must specify -rpts option)
what it is currently). How this is done varies depending upon which shell you are running. Under tcsh it would
+
  -color=# :  for the w value (color) use the specified value (use -P in play to see this as a color). default = none.
be   setenv PATH $PATH:/storage/big1/kef/Linuxbin:/storage/big1/lml/Linux/bin .
+
  if you have no color (no w value), addlines can put one in (-P option in addlines).
 +
  -silent :  don't print the shortest distances (sets -hist)
 +
   -verbose
  
 
example:
 
example:
      cd /storage/big3/kdb/Zeiss/20130326/GEDMAT_002_PRO_SQ2_DAY14
+
  countobjs -k -t 2000 2000 wave1.objs wave1.i2i
# Combine all images in each well. The combined image will be L##_combined (-newtag=combined).
+
  objs2mst.pl wave1.objs > wave1mst.rpts
# Then reduce the combined size back down to the size of one original image;
+
  dave -I wave1.i2i -n 0 -u wave1mst.rpts
# call the new image L##_combined_reduc.i2i (-reduceima=2:2:reduc).
 
# Finally, remove the big (unreduced) combined image (-remove).   
 
# First do a dummy run (-dummy) to see if it is going to do what we want:
 
      combine_images.pl -newtag=combined -reduceima=2:2:reduc -pixsize=2.41 -remove -dummy   
 
# ok, now the real thing (just leave off -dummy):
 
      combine_images.pl -newtag=combined -reduceima=2:2:reduc -pixsize=2.41 -remove
 
  
 
see also:
 
see also:
combine_images
+
  objs2bb.pl, objs2dist.pl, objs2dist121.pl, closest_object, closest_voxel, countobjs, maskobjs, objs_via_ascent
/storage/big1/raz/GEDMAT
+
  resolve_pts
mask_gedmat_images.pl
 
  
 
   
 
   
===  overlap_images.pl  ===
+
===  objs_within_dist.pl  ===
  
  Takes output from parsepos.pl  and calculates how the images overlap so they can then be combined easily (-create option).
+
This program takes 2 object outputfiles produced by countobjs (or maskobjs) and finds the number of objects
 +
in the second file which are within a given distance of each object in the first file. A histogram is
 +
printed out.
 +
Distances are from the center of mass of objects in file1.out to the center of mass of objects in file2.out.
 +
(modified from objs2dist.pl)
  
overlap_images.pl [options]
+
usage:
 +
  objs_within_dist.pl file1.out file2.out >file.dist 
  
options:
+
options:
-xdim=# xdim of image in pixels, default = 1392
+
  -dx=# :  spacing in the x direction ,default = 1
-ydim=# ydim of image in pixels, default = 1040
+
  -dy=# :  spacing in the y direction ,default = 1
-zdim=# zdim of image in pixels, default = 25
+
  -dz=# :  spacing in the z direction ,default = 1
-pixsize=# size of pixels in um, default = 0.645
+
  -size1=min:max :  min and max object size allowed for file 1 in pixels (inclusive)
-create=file.i2i actually combine the images into one big image
+
  -size2=min:max :  min and max object size allowed for file 2 in pixels (inclusive)
-flipx flip each image around its x-axis prior to inserting it into the new image (if -create is specified)
+
  -iod1=min:max :  min and max object iod allowed for file 1 (inclusive)
-flipy flip each image around its y-axis prior to inserting it into the new image (if -create is specified)
+
  -iod2=min:max :  min and max object iod allowed for file 2 (inclusive)
-verbose
+
  -maxdist=#: :  don't allow matches further away than this distance (after applying dx, dy, dz spacing factors).
-dummy just echo what would be done, but don't do anything (nothing normally done anyway unless -create specified).
+
  default maxdist is ~  3000.
 +
  -rpts :  read in file in rpts format
 +
  -verbose :  extra info written to stderr
 +
  -vverbose :  print other info. can be combined with -verbose.
  
see also:
+
example:
parsepos.pl
+
  countobjs -k -t 2000 2000 wave1.objs wave1.i2i
insert_image called by this program if -create is specified.
+
  countobjs -k -t 2000 2000 wave2.objs wave2.i2i
reduceima if -create is used, this may be needed to make the image small enough to see via play.
+
  objs_within_dist.pl wave1.objs wave2.objs > wave1and2.dist
 
example:
 
        parsepos.pl -pre=/storage/big3/kdb/Zeiss/20121004/LectinExp3/ -post=_1_1_20121004_LectinExp3.i2i \
 
                /storage/big3/kdb/Zeiss/20121004/LectinExp3/LextinExp3.pos | overlap_images.pl -create=newimage.i2i
 
reduceima -A -bin 4 4 newimage.i2i newimage_reduced.i2i
 
  
note: you may need /storage/big1/lml/Linux/bin and /storage/big1/kef/Linux/bin in your path
+
see also:
 
+
  objs2dist121.pl, closest_object, closest_voxel, countobjs, maskobjs, objs_via_ascent, pt_distances
source code in /storage/big1/lml/Corvera/Olga/data/ptrs
 
see also: insert_image
 
  http://bigwww.epfl.ch/algorithms.html -> MosaicJ (which may already exist in Fiji)
 
  
 
   
 
   
===  parsepos.pl ===
+
===  connected_random_pts ===
Parse a position file produced by Zeiss system to pull out x y coords for each of the images taken in well C09.
+
Generates random pts in a planar region, calculates how many connected components are created
Output triples (well_id x y) written to stdout.
+
if a pt is connected to all other pts within a given radius.
Position may be in microns, x increasing to the right, y increasing down.
 
  
parsepos.pl filename.pos
+
Usage:
 +
connected_random_pts [options]
 +
Options:
 +
-x lowx hix:         pts have xcoords within this range, default = (0.0,100.0)
 +
-y lowy hiy:         pts have ycoords within this range, default = (0.0,100.0)
 +
-r #: radius (in pixels), default = 5.0
 +
-s #: long int starting seed for random number generator. default = process id.
 +
-n #: number of pts to create, default = 1000
 +
  -h: help
 +
  -v: verbose
  
options:
+
See also:
-well=string well to analyze. default = C09
+
krypton/Huang/README, components.pl, Kth_pt.m, num_observed.m, mean_minimum_distance.m,objs2mst.pl
-pre=prestring add this string in front of the well_id
+
 
-post=postring add this string after the well_id
+
Source code in ~krypton/lml/facil 
these two options are needed if you want to pass this output to
+
overlap_image.pl -create=newimage.i2i, since that will need to be able
+
===  pt_distances  ===
to find the image associated with each well_id.
+
#/home/lml/krypton/bin/pt_distances
-verbose additional output to stderr
 
-vverbose additional output to stderr
 
  
example:
+
Takes output from 2 runs of max2d_simple -p file.rpts and calculates minimum distance between pts.
parsepos.pl -pre=/storage/big3/kdb/Zeiss/20121004/LectinExp3/ -post=_1_1_20121004_LectinExp3.i2i \
+
See comments printed to stdout when the program runs to explain the fields in the output data.
/storage/big3/kdb/Zeiss/20121004/LectinExp3/LextinExp3.pos | overlap_images.pl -create=newimage.i2i
 
 
  
 +
Usage:
 +
pt_distances [options] file1.rpts file2.rpts
 +
Options:
 +
-h: print histograms of distances. entry for pt at dist d:  histogram[int((d+tiny)/binsize)]++
 +
-t #: set tiny to #, default = 0.000010 . Points at exactly 1 pixel seem to be put into the .9 bin
 +
perhaps due to slight roundoff error. By adding tiny, they go into the next bin.
 +
      -b #: set binsize to # pixels, default = 0.100000
 +
      -m #: set maximum distance histogram will go out to (distances > this get put in last bin)
 +
default = 50.000000 pixels
 +
-a #: the area (in pixels) of the region used to generate file1.rpts and file2.rpts
 +
this is used to compare observed rates with theoretical rates if randomly distributed.
 +
NOTE: the theoretical calculations for image1 vs. image2 (and vice versa) are probably WRONG.
 +
default = 10000.000000
 +
-M #: the minimum distance allowed between maxima, for theoretical calculations. This might be
 +
1 (pixel) since maxima normally can't be next to each other. Or it might be the
 +
resolution of the microscope (since objects closer than that will appear as one maxima).
 +
by default M from 0.0 to 3.0 by 1.0 is calculated. if you want an additional value use this option.
 +
  -v: verbose
  
see also:
+
See also: max2d_simple read_hist.pl
overlap_images.pl
 
insert_image
 
  
note: you may need /storage/big1/lml/Linux/bin and /storage/big1/kef/Linux/bin in your path.
+
Example:
 +
  max2d_simple -t 10 -d .5 clathrin.i2i > clathrin.pts
 +
  max2d_simple -t 10 -d .5 glut.i2i > glut.pts
 +
  pt_distances -h -a 26443 -M 1.5 clathrin.pts glut.pts > both.dat
 +
  fgrep "image1 only" both.dat | fgrep mean_min | cull -n -15 -21 -24 -30 > clathrin_mindist.xy
 +
  xmgrace -nxy clathrin_mindist.xy &
 +
  read_hist.pl -im1 -norm=1 -nummax=26443 -avg=5 -nozero < clathrin_mindist.dat > clathrin_histo.xy
 +
  xmgrace clathrin_histo.xy &
  
 +
Source code in ~krypton/lml/facil 
 
   
 
   
===  prep_and_restore.pl ===
+
===  resolve_pts ===
 +
 
 +
Takes minimimal spanning tree rpts file (just an rpts file with each pair of pts which are to be compared specified
 +
as a line segment, i.e., two pts and a "break") as produced by objs2mst.pl and finds which connected
 +
pts are resolved and which are not.  Resolved pts are those which have at least the specified
 +
intensity dip along the minimum cost (roughly: brightest) path connecting those pts. note: if there is no path between the two
 +
pts such that all voxels are greater than the threshold, the pts are also considered to be resolved.
 +
If a pair of pts is resolved, both are written to out.rpts (but not more than once).  If a pair of pts is not resolved
 +
then the brighter of the two (voxel intensity) is written to out.rpts.
 +
The intensity dip is the max amount the intensity goes below the dimmer of the two endpts (anywhere along the minimum cost path).
 +
Each pair of lines (i.e., pair of coordinates) in mst.rpts defines ends of a minimum cost path
 +
along which an intensity dip will be searched for. 
  
Restores all the i2i files in the current directory. Skips any files with  _.i2i or _r.i2i in their name.
+
Usage: resolve_pts [options] image.i2i mst.rpts out.rpts
  Also ignores any files which do not have dat or ctx in their name.
+
options:
 +
  -t #: threshold, default = 0.000000
 +
  -f : normally a pt is discarded if it does not resolve against at least one other pt it is connected to in the input rpts file.
 +
Thus, AXXXXBXXXXC if A and B resolve, but B doesn't resolve against C, and B is smaller than C
 +
B will normally be discarded (even though it resolves against A, it fails against C). If you specify -f
 +
then maxima which fail will be kept as long as they resolve against some other pt.
 +
  -d #: intensity dip required to be resolved. default = 10.000000
 +
  -p #: the percentage dip required relative to the dimmer endpt (e.g. 26 is 26 percent dip)
 +
  -l: instead of dip being the maximum amount below the dimmer of the two pts, dip
 +
is the max amount below a linearly interpolated intensity between the two endpoints.
 +
  -i: truncate coords written to out.rpts to integers (addlines prefers this I think).
 +
  -v: verbose.
 +
  -V: very verbose.  
  
options:
+
Examples:
-dummy just print what would be done
+
countobs image.i2i > image.objs
-bkgnd=# pass this through to find_bkgnd as the -a option. eg, -bkgnd=-.10 will lower the bkgnd value
+
obs2mst.pl -maxdist=10 image.objs > image_mst.rpts
which is subtracted off by 10 percent.  
+
resolve_pts -d 100 -i image.i2i image_mst.rpts image_maxima.rpts
        -smooth=#      smoothness factor (smaller is less smoothing). default = .00002
+
See also:  BestPath, objs2mst.pl, krypton/Huang/TIRF4/README
        -iterations=#  maximum number of iterations, default = 999
+
Source code in krypton/facil
        -scale=#:#      GFP and RFP output scaling for restoration (respectively). default = 1.0 and 1.0.
+
-verbose echo what is being done
+
== Image Manipulation ==
        -maxfiles=# only analyze this many files. primarily for debugging
+
=== align_quadrants.pl  ===
-twod during background subtraction, vary the background value for each 2D slice, instead of
+
This program displays the four quadrant images of a well. The user then saves 3 pairs of points
just using the same value for all z slices.
+
(s when middle mouse is pressed). Each pair of points should be points that match in two
-files=:file.i2i:...:filen.i2i  just restore these files. and do it even if _.i2i or _r.i2i exists.
+
neighboring quadrants. When done, each quadrant must have one (or two) points specified.
-dont_restore  do the data prep (filename_.i2i and filename__.i2i produced), but don't do the restoration (but not filename__r.i2i).
+
Points must be in pair order (see recalc_quadrant2.pl). When done, the use must write them out
-beowulf queue the restorations to run on our beowulf (dispatched via qsub, using pbs (torque), from a daemon running on m13)
+
via z (when middle mouse is also pressed, no confimation is given in play).   
rather than immediately on the localhost.
+
The quadrant images are then aligned based on these points and newimage.i2i is created.
see also: pbsnodes (on m13, only servers running fc16 or fc17 are on the allowed list right now)
 
          qstat -f (on m13) will show lots of info on each job.
 
If this is not specified, each restoration is run sequentially, with this script blocking while waiting for each one.
 
-gpu only use this if you are logged into zirconium. It will run the restoration on zirconium using the GPU version
 
of the restoration.
 
-outdir=dir    rather than place the results in the current directory, place it in the fully qualified specified directory.
 
leave off the last /
 
      -GFPpsf=file    fully qualified path to GPFpsf (used when file name is *_#_#_1*.i2i, eg,  file_0_1_1.i2i)
 
default = /storage/big1/lml/Corvera/Olga/data/GFPpsf_segxyz_.i2i
 
note: psf should have background values of ~0, otherwise 0-padding will produce blocking artifacts.
 
      -RFPpsf=file    fully qualified path to RPFpsf (used when file name is *_#_#_2*.i2i, eg, file_0_1_2.i2i)
 
default = /storage/big1/lml/Corvera/Olga/data/RFPpsf_segxyz_.i2i
 
note: psf should have background values of ~0, otherwise 0-padding will produce blocking artifacts.
 
-silent print less info
 
  
 +
It will also create a file with the output from play, for future reference.
 +
It will be named, eg, G02_combined_play.pts. It can be passed manually to recalc_quadrant2.pl to redo
 +
the alignment if necessary.
  
  examples:
+
usage:
cd /storage/big3/kdb/Zeiss/20121004/LectinExp3
+
  align_quadrants.pl [options] well newimage.i2i
        /home/lml/krypton/Corvera/Olga/prep_and_restore.pl -files=G11_0_1_1_20121004_LectinExp3.i2i:G03_0_1_2_20121004_LectinExp3.i2i  
 
      -beowulf -outdir=/storage/big1/lml/Corvera/Olga/data
 
 
 
  see also:
 
epr_beowulf    a GUI front end for submitting individual restoration jobs to the beowulf queue
 
/storage/big1/epr/bin/cuda/epr_gpu -cuda 1  if logged into zirconium, will run a single job on the graphics card (like -gpu option).
 
prepdata
 
preppsf
 
  
  note: /storage/big1/lml/Linux/bin /storage/big1/lml/Linux/bin64 and /storage/big1/kef/Linux/bin probably need to be in your
 
path to successfully run this script.
 
  
+
examples:
===  prepfiles.pl  ===
+
  align_quadrants.pl [options] G02 G02_combined.i2i
prepfiles.pl [options]
 
 
 
Takes a dual-wavelength image and splits it into two separate images (segim_huge), applies scratchng, and prepdata.
 
Run this from a directory. It will be applied to all images in the directory.  There must be
 
a file called dark.i2i in the directory too. Removes all intermediate files and original 2wavelength image.
 
  
 
options:
 
options:
  -safe : don't delete the original dual-wavelength image
+
-no_pts_output don't produce the pts file
  -echo : echo what is being done
+
-noblend by default the quadrant images are blended together where
 +
they overlap.  use this option to turn that off.
 +
-print_overlap also print the amount of overlap to stderr
 +
-debug
 +
-debug_all
  
 
===  recalc_quadrant2.pl  ===
 
align_quadrants.pl calls this program.  It is easier to use it than to call recalc_quadrant2.pl manually.
 
  
This program converts from pts printed by play (so in the coordinate system gotten from combining the four quadrant images of a well (with no overlap))
+
see also:
to one used by register_images.pl (ie, each pt is in the coordinate system of its own individual image).
+
combine_images
It also pairs the points up and orders them the way that register_images.pl requires.
+
recalc_quadrant2.pl
It assumes the user picked matching pairs of pts in order when using play.  Eg, first a pt was picked (s key while holding down middle mouse button),
+
/home/lml/krypton/Corvera/Raz/README 5/16/14
then its matching point in a neighboring quadrant was picked. This was then repeated 3 times (so 3 pairs of points are present).
+
http://wiki.imagej.net/Grid/Collection_Stitching_Plugin
note: the file names for the files associated with each quadrant are not stored in the output by default, just the quadrant number,
+
 
      use -qnames to change this; they are needed if you want to subsequently have register_images.pl use chained.txt to actually combine the images.
 
  
 +
 +
===  combine_images.pl  ===
  
recalc_quadrant2.pl [options] < pts.txt > chained.txt
+
This program runs combine_images on all the images in the current directory.  All images which have names
 +
like L##_morestuff.i2i (where L is any letter and # is any digit) will be combined;
 +
all the A02 will be combined (to produce A02_comb.i2i), all the A03, etc.
 +
The resulting image for the combination of the A02 images will be A02_tag.i2i (see -newtag option, e.g. A02_comb.i2i).
 +
Any images already existing in the current directory with a name like L##_stuff_oldtag.i2i will be ignored. 
 +
 
 +
usage:
 +
combine_images.pl [options]
  
 
options:
 
options:
-res=# resolution the display was downsampled by prior to getting coords (ie, what was used in chres, see below).
+
-newtag=something The output filename for L##*.i2i will be L##_newtag.i2i.  Default = comb
if chres was .5, then -res=2, ie, 1/chres value. default = 2.
+
-oldtag=something Any files of the form L##*_oldtag.i2i will be ignored. Default = comb
-xdim=# default = 1392
+
-pixsize=# pass this as -p # to combine_images program (pixel size).  
-ydim=# default = 1040
+
Specify -pixsize=2.41 (um/pixel) for the 2.5X objective.
-qnames=name0:name1:name2:name3    file names associated with the images used to produce each of the 4 quadrants.
+
-reduceima=#:#:tag After creating output image, apply reduceima to it 
  they must be in this order. If not specified, then the output will not be
+
with -bin # # and the specified output tag on the name.
  usable by register_images.pl (unless -root is implemented there).
+
So, e.g., A02_comb.i2i will become A02_tag.i2i
-outimage=image.i2i also produce an output combined image (ie, call register_images.pl, see below).
+
-flipx flip images in X prior to combining them
-qnames required for this option.
+
-flipy flip images in Y prior to combining them (can be used at the same time as -flipx)
-blend if -outimage is specified, then blend the overlapping images to produce the output image.
+
-x=#:#:#:# manually specified picture offsets. see combine images
-verbose print overlap info to stderr. maybe to use in -o option to combine_images.
+
-y=#:#:#:# manually specified picture offsets. see combine images
-debug stuff to stderr
+
-o=# number of pixels the images overlap (ignores info in image headers). see combine_images
 +
-f do MOT pad images at border (as of 2/3/14). see combine_images.
 +
-remove Remove the full-size combined image (e.g., A02_comb.i2i) when done (use with -reduceima).
 +
-dummy Just echo what would be done, but don't do anything
 +
-verbose Echo as things are done.
 +
-debug
  
more info. the quadrants in the combined image (see combine_images below) are numbered as follows:
+
note:
quadrant 1 |  quadrant 3
+
combine_images (in /storage/big1/lml/Linux/bin) and reduceima (in /storage/big1/kef/Linuxbin) must be in your
quadrant 0   |   quadrant 2
+
path for this perl script to work. You can check this by just typing: which combine_images   and   which reduceima;
    where x increases to the right, y increases up
+
if they are not found you need to add their directory to your PATH environment variable (echo $PATH will show you
 +
what it is currently). How this is done varies depending upon which shell you are running. Under tcsh it would
 +
be  setenv PATH $PATH:/storage/big1/kef/Linuxbin:/storage/big1/lml/Linux/bin .
  
 
example:
 
example:
 
+
      cd /storage/big3/kdb/Zeiss/20130326/GEDMAT_002_PRO_SQ2_DAY14
# combine the 4 well images without overlap to see what pts might match between quadrants:
+
# Combine all images in each well. The combined image will be L##_combined (-newtag=combined).
    combine_images -o 0 F06_0_2_0_20140505_GEDMAT_P025_WES_OM_Day14.i2i F06_1_2_0_20140505_GEDMAT_P025_WES_OM_Day14.i2i 
+
# Then reduce the combined size back down to the size of one original image;
          F06_2_2_0_20140505_GEDMAT_P025_WES_OM_Day14.i2i F06_3_2_0_20140505_GEDMAT_P025_WES_OM_Day14.i2i tmp.i2i
+
# call the new image L##_combined_reduc.i2i (-reduceima=2:2:reduc).   
 
+
# Finally, remove the big (unreduced) combined image (-remove).
# look at the resulting image and identify matching pts:
+
# First do a dummy run (-dummy) to see if it is going to do what we want:
    chres -S .5 .5 1 tmp.i2i - |play -    # save (s) pairs of pts which match between the quadrants. print them using zcreate file F06_pts.txt:
+
      combine_images.pl -newtag=combined -reduceima=2:2:reduc -pixsize=2.41 -remove -dummy   
marked points
+
# ok, now the real thing (just leave off -dummy):
x= 769 y= 497 z=  1 set=  1 value=    3099
+
      combine_images.pl -newtag=combined -reduceima=2:2:reduc -pixsize=2.41 -remove
x= 799 y= 525 z=  1 set=  1 value=    3684
 
x= 709 y= 819 z=  1 set=  1 value=    4039
 
x= 682 y= 854 z=  1 set=  1 value=    3974
 
x= 518 y= 497 z=  1 set=  1 value=    3257
 
x= 543 y= 524 z=  1 set=  1 value=    3436
 
 
 
# now use this program to multiply by 2, subtract xdim (1392) and/or ydim (1040) as appropriate, pair and order pts.
 
    recalc_quadrant2.pl -outimage=F06_combined.i2i -qnames=F06_0_2_0_20140505_GEDMAT_P025_WES_OM_Day14.i2i:F06_1_2_0_20140505_GEDMAT_P025_WES_OM_Day14.i2i:F06_2_2_0_20140505_GEDMAT_P025_WES_OM_Day14.i2i:F06_3_2_0_20140505_GEDMAT_P025_WES_OM_Day14.i2i  < F06_pts.txt > F06_chained.txt
 
 
 
# same thing, but in two steps.
 
    recalc_quadrant2.pl -qnames=F06_0_2_0_20140505_GEDMAT_P025_WES_OM_Day14.i2i:F06_1_2_0_20140505_GEDMAT_P025_WES_OM_Day14.i2i:F06_2_2_0_20140505_GEDMAT_P025_WES_OM_Day14.i2i:F06_3_2_0_20140505_GEDMAT_P025_WES_OM_Day14.i2i  < F06_pts.txt > F06_chained.txt
 
    register_images.pl -zdim=5 -xscale=1 -yscale=1 -post= -debug -out=F06_combined.i2i F06_chained.txt
 
 
 
  
 
see also:
 
see also:
/home/lml/krypton/Corvera/Raz/README  5/15/14
 
align_quadrants.pl
 
recalc_quadrant.pl
 
 
combine_images
 
combine_images
combine_images.pl
+
/storage/big1/raz/GEDMAT
register_images.pl
+
mask_gedmat_images.pl
insert_image2
 
  
 
   
 
   
===  register_images.pl  ===
+
===  overlap_images.pl  ===
  
Takes a bunch of images taken in one well on the microscope, translates them
+
Takes output from parsepos.pl  and calculates how the images overlap so they can then be combined easily (-create option).
based on ChainedTrans.txt and combines them into one big image.
+
 
 +
overlap_images.pl [options]
  
ChainedTrans.txt should be a partially ordered file with entries like
+
options:
X02:X03    (685,282):(736,287)
+
-xdim=# xdim of image in pixels, default = 1392
This means that location (685,282) in file X02 is the same as location (736,287) in file X03.
+
-ydim=# ydim of image in pixels, default = 1040
By partially ordered I mean that for file1:file2  file1 should already have been the
+
-zdim=# zdim of image in pixels, default = 25
right hand side of a similar line previously (so its position is already defined relative to
+
-pixsize=# size of pixels in um, default = 0.645
the file on the left hand side), unless it is the very first line in
+
-create=file.i2i actually combine the images into one big image
the file. So every right hand side is relative to a left hand side which has already
+
-flipx flip each image around its x-axis prior to inserting it into the new image (if -create is specified)
had its position defined.
+
-flipy flip each image around its y-axis prior to inserting it into the new image (if -create is specified)
Output goes to new_trans.i2i
+
-verbose
 +
-dummy just echo what would be done, but don't do anything (nothing normally done anyway unless -create specified).
  
register_images.pl [options] ChainedTrans.txt
+
see also:
-out=filename.i2i  name of output file produced. default = newimage.i2i
+
parsepos.pl
-post=string the rest of the filename after what is in ChainedTrans.txt, eg, if the file is named
+
insert_image called by this program if -create is specified.
X01_0_0_1.i2i, -post=_0_0_1.i2i (this is also the default for post if not specified).
+
reduceima if -create is used, this may be needed to make the image small enough to see via play.
-xdim=# size of original each original image (before recaling by maxtrima, see example below). default = 1392.
+
-ydim=# default = 1040
+
example:
-zdim=# default = 21
+
        parsepos.pl -pre=/storage/big3/kdb/Zeiss/20121004/LectinExp3/ -post=_1_1_20121004_LectinExp3.i2i \
-xscale=# binning done by matrixima (see example), coords will be scaled by this. default = 4.
+
                /storage/big3/kdb/Zeiss/20121004/LectinExp3/LextinExp3.pos | overlap_images.pl -create=newimage.i2i
-yscale=#
+
reduceima -A -bin 4 4 newimage.i2i newimage_reduced.i2i
-blend when combining images, blend the values where they overlap (default is to just replace any previous
+
 
value with the new value).
+
note: you may need /storage/big1/lml/Linux/bin and /storage/big1/kef/Linux/bin in your path
    -dummy
 
-debug
 
-h
 
  
 +
source code in /storage/big1/lml/Corvera/Olga/data/ptrs
 +
see also: insert_image
 +
  http://bigwww.epfl.ch/algorithms.html -> MosaicJ (which may already exist in Fiji)
  
-shift no circular shift (see tranima). old.  
+
note: tranima will pad images with -32768 which play will show in red (I think) and DAVE will be bothered by.
+
===  parsepos.pl  ===
 +
Parse a position file produced by Zeiss system to pull out x y coords for each of the images taken in well C09.
 +
Output triples (well_id x y) written to stdout.
 +
Position may be in microns, x increasing to the right, y increasing down.
  
example:
+
  parsepos.pl filename.pos
matrixima -row 4 W X Y Z -col 3 01 02 03 -pos 0 -obj 0 -fil 1 new.i2i
 
play new.i2i -> ChainedTrans.txt
 
        register_images.pl ChainedTrans.txt
 
        dave -I new_trans.i2i -K -z 15  # a very big file.
 
  
source code: ~/krypton/bin/
+
options:
see also:
+
-well=string well to analyze. default = C09
combine use this on newer images which have spatial information stored in their header
+
-pre=prestring add this string in front of the well_id
parsepos.pl
+
-post=postring add this string after the well_id
~/krypton/Corvera/Olga
+
these two options are needed if you want to pass this output to
/storage/big1/lml/Corvera/Olga
+
overlap_image.pl -create=newimage.i2i, since that will need to be able
recalc_quadrant.pl
+
to find the image associated with each well_id.
recalc_quadrant2.pl
+
-verbose additional output to stderr
align_quadrants.pl the simplest manual method of aligning the four images in the well
+
-vverbose additional output to stderr
  
   
+
  example:
===  smooth_gaps.pl ===
+
parsepos.pl -pre=/storage/big3/kdb/Zeiss/20121004/LectinExp3/ -post=_1_1_20121004_LectinExp3.i2i \
  This program applies smooth_gaps to all files named *reduced.i2i
+
/storage/big3/kdb/Zeiss/20121004/LectinExp3/LextinExp3.pos | overlap_images.pl -create=newimage.i2i
  and produces files named  *reduced_sg.i2i (unless -tag changed it).
+
  
  usage:
 
smooth_gaps.pl -run [options]
 
  
  options:
+
see also:
-tag=something    tag to add before the .i2i in the new file name.
+
overlap_images.pl
-verbose   print out each filename as it is being smoothed.
+
insert_image
-dummy   just echo what would be done, but don't do anything
 
  
  see also:
+
note: you may need /storage/big1/lml/Linux/bin and /storage/big1/kef/Linux/bin in your path.
smooth_gaps
 
  
 
   
 
   
===  trans.pl  ===
+
===  prep_and_restore.pl  ===
  
Takes a bunch of images taken in one well on the microscope, translates them
+
Restores all the i2i files in the current directory. Skips any files with  _.i2i or _r.i2i in their name.
based on ChainedTrans.txt and combines them into one big image.
+
Also ignores any files which do not have dat or ctx in their name.
  
ChainedTrans.txt should be a partially ordered file with entries like
+
options:
X02:X03    (685,282):(736,287)  
+
-dummy just print what would be done
This means that location (685,282) in file X02 is the same as location (736,287) in file X03.
+
-bkgnd=# pass this through to find_bkgnd as the -a option. eg, -bkgnd=-.10 will lower the bkgnd value
By partially ordered I mean that for file1:file2  file1 should already have been the
+
which is subtracted off by 10 percent.
right hand side of a similar line previously (so its position is already defined relative to
+
        -smooth=#      smoothness factor (smaller is less smoothing). default = .00002
the file on the left hand side), unless it is the very first line in
+
        -iterations=#  maximum number of iterations, default = 999
the file. So every right hand side is relative to a left hand side which has already
+
        -scale=#:#      GFP and RFP output scaling for restoration (respectively). default = 1.0 and 1.0.
had its position defined.
+
-verbose echo what is being done
Output goes to new_trans.i2i
+
        -maxfiles=# only analyze this many files. primarily for debugging
 
+
-twod during background subtraction, vary the background value for each 2D slice, instead of
register_images.pl [options] ChainedTrans.txt
+
just using the same value for all z slices.
-out=filename.i2i name of output file produced. default = newimage.i2i
+
-files=:file.i2i:...:filen.i2i  just restore these files. and do it even if _.i2i or _r.i2i exists.
-post=string the rest of the filename after what is in ChainedTrans.txt, eg, if the file is named
+
-dont_restore  do the data prep (filename_.i2i and filename__.i2i produced), but don't do the restoration (but not filename__r.i2i).
X01_0_0_1.i2i, -post=_0_0_1.i2i (this is also the default for post if not specified).
+
-beowulf queue the restorations to run on our beowulf (dispatched via qsub, using pbs (torque), from a daemon running on m13)
-xdim=# size of original each original image (before recaling by maxtrima, see example below). default = 1392.
+
rather than immediately on the localhost.
-ydim=# default = 1040
+
see also: pbsnodes (on m13, only servers running fc16 or fc17 are on the allowed list right now)
-zdim=# default = 21
+
          qstat -f (on m13) will show lots of info on each job.
-xscale=# binning done by matrixima (see example), coords will be scaled by this. default = 4.
+
If this is not specified, each restoration is run sequentially, with this script blocking while waiting for each one.
-yscale=#
+
-gpu only use this if you are logged into zirconium. It will run the restoration on zirconium using the GPU version
-blend when combining images, blend the values where they overlap (default is to just replace any previous
+
of the restoration.
value with the new value).
+
-outdir=dir    rather than place the results in the current directory, place it in the fully qualified specified directory.
    -dummy
+
leave off the last /
-debug
+
      -GFPpsf=file    fully qualified path to GPFpsf (used when file name is *_#_#_1*.i2i, eg, file_0_1_1.i2i)
-h
+
default = /storage/big1/lml/Corvera/Olga/data/GFPpsf_segxyz_.i2i
 +
note: psf should have background values of ~0, otherwise 0-padding will produce blocking artifacts.
 +
      -RFPpsf=file    fully qualified path to RPFpsf (used when file name is *_#_#_2*.i2i, eg, file_0_1_2.i2i)
 +
default = /storage/big1/lml/Corvera/Olga/data/RFPpsf_segxyz_.i2i
 +
note: psf should have background values of ~0, otherwise 0-padding will produce blocking artifacts.
 +
-silent print less info
  
  
-shift no circular shift (see tranima). old.  
+
  examples:
note: tranima will pad images with -32768 which play will show in red (I think) and DAVE will be bothered by.
+
cd /storage/big3/kdb/Zeiss/20121004/LectinExp3
 +
        /home/lml/krypton/Corvera/Olga/prep_and_restore.pl -files=G11_0_1_1_20121004_LectinExp3.i2i:G03_0_1_2_20121004_LectinExp3.i2i
 +
      -beowulf -outdir=/storage/big1/lml/Corvera/Olga/data
  
example:
+
  see also:
matrixima -row 4 W X Y Z -col 3 01 02 03 -pos 0 -obj 0 -fil 1 new.i2i
+
epr_beowulf    a GUI front end for submitting individual restoration jobs to the beowulf queue
play new.i2i  -> ChainedTrans.txt
+
/storage/big1/epr/bin/cuda/epr_gpu -cuda 1  if logged into zirconium, will run a single job on the graphics card (like -gpu option).
        register_images.pl ChainedTrans.txt
+
prepdata
        dave -I new_trans.i2i -K -z 15  # a very big file.
+
preppsf
  
source code: ~/krypton/bin/
+
  note: /storage/big1/lml/Linux/bin /storage/big1/lml/Linux/bin64 and /storage/big1/kef/Linux/bin probably need to be in your
see also:
+
path to successfully run this script.
combine use this on newer images which have spatial information stored in their header
 
parsepos.pl
 
~/krypton/Corvera/Olga
 
/storage/big1/lml/Corvera/Olga
 
recalc_quadrant.pl
 
recalc_quadrant2.pl
 
align_quadrants.pl the simplest manual method of aligning the four images in the well
 
  
 
   
 
   
===  blur3d ===
+
===  prepfiles.pl ===
 +
prepfiles.pl [options] 
 +
 
 +
Takes a dual-wavelength image and splits it into two separate images (segim_huge), applies scratchng, and prepdata.
 +
Run this from a directory. It will be applied to all images in the directory.  There must be
 +
a file called dark.i2i in the directory too. Removes all intermediate files and original 2wavelength image.
  
Blurs an image by a psf.
+
options:
FFTs are done with 4 byte floats, so total space needed will be 4 times the padded image size (in voxels)
+
  -safe : don't delete the original dual-wavelength image
plus the size of the two original images (image and psf)
+
  -echo : echo what is being done
The input image can be real or short int format. The psf must be short int format.
 
note: performs a convolution (not a correlation).
 
note: fixed a small bug. 10/17/11
 
  
Usage: blur3d [options] image psf newimage
+
options:
+
=== recalc_quadrant2.pl  ===
  -S #: scale (multiply) output values by # (to prevent underflow or overflow)
+
align_quadrants.pl calls this programIt is easier to use it than to call recalc_quadrant2.pl manually.
  voxels which after scaling are > 32767 are set to 32767. voxels < -32766 are set to -32766.
 
    -p # # #: pad the image in x, y, and z by the specified amounts
 
by default image is padded (with 0) by 1/4 psf width all around,
 
so its size for blurring becomes bigger by psf/2.
 
psf is always padded to the same size the image becomes.  
 
Padding is stripped off before newimage is written, so it will be the same size as
 
the original image.
 
    -N # # #: pad so that the image has the specified dimensions after padding (just prior to FFT).
 
  -n #: pad with # instead of boundary pixel values.
 
  -Z:  pad with zero instead of the boundary pixel values.
 
  -c # # #: the center of the psf is at (#,#,#) zero indexed.
 
                the default is to take the brightest pixel as its center.
 
  -C:  don't center the psf at all (default is to center on the max, unless -c is specified).
 
  -P:  normalize the psf so each slice (after padding) averages to 1. -P acts like an optical PSF.
 
        the default is to normalize so the entire psf (after padding) has an average pixel value of 1
 
              (the default keeps total light constant).
 
  -d:  don't normalize at all.
 
  -o:  do a cross correlation instead of a blur (convolution)
 
  -R:  output image as 4 byte floating point instead of short integer.
 
  -v:  verbose. print more info to stderr.
 
  
note: entire image name (with extension) is NOT required.
+
This program converts from pts printed by play (so in the coordinate system gotten from combining the four quadrant images of a well (with no overlap))
note: can read from stdin or write to stdout (use a dash instead of the file name)
+
to one used by register_images.pl (ie, each pt is in the coordinate system of its own individual image).
note: a compressed image will be automatically be uncompressed.
+
It also pairs the points up and orders them the way that register_images.pl requires.
 +
It assumes the user picked matching pairs of pts in order when using play. Eg, first a pt was picked (s key while holding down middle mouse button),
 +
then its matching point in a neighboring quadrant was picked.  This was then repeated 3 times (so 3 pairs of points are present).
 +
note: the file names for the files associated with each quadrant are not stored in the output by default, just the quadrant number,
 +
      use -qnames to change this; they are needed if you want to subsequently have register_images.pl use chained.txt to actually combine the images.
  
Copyright 2010 University of Massachusetts Medical School and the Biomedical Imaging Group
 
All rights reserved. Explicit permission to use this program must be received prior to use.
 
 
===  canny  ===
 
  
This program reads in a 2 or 3d image and outputs the results
+
recalc_quadrant2.pl [options] < pts.txt > chained.txt
of a 2D Canny edge detector on it. Canny is the derivative
 
(in the gradient direction) of the magnitude of the first
 
derivative (so it is a type of 2nd derivative).
 
NOTE: see option -n below for an exact answer.
 
Each z slice is treated
 
independently of the others.  Its application will often be
 
preceded by a Gaussian blur and followed by the calculation
 
of zero crossings.
 
If an INT type image is input, an INT is output.
 
If a REAL type image is input, a REAL is output.
 
  
Usage: canny [options] infile outfile
+
options:
  options:
+
-res=# resolution the display was downsampled by prior to getting coords (ie, what was used in chres, see below).
-d: Debugging flag
+
if chres was .5, then -res=2, ie, 1/chres value. default = 2.
-n: normalize the result. This option causes the true 2nd
+
-xdim=# default = 1392
derivative to be calculated. Without it, only the sign
+
-ydim=# default = 1040
of the second derivative is guaranteed to be correct
+
-qnames=name0:name1:name2:name3    file names associated with the images used to produce each of the 4 quadrants.
(which is sufficient if only zero crossings will be
+
  they must be in this order. If not specified, then the output will not be
calculated from it). Divides each point by Ix*Ix+Iy*Iy.
+
  usable by register_images.pl (unless -root is implemented there).
-s #:  scale factor to multiply all output values by. This is
+
-outimage=image.i2i also produce an output combined image (ie, call register_images.pl, see below).  
useful if you are outputing an INTEGER image with a very
+
-qnames required for this option.
small range of values which would otherwise all be truncated
+
-blend if -outimage is specified, then blend the overlapping images to produce the output image.
to just a few numbers.
+
-verbose print overlap info to stderr. maybe to use in -o option to combine_images.
note: entire image name (with extension) is NOT required.
+
-debug stuff to stderr
note: a - in place of an image name means stdin or stdout.
 
Example usage:
 
To create a gradient edge strength image for a shrink wrap run:
 
  blur_spatial image.i2i -|canny - -|zerosu - - |blur_spatial - out.i2i
 
 
===  cblur  ===
 
 
Usage: cblur [options] arg1.i2i arg2.i2i
 
  For every zero valued point in each xz plane, cblur
 
  replaces the zero value with the -100 times the distance
 
  from the nearest non-zero voxel in the xz plane.
 
Options: None at this time.
 
  
Note: entire image name (with extension) is required.
+
more info. the quadrants in the combined image (see combine_images below) are numbered as follows:
Note: a - in place of an image name means stdin or stdout.
+
quadrant 1  |  quadrant 3
 +
quadrant 0  |  quadrant 2
 +
    where x increases to the right, y increases up
  
 +
example:
  
===  center_of_mass  ===
+
# combine the 4 well images without overlap to see what pts might match between quadrants:
 +
    combine_images -o 0 F06_0_2_0_20140505_GEDMAT_P025_WES_OM_Day14.i2i F06_1_2_0_20140505_GEDMAT_P025_WES_OM_Day14.i2i 
 +
          F06_2_2_0_20140505_GEDMAT_P025_WES_OM_Day14.i2i F06_3_2_0_20140505_GEDMAT_P025_WES_OM_Day14.i2i tmp.i2i
  
This program reads in a 4D image and translates each 3D image
+
# look at the resulting image and identify matching pts:
so its center of mass is moved to be the center of the image.
+
    chres -S .5 .5 1 tmp.i2i - |play -    # save (s) pairs of pts which match between the quadrants. print them using z.  create file F06_pts.txt:
One 3D image is read at a time.
+
marked points
 
+
x= 769 y= 497 z=  1 set=  1 value=    3099
Usage: center_of_mass [options] inimage.i2i outimage.i2i  
+
x= 799 y= 525 z=  1 set=  1 value=    3684
options:
+
x= 709 y= 819 z=  1 set=  1 value=    4039
  -t tdim:  number of time points, default = 1. This is NOT read from the header.
+
x= 682 y= 854 z=  1 set=  1 value=    3974
  -T #:   threshold inimage.i2i prior to analysis. voxels <= # ignored, default = 0
+
x= 518 y= 497 z=  1 set=  1 value=    3257
  -v: verbose
+
x= 543 y= 524 z=  1 set=  1 value=    3436
 +
 
 +
# now use this program to multiply by 2, subtract xdim (1392) and/or ydim (1040) as appropriate, pair and order pts.
 +
    recalc_quadrant2.pl -outimage=F06_combined.i2i -qnames=F06_0_2_0_20140505_GEDMAT_P025_WES_OM_Day14.i2i:F06_1_2_0_20140505_GEDMAT_P025_WES_OM_Day14.i2i:F06_2_2_0_20140505_GEDMAT_P025_WES_OM_Day14.i2i:F06_3_2_0_20140505_GEDMAT_P025_WES_OM_Day14.i2i < F06_pts.txt > F06_chained.txt
 +
 
 +
# same thing, but in two steps.
 +
    recalc_quadrant2.pl -qnames=F06_0_2_0_20140505_GEDMAT_P025_WES_OM_Day14.i2i:F06_1_2_0_20140505_GEDMAT_P025_WES_OM_Day14.i2i:F06_2_2_0_20140505_GEDMAT_P025_WES_OM_Day14.i2i:F06_3_2_0_20140505_GEDMAT_P025_WES_OM_Day14.i2i  < F06_pts.txt > F06_chained.txt
 +
    register_images.pl -zdim=5 -xscale=1 -yscale=1 -post= -debug -out=F06_combined.i2i F06_chained.txt
 +
 
 +
 
 +
see also:
 +
/home/lml/krypton/Corvera/Raz/README  5/15/14
 +
align_quadrants.pl
 +
recalc_quadrant.pl
 +
combine_images
 +
combine_images.pl
 +
register_images.pl
 +
insert_image2
  
note: source code in krypton:/home/lml/krypton/facil directory.
 
 
   
 
   
===  combine_images ===
+
===  register_images.pl ===
This program reads a bunch of image files which have their xy position within a well stored in their header.
 
It then combines the images. Karls acquisition program for the Zeiss microscope should automatically add
 
this information to the header. A maximum of 50 images can be combined. Images must all be the same size.
 
Images are also assumed to be aligned in z already. Images are added to the output image in the order specified
 
on the command line, with later pixel values replacing previous values if there is an overlap of the images.
 
  
Usage: combine_images [options] im1.i2i im2.i2i [more input images]  outim.i2i
+
Takes a bunch of images taken in one well on the microscope, translates them
options:
+
based on ChainedTrans.txt and combines them into one big image.
-d debug. stuff to stderr.
 
-f do NOT fill pixel locations which have no data with nearest data value (added 2/3/14)
 
Filling is done by default to try to avoid introducing sharp intensity edges into the image.
 
-X flip each input image in X before using it (-Y can also be specified at the same time)
 
-Y flip each input image in Y before using it
 
-p # over-ride the specified pixel size with this one (in um). The 2.5X objective has a  
 
pixel size of 2.58 um stored in the image header (for images acquired prior to 4/13/13)
 
but it should be 2.41
 
-x #:#[:#...]  rather than use the x positions stored in the image header use these x pixel positions.
 
these should be the x offset of one image relative to another, in the same order as the
 
image names on the command line (there MUST be one number for each image). For example:
 
combine_images -x=0:500:0:500 im11.i2i im21.i2i im12.i2i im22.i2i outim.i2i  if im21.i2i and im22.i2i
 
are displaced 500 pixels to the right of the other two images.
 
-y #:#[:#...]  same, but for displacement in the y direction. Since these are pixels, they should be integers.
 
note: many times images are 1392x1040 and overlap by 50 pixels, and image 0 is bottom left
 
      image 1 is top left, image 2 is bottom right, and image3 is top right, then:
 
      -x 0:0:1342:1342 -y 0:990:0:990  should work
 
-o # rather than specifying -x and -y, thus just specifies the overlap (e.g., 50) and figures out
 
the rest for you (assumes images ordered BL,TL,BR,TP - as above - and x and y overlap the same
 
works for any size image.
 
  
note: entire image name (with extension) is NOT required.
+
ChainedTrans.txt should be a partially ordered file with entries like
note: a - in place of an image name means stdin or stdout.
+
X02:X03    (685,282):(736,287)
note: compressed images are temporarily uncompressed into /usr/tmp.
+
This means that location (685,282) in file X02 is the same as location (736,287) in file X03.
 +
By partially ordered I mean that for file1:file2  file1 should already have been the
 +
right hand side of a similar line previously (so its position is already defined relative to
 +
the file on the left hand side), unless it is the very first line in
 +
the file. So every right hand side is relative to a left hand side which has already
 +
had its position defined.
 +
Output goes to new_trans.i2i
  
See also: parsepos.pl (not needed now that Karl fills the image header with this info)
+
register_images.pl [options] ChainedTrans.txt
    combine_images.pl    applies combine_images (and, optionally, reduceima) to all files in a directory.
+
-out=filename.i2i  name of output file produced. default = newimage.i2i
    register_images.pl
+
-post=string the rest of the filename after what is in ChainedTrans.txt, eg, if the file is named
    align_well_images.pl    pre-processor for combine_images if the y-coord in the header is invalid.
+
X01_0_0_1.i2i, -post=_0_0_1.i2i (this is also the default for post if not specified).
    insert_image
+
-xdim=# size of original each original image (before recaling by maxtrima, see example below). default = 1392.
 +
-ydim=# default = 1040
 +
-zdim=# default = 21
 +
-xscale=# binning done by matrixima (see example), coords will be scaled by this. default = 4.
 +
-yscale=#
 +
-blend when combining images, blend the values where they overlap (default is to just replace any previous
 +
value with the new value).
 +
    -dummy
 +
-debug
 +
-h
  
Source code in ~/krypton/facil/combine_images.c
 
combine_images:
 
  
== Miscellaneous ==
+
-shift no circular shift (see tranima). old.
===  analyze_cross_sections_of_voronoi.pl  ===
+
note: tranima will pad images with -32768 which play will show in red (I think) and DAVE will be bothered by.
  
This program reads files produced by cross_sections_of_voronoi (-P)
+
example:
Results prints volume (x) vs predicted volume (y) to stdout.
+
matrixima -row 4 W X Y Z -col 3 01 02 03 -pos 0 -obj 0 -fil 1 new.i2i
 +
play new.i2i  -> ChainedTrans.txt
 +
        register_images.pl ChainedTrans.txt
 +
        dave -I new_trans.i2i -K -z 15  # a very big file.
  
analyze_cross_sections_of_voronoi.pl [options] file1.txt [... filen.txt]
+
source code: ~/krypton/bin/
 
+
see also:
options:
+
combine use this on newer images which have spatial information stored in their header
-debug info about all fields on each line printed to stderr
+
parsepos.pl
-stdout everything to stdout
+
~/krypton/Corvera/Olga
-print_avg for each file, just graph mean and std error of the mean, rather than all data pts
+
/storage/big1/lml/Corvera/Olga
 +
recalc_quadrant.pl
 +
recalc_quadrant2.pl
 +
align_quadrants.pl the simplest manual method of aligning the four images in the well
 +
 
 +
 +
===  smooth_gaps.pl  ===
 +
  This program applies smooth_gaps to all files named *reduced.i2i
 +
  and produces files named  *reduced_sg.i2i (unless -tag changed it).
  
 +
  usage:
 +
smooth_gaps.pl -run [options]
  
examples:
+
  options:
cross_sections_of_voronoi -P voronoi.i2i > filename1.txt
+
-tag=something    tag to add before the .i2i in the new file name.
cross_sections_of_voronoi -P voronoi.i2i > filename2.txt
+
-verbose   print out each filename as it is being smoothed.
        axnalyze_cross_sections_of_voronoi.pl *.txt
+
-dummy   just echo what would be done, but don't do anything
  
see also:
+
  see also:
/storage/big1/lml/Raz/voronoi/README, true_vs_predicted.xmgr
+
smooth_gaps
/home/lml/krypton/Corvera/Raz/stereology/README, run_voronoi.pl, run_voronoi2.pl, compare_volume_measurements.pl, plot_results.pl
 
cross_sections_of_voronoi
 
/home/lml/krypton/packages/fiji/Fiji.app/macros/stereology_lml.txt
 
/home/lml/krypton/packages/fiji/run_stereology.txt
 
/storage/big1/lml/Raz/voronoi/
 
  
 
   
 
   
===  neartrack.pl  ===
+
===  trans.pl  ===
neartrack.pl
+
 
 +
Takes a bunch of images taken in one well on the microscope, translates them
 +
based on ChainedTrans.txt and combines them into one big image.
  
find which track a specified coordinate is near (ie, with dx,dy) (eg, DAVE crosshairs gives us a coord, what track is it?)
+
ChainedTrans.txt should be a partially ordered file with entries like
assumes coords passed are zero indexed
+
X02:X03    (685,282):(736,287)
 +
This means that location (685,282) in file X02 is the same as location (736,287) in file X03.
 +
By partially ordered I mean that for file1:file2  file1 should already have been the
 +
right hand side of a similar line previously (so its position is already defined relative to
 +
the file on the left hand side), unless it is the very first line in
 +
the file. So every right hand side is relative to a left hand side which has already
 +
had its position defined.
 +
Output goes to new_trans.i2i
  
    usage:  neartrack.pl -x=# -y=# [-z=#] [-dx=#] [-dy=#] [-oneindexed] file.rpts
+
register_images.pl [options] ChainedTrans.txt
 +
-out=filename.i2i  name of output file produced. default = newimage.i2i
 +
-post=string the rest of the filename after what is in ChainedTrans.txt, eg, if the file is named
 +
X01_0_0_1.i2i, -post=_0_0_1.i2i (this is also the default for post if not specified).
 +
-xdim=# size of original each original image (before recaling by maxtrima, see example below). default = 1392.
 +
-ydim=# default = 1040
 +
-zdim=# default = 21
 +
-xscale=# binning done by matrixima (see example), coords will be scaled by this. default = 4.
 +
-yscale=#
 +
-blend when combining images, blend the values where they overlap (default is to just replace any previous
 +
value with the new value).
 +
    -dummy
 +
-debug
 +
-h
  
 
===  parse_macros4.pl  ===
 
Can't use 'defined(%hash)' (Maybe you should just omit the defined()?) at /home/lml/krypton/bin/parse_macros4.pl line 562.
 
  
===  path_diff.pl  ===
+
-shift no circular shift (see tranima). old.  
compare the differences between the paths found from two different runs of exo5
+
note: tranima will pad images with -32768 which play will show in red (I think) and DAVE will be bothered by.
  
path_diff.pl  file1 file2
+
example:
 +
matrixima -row 4 W X Y Z -col 3 01 02 03 -pos 0 -obj 0 -fil 1 new.i2i
 +
play new.i2i  -> ChainedTrans.txt
 +
        register_images.pl ChainedTrans.txt
 +
        dave -I new_trans.i2i -K -z 15 # a very big file.
  
options:
+
source code: ~/krypton/bin/
  -dx=# x coord at fusion time can differ by this and still be considered same path (default = 0)
+
see also:
  -dy=# y coord at fusion time can differ by this and still be considered same path (default = 0)
+
combine use this on newer images which have spatial information stored in their header
  -df=# fusion time can differ by this and still be considered same path (default = 0)
+
parsepos.pl
 +
~/krypton/Corvera/Olga
 +
/storage/big1/lml/Corvera/Olga
 +
recalc_quadrant.pl
 +
recalc_quadrant2.pl
 +
align_quadrants.pl the simplest manual method of aligning the four images in the well
  
  -debug
 
  -Debug
 
 
   
 
   
===  trackinfo.pl ===
+
===  blur3d ===
  
# analyze output from "track or track -r".
+
Blurs an image by a psf.
# assumes coords passed are zero indexed.  
+
FFTs are done with 4 byte floats, so total space needed will be 4 times the padded image size (in voxels)
 +
plus the size of the two original images (image and psf)
 +
The input image can be real or short int format. The psf must be short int format.
 +
note: performs a convolution (not a correlation).
 +
note: fixed a small bug. 10/17/11
  
# usage:   trackinfo.pl -x=# -y=# [options] file.rpts
+
Usage: blur3d [options] image psf newimage
 +
options:
 +
  -S #: scale (multiply) output values by # (to prevent underflow or overflow)
 +
  voxels which after scaling are > 32767 are set to 32767. voxels < -32766 are set to -32766.
 +
    -p # # #: pad the image in x, y, and z by the specified amounts
 +
by default image is padded (with 0) by 1/4 psf width all around,
 +
so its size for blurring becomes bigger by psf/2.
 +
psf is always padded to the same size the image becomes.
 +
Padding is stripped off before newimage is written, so it will be the same size as
 +
the original image.
 +
    -N # # #: pad so that the image has the specified dimensions after padding (just prior to FFT).
 +
  -n #: pad with # instead of boundary pixel values.
 +
  -Z:  pad with zero instead of the boundary pixel values.
 +
  -c # # #:  the center of the psf is at (#,#,#) zero indexed.
 +
                the default is to take the brightest pixel as its center.
 +
  -C:  don't center the psf at all (default is to center on the max, unless -c is specified).
 +
  -P:  normalize the psf so each slice (after padding) averages to 1. -P acts like an optical PSF.
 +
        the default is to normalize so the entire psf (after padding) has an average pixel value of 1
 +
              (the default keeps total light constant).
 +
  -d:  don't normalize at all.
 +
  -o:  do a cross correlation instead of a blur (convolution)
 +
  -R:  output image as 4 byte floating point instead of short integer.
 +
  -v:  verbose. print more info to stderr.
  
#  options:  
+
note: entire image name (with extension) is NOT required.
 +
note:  can read from stdin or write to stdout (use a dash instead of the file name)
 +
note: a compressed image will be automatically be uncompressed.
  
#    -reg=# : just print info about the specified region number
+
Copyright 2010 University of Massachusetts Medical School and the Biomedical Imaging Group
#    -track=# : just print info about the specified track
+
All rights reserved. Explicit permission to use this program must be received prior to use.
#    -trackcoords=minsize:maxsize:miniod:maxiod:minlife:maxlife
+
# : print the coords (rpts format) of all tracks which satisfy
+
===  canny ===
#   the criteria (or all its regions satisfy them). lifetime is # of timepts it exists for.
 
#    -tdist=mindist:maxdist: use with -trackcoords to specify min and max (xy manhattan) distance track travels
 
#    -micro:   print coords of all paths. color code them so if they connect at all
 
#   they are the same color (eg, all along the same microtubule)
 
#    -x=# -y=# : find which track the specified coordinate is near (eg, DAVE
 
#   crosshairs gives us a coord, what track is it?)
 
#    -z=# : also include z in distance calculation.
 
#    -dx=# : dx, default = 3
 
#    -dy=# : dy, default = 3
 
#    -dz=# : dy, default = 1000 (ie, essentially ignored)
 
#    -oneindexed : otherwise -x, -y, -z assumed to be zero indexed (rpts file is always one indexed)
 
#    -t : print additional region and track info (which should be in file.rpts
 
#   if -r was specified when running "track") for objects found
 
#   (eg, via -x=#,-y=#,or -region=#)
 
#    -sf=name : sort field. name of field to sort on when printing out a track.
 
#   implies -t. default = time ("set");
 
#    -rs : reverse the "sense" of the sort (normally smallest to largest). implies -t.
 
#    -pf=field1:field2:field3 : print fields. which fields to print from the region info (implies -t).
 
#   default is all fields.  you can put as many fields as you want here,
 
#   separated by colons.
 
#    -verbose: : print info about progress to stderr
 
  
# example:
+
This program reads in a 2 or 3d image and outputs the results
#    track -a 3 -n 400 -r -s 0 5 -S -t 25 -v 5 500 -d 15 9 -u .33 .33 .25 5 -h .01 a.vel a.i2i > a.rpts
+
of a 2D Canny edge detector on it. Canny is the derivative
#    trackinfo.pl -x=52 -y=28 -t -pf=set:size:nextid a.rpts
+
(in the gradient direction) of the magnitude of the first
#    trackinfo.pl -reg=103 -t -pf=set:size:nextid a.rpts
+
derivative (so it is a type of 2nd derivative).
 
+
NOTE: see option -n below for an exact answer.
   
+
Each z slice is treated
== Data Reformatting ==
+
independently of the others. Its application will often be
===  chres_rpts.pl  ===
+
preceded by a Gaussian blur and followed by the calculation
 
+
of zero crossings.
  Reads in some rpts files and rescales their x and y coords so that they will match an image which
+
If an INT type image is input, an INT is output.  
  has been similarly rescaled.
+
If a REAL type image is input, a REAL is output.
 
 
  usage:
 
    chres_rpts.pl  [options] infile.rpts > outfile.rpts
 
  
 +
Usage: canny [options] infile outfile
 
   options:
 
   options:
-sx=# rescale x -> x*#
+
-d: Debugging flag
-sy=# rescale y -> y*#
+
-n: normalize the result. This option causes the true 2nd
-truncate  after rescaling, truncate to an integer (newer versions of addlines can handle floating pt)
+
derivative to be calculated. Without it, only the sign
-round     after rescaling, round to an integer
+
of the second derivative is guaranteed to be correct
-max=#:#    don't let x become > than #1. don't let y become > #2.
+
(which is sufficient if only zero crossings will be
-min=#:#    don't let x become < than #1. don't let y become < #2.
+
calculated from it). Divides each point by Ix*Ix+Iy*Iy.
 
+
-s #: scale factor to multiply all output values by. This is
  example:
+
useful if you are outputing an INTEGER image with a very
# suppose you have a floating pt rpts file
+
small range of values which would otherwise all be truncated
    find_peaks_inrpts.pl -rpts=QS_H10+1Q_3T3_center_2_peaks.rpts:.15:.033
+
to just a few numbers.
Results/mat_quad/QS_H10+1Q_3T3_center_2_control_q_kept.rpts > /dev/null
+
note: entire image name (with extension) is NOT required.
# and you want to see it in better spatial detail:
+
note: a - in place of an image name means stdin or stdout.
    chres -S 4 4 1 Data/QS/QS_H10+1Q_3T3__center_2_ra7.i2i QS_H10+1Q_3T3__center_2_ra7_ch441.i2i
+
Example usage:
    chres_rpts.pl -sx=4 -sy=4 QS_H10+1Q_3T3_center_2_peaks.rpts > QS_H10+1Q_3T3_center_2_peaks_ch441.rpts
+
To create a gradient edge strength image for a shrink wrap run:
    addlines2 QS_H10+1Q_3T3__center_2_ra7_ch441.i2i QS_H10+1Q_3T3_center_2_peaks_ch441.rpts - |playc -
+
  blur_spatial image.i2i -|canny - -|zerosu - - |blur_spatial - out.i2i
 +
 +
===  cblur  ===
 +
 +
Usage: cblur [options] arg1.i2i arg2.i2i
 +
  For every zero valued point in each xz plane,  cblur
 +
  replaces the zero value with the -100 times the distance
 +
  from the nearest non-zero voxel in the xz plane.
 +
Options: None at this time.
  
  see also:
+
Note: entire image name (with extension) is required.
  filter_rptsinz.pl
+
Note: a - in place of an image name means stdin or stdout.
  
 
===  combine_Raz_and_lml_data.pl  ===
 
  
combine data pts from Raz with my data points. results printed to stdout
+
=== center_of_mass  ===
  
usage:
+
This program reads in a 4D image and translates each 3D image
combine_Raz_and_lml_data.pl [options]  file1 file2
+
so its center of mass is moved to be the center of the image.
 +
One 3D image is read at a time.
  
where file1 is find_vesselness_results2.txt (or something else in that format, ie with internal filenames formatted that way)
+
Usage: center_of_mass [options] inimage.i2i outimage.i2i
      file2 is raz_results.out (or something else in that format)
+
options:
 
+
  -t tdim:  number of time points, default = 1. This is NOT read from the header.
options:
+
  -T #:  threshold inimage.i2i prior to analysis. voxels <= # ignored, default = 0
      -cond1='xxx'  a perl expression to be evaluated to determine which rows of data to analyze. default is all rows.
+
  -v: verbose
                        if it evaluates to > 0 the row will be used.
 
                        e.g., -cond='if ($tissue eq "OM") {1;} else {0;}'
 
                        e.g., -cond='if ($date == 7) {1;} else {0;}'
 
                        note the use of single (not double) quotes to protect this from the shell.
 
                        If this is not specified all data lines will produce an x and y value.
 
                        Some simple perl info:
 
                          use eq (equal) and ne (not equal) for comparing strings (which are in double quotes).  
 
                          use ==  !=  >  >=  <= for numeric comparisons. && (logical AND), || (logical OR).
 
                          put $ in front of all variables (string variables and numeric variables).
 
                          statements are separated by semicolons.  Blocks specified with braces.
 
                          if ( ) { }  else { }  where the "else {}" is optional. But don't forget the braces.
 
  
 +
note: source code in krypton:/home/lml/krypton/facil directory.
 +
 +
===  combine_images  ===
 +
This program reads a bunch of image files which have their xy position within a well stored in their header.
 +
It then combines the images. Karls acquisition program for the Zeiss microscope should automatically add
 +
this information to the header. A maximum of 50 images can be combined. Images must all be the same size.
 +
Images are also assumed to be aligned in z already. Images are added to the output image in the order specified
 +
on the command line, with later pixel values replacing previous values if there is an overlap of the images.
  
-unique_header1=something string which uniquely exists on the header line of file1 (so it can be identified)
+
Usage: combine_images [options] im1.i2i im2.i2i [more input images]  outim.i2i
-data_field1=something which column has the actual data we care about and will graph. default = rate
+
options:
        -data_factor1=# multiply data_field value in file 1 by data_factor prior to analyzing (or printing) it.
+
-d debug. stuff to stderr.
-group_by1=something  how to match the data, eg, a datapoint in file1 will by matched to a datapt in file2 by this criteria
+
-f do NOT fill pixel locations which have no data with nearest data value (added 2/3/14)
 
+
Filling is done by default to try to avoid introducing sharp intensity edges into the image.
-cond2 same but for file2, defaults to -cond1
+
-X flip each input image in X before using it (-Y can also be specified at the same time)  
-unique_header2=something same but for file2. defaults to -unique_header1
+
-Y flip each input image in Y before using it
-data_field2 same but for file2, defaults to -data_field1
+
-p # over-ride the specified pixel size with this one (in um). The 2.5X objective has a
-data_factor2 same but for file2, defaults to 1
+
pixel size of 2.58 um stored in the image header (for images acquired prior to 4/13/13)
-group_by2 same but for file2, defaults to -group_by1
+
but it should be 2.41
 +
-x #:#[:#...]  rather than use the x positions stored in the image header use these x pixel positions.
 +
these should be the x offset of one image relative to another, in the same order as the
 +
image names on the command line (there MUST be one number for each image). For example:
 +
combine_images -x=0:500:0:500 im11.i2i im21.i2i im12.i2i im22.i2i outim.i2i  if im21.i2i and im22.i2i
 +
are displaced 500 pixels to the right of the other two images.
 +
-y #:#[:#...]  same, but for displacement in the y direction. Since these are pixels, they should be integers.
 +
note: many times images are 1392x1040 and overlap by 50 pixels, and image 0 is bottom left
 +
      image 1 is top left, image 2 is bottom right, and image3 is top right, then:
 +
      -x 0:0:1342:1342 -y 0:990:0:990  should work
 +
-o # rather than specifying -x and -y, thus just specifies the overlap (e.g., 50) and figures out
 +
the rest for you (assumes images ordered BL,TL,BR,TP - as above - and x and y overlap the same
 +
works for any size image. 
  
-silent don't print warning to stderr when a data pt in one file does not have a match in the other file.
+
note: entire image name (with extension) is NOT required.
+
note: a - in place of an image name means stdin or stdout.
 +
note: compressed images are temporarily uncompressed into /usr/tmp.
  
  -debug stuff to stderr
+
See also: parsepos.pl (not needed now that Karl fills the image header with this info)
    -Debug other stuff to stdout
+
    combine_images.pl    applies combine_images (and, optionally, reduceima) to all files in a directory.
 +
    register_images.pl
 +
    align_well_images.pl    pre-processor for combine_images if the y-coord in the header is invalid.
 +
    insert_image
  
  example:  
+
Source code in ~/krypton/facil/combine_images.c
 +
  combine_images:  
  
get_find_vesselness_results.pl  -gdm=014:019  -t2dm=005:020:021 > find_vesselness_results2.txt
+
=== flood3dL  ===
get_dir_results.pl -verbose > raz_results.out
+
Usage:
combine_Raz_and_lml_data.pl -data_factor1=2 -unique_header1=filename -data_field1=pixels_in_mask -group_by1=filename
+
  flood3d [options] input.i2i output.i2i
                      -data_field2=mass -group_by2=imagename find_vesselness_results2.txt raz_results.out > Raz_lml_combined.txt
 
  
see also:
+
Description:
 +
  flood3d reads in an image and outputs an image with each region's
 +
  voxels all at the same intensity (intensity = 1 for 1st region, 2 for 2nd
 +
  region, etc.). Regions are 26 connected voxels greater than the threshold.
 +
  If no output image is specified no output image will be produced.
  
combine_with_Raz_curated_data.pl
+
Options:
compare_data_points.pl
+
  -t #:    Value to threshold image (default 0).
boxandwhisker2.pl
+
  -s #:    Value to start numbering objects (default 1).
xmgrace --help
+
  -r x y z: Mark the region at x y z (1 indexed).
http://plasma-gate.weizmann.ac.il/Grace/doc/UsersGuide.html
+
            this option can be specified up to 5 times.
/home/lml/krypton/Corvera/Raz/gedmat_dummyhealthr.data
+
            If z < 0, then starting points x y 1, x y 2, .. x y zdim
/home/lml/krypton/Corvera/Raz/README 4/2/14
+
            are used. Use z < 0 in conjunction with -c 4 or -c 8.
gedmat_to_xy.pl used to produce gedmat_dummyhealthr.data. can also pull out arbitrary rows and columns
+
            all such regions found are marked with the same region number.
 +
  -c #:     Do # connected flood fill (default 26).
 +
            Options are 4, 8, or 26 connected flood fills.
 +
            4 or 8 connected flood fills are for 2D flood fills
 +
            with the fill being done in x, y for each z plane.
 +
            (each slice will be done, unless -r is specified).
 +
  -m #:    only keep regions whose size in voxels is > #. Default = 0.
 +
  -b:      Output will be binary (regions counted will be 1,
 +
            regions not counted will be 0.
 +
  -q:      Quite mode, fewer messages printed.
  
+
Caveats:
===  coords2pts.pl  ===
+
  Threshold and number of objects has to be less than 32,000.
Converts from coords format produced by track_pts to pts format needed by dave.
 
Only handles output from track_pts with one object in it right now.
 
  
coords2pts.pl [options] <in.coords  > out.pts
+
Note:
 +
  Entire image name (with extension) is required.
 +
  A - in place of an image name means stdin or stdout.
  
options:
+
Keywords:
   -one: add 1 to x,y,z coords (e.g, to go from zero indexed to the one-indexed coords dave expects)
+
   count objects, flood fill
  -name=trackname    the name of the object created. dave wants different objects to have different names.
 
  -w=# for the w coord (intensity) just use the specified number (dave has problems if the number > 255)
 
track_pts usually puts the max intensity in the w field.
 
  
Example usage:
+
Additional programs:
   track_pts -tdim 30  green.i2i green_in.coords green_out.coords
+
   patchstat do_transform
  track_pts -tdim 30  red.i2i  red_in.coords  red_out.coords
 
  coords2pts.pl -w=1 -one -name=green_track < green_out.coords > green_out.pts
 
  coords2pts.pl -w=1 -one -name=red_track < red_out.coords > red_out.pts
 
  concateima green.i2i red.i2i both.i2i
 
  dave -n 0 -u -O -z 1 -4 -I both.i2i green_out.pts red_out.pts
 
  
  
 
   
 
   
===  crosshair2bestpath.pl ===
+
===  gauss_deriv ===
  Convert a list of pts produced inside DAVE by using the crosshair and the
+
 
   "clear and save stack to file" option, to commandline arguments for
+
This program takes an image, blurs it with a Gaussian of
  BestPath3D. May still need to add -t and -f options manually.
+
specified standard deviation and then takes derivatives of the image
  Must also change IMAGE.i2i and IMAGE.rpts args in the output.
+
It does all of this in the frequency domain. 
 +
 
 +
Usage: gauss_deriv [options] infile.i2i outfile.i2i
 +
options:
 +
  -a angle:  angle of rotation (in radians) for the x,y axes about z.
 +
default = 0.000000
 +
  -x order:  number of derivatives in the x direction.
 +
default = 0
 +
  -y order:  number of derivatives in the y direction.
 +
default = 0
 +
  -p x y z:  pixel size in microns (zsize ignored for now), default = (0.1,0.1,0.1)
 +
  -s dev:  standard deviation in spatial domain of Gaussian (in microns).
 +
  -S dev:  standard deviation in frequency domain of Gaussian (cycles/um).
 +
default = 1.000000
 +
  -e epsilon:   cutoff for Gaussian intensity calculation.
 +
default = 0.040000
 +
  -r newmax: rescale output 0-newmax. newval = (oldval-min)*newmax/(max-min). This is useful
 +
especially when all the values would otherwise be < 1.
 +
This also prints to stderr the min and max values before rescaling.
 +
  -R scale black: rescale output: newval = (oldval-black)/scale .
 +
  -v: verbose
 +
  -n: no op. just take a forward and inverse transform. For debugging.
 +
note: the entire image name is NOT required.
 +
note: compressed images will be uncompressed.
 +
note: a - in place of an image name means stdin or stdout.
 +
restrictions: only works in 2D. 3D images have each z plane processed separately.  
 +
see also: gauss_deriv_unc, blur_spatial, canny, zerosu.
 +
 +
===  i2i2mhd  ===
 +
 
 +
This program just creates a MetaImage header file (file.mhd) which can be read, in conjunction with the original
 +
i2i file, into a ITK or VTK program. NOTE: you must keep inimage.i2i and inimage.mhd together in the same directory.
 +
If specified with a .mha extension then the resulting image has both the ascii header and the data together
 +
in one file (not done yet).
 +
 
 +
Usage: i2i2mhd inimage.i2i inimage.mhd
 +
i2i2mhd inimage.i2i inimage.mha
  
   crosshair2bestpath.pl [options] crosshair.dat > commandline.txt
+
options:
 +
-t # : set output tdim to the specified number. specify 0 if the image has no time dimension.
 +
-l : force output to be designated little endian
 +
-b : force output to be designated big endian
 +
-s dx dy dz   : pixel spacing. Some of the ACME routines may look at these values.
  
  options:
+
Examples:
    -image=# image name (instead of IMAGE.i2i) written out.
+
  i2i2mhd test.i2i test.mhd
    -rpts=# rpts name written out (instead of IMAGE.rpts)
+
    ~/krypton/segmentation/MR-Source/ACME/ACME-Binary/bin/cellPreprocess test.mhd test_proproc.mhd .3
    -t=# add -t # to options written out written out for BestPath3D
+
the above will create test_preproc.zraw and test_preproc.mhd, if, instead, you specify
    -f=#:# add -f # # to options written out for BestPath3D
+
test_resampled.mha as ouput to cellPreprocess you get all the output in the mha file.
  
 +
See also: mhd2i2i
 +
            http://www.itk.org/Wiki/MetaIO/Documentation, ~/krypton/ITK/README.lml.build-4.3,
 +
    ~/krypton/segmenation/MR-Source/README.lml, /home/lml/krypton/segmentation/MR-Source/ACME/lmltest/README
  
 +
source code in:  /home/lml/krypton/facil
 
   
 
   
===  dup_rpts.pl ===
+
===  insert_image2 ===
 +
incorrect command line, too few args.
 +
insert_image2 does a weighted merge of pixels in an original image with overlapping pixels from replacement images.
 +
Pixels which fall outside the original volume will be ignored.
 +
WARNING: the original image is MODIFIED, a NEW image is NOT produced (unless -n is specified).
 +
The weighting function for the blending makes the most sense for kind of usage align_quadrants.pl makes of it;
 +
ie, blending four quadrant images which only overlap a little and are being inserted into an initial blank image.
  
Takes an input file with one z slice per object, and, for each
+
Usage: insert_image2 [options] original_image.i2i [replacement_part.i2i xpos ypos zpos] 
object named on the command line, duplicates that slice for a
+
replacement_part.i2i xpos ypos zpos: the replacement image and the x,y,z coordinate (0-indexed)
range of z slices. rpts file must be in xy (not xyz) format
+
that it should start at. This option can be repeated as many times as desired.
 
+
options:
dup_rpts.pl -name1=#-# [-name2=#-# ...]  < in.rpts  > out.rpts 
+
  -r # if a pixel in original_image.i2i has this value, REPLACE it with any overlapping pixel (not a weighted avg).
or
+
  note: it could still then be modified by subsequent replacement images (they are analyzed in command line order)
dup_rpts.pl -name1=#-# [-name2=#-# ...] in1.rpts [in2.rpts ...]  > out.rpts 
+
  -R # if a pixel in a replacement image has this value, use it to REPLACE any overlapped pixel (not a weighted avg).
 +
  note: it could still then be modified by subsequent replacement images (they are analyzed in command line order)
 +
  -k # if a pixel in th original_image.i2i has this value, do NOT replace it.
 +
  -v # same as -k (for backwards compatibility). keep this value.
 +
  -n newim.i2i rather than over-write the original image, create a new image with this name.
 +
  -d debug. some info gets printed to stderr
  
 
example:
 
example:
  dup_rptsinterp.pl -foo=1-5 -bar=2-8  < in.rpts  > out.rpts 
+
parsepos.pl -pre=/storage/big3/kdb/Zeiss/20121004/LectinExp3/ -post=_1_1_20121004_LectinExp3.i2i \
 +
/storage/big3/kdb/Zeiss/20121004/LectinExp3/LextinExp3.pos | overlap_images.pl -create=newimage.i2i
  
  This will take the zslice associated with the object named
+
see also:  /storage/big1/lml/Corvera/Olga/data/ptrs/README
  foo and duplicate it into zslices 1 through 5, and duplicate
+
      insert_image  -the same as insert_image2, but doesn't perform any weighted merging.
  object bar into zslices 2-8.
+
      smooth_gaps
 +
      combine
 +
            combine_images.pl
 +
      align_quadrants.pl which calls combine_images and recalc_quadrant2.pl which calls register_images.pl which calls insert_image2
 +
(or insert_image if -noblend was passed to align_quadrants.pl).
  
 +
source code in:  /home/lml/krypton/facil
 
   
 
   
===  extract_overlap.pl ===
+
===  mergeimL ===
Reformats data from the overlap data produced by closest_object for graphing by xmgrace.
+
 
 +
Merge a bunch of 2 D files of same dimensions.
 +
The first image can be a 3 D image.
 +
If -x and -y are specified then all images are padded (on high x and high y sides) to
 +
the same specified dimensions, so the initial images can be different sizes.
 +
This version can read shorts or floats (but all must be the same)
  
extract_overlap.pl [options] *.patchdist2 | xmgrace -source stdin
+
Usage: mergeimL [options] im1 ... imN newimage.i2i
 +
options:
 +
  -r  : remove original files as they are merged.
 +
note: if the program bombs for some reason
 +
during this, data will be lost.
 +
  -b:  merge the images in backwards order from the
 +
list (ie, the last image will be the first
 +
slice). Use with -b in extractslice.
 +
  -x xdim: pad all images to this x dimension.
 +
  -y ydim: pad all images to this y dimension.
 +
  NOTE: this permits images of different sizes
 +
        to be merged by padding to the same size.
 +
  -p #:  when padding (-x and -y options) use this value
 +
  (0 default)
 +
  -d:  print out some debugging information.
 +
note: entire image name (with extension) is required.
 +
note: source in krypton:/home/lml/krypton/facil
 +
 +
===  mhd2i2i  ===
  
-mstring=im1_im2: : pull out data for fraction of each object in image1 which overlaps with image2 object, default = im2_im1
+
This program reads a MetaImage file (file.mhd or file.mha) and converts (casts) it into a (short int) i2i image file.
  You can also specify im1_im1 and im2_im2, in which case overlap is always 0 and the
 
  distance (-distance option) is the distance to the nearest other object in the same image.
 
-distance : pull out distance info instead of overlap info
 
-size : pull out size info instead of overlap info
 
-showhist : print histogram of overlaps (or distances or sizes) instead of just a list of all of them
 
-normmax : normalize the histogram to have a max of 1 (sets -showhist)  
 
-normsum : normalize the histogram to have a sum of 1 (sets -showhist)
 
-normint : normalize the histogram to have an integral (area under curve) of 1 (sets -showhist)
 
  this lets xmgr->data transformations->integrate produce a cumlative prob distribution which goes to 1
 
  Not quite correct yet.
 
-cum : print cumulative histogram. also use -normsum if you want this to be a cdf (approaches 1 as a max).
 
-binsize=# : binsize for the histogram (sets -showhist), default = 1
 
-verbose
 
  
+
Usage: mhd2i2i inimage.mhd outimage.i2i
===  filter_rptsinz.pl  ===
 
  
Takes simple rpts file and only keeps certain z valued pts (they get renumbered).  This is set up so that if
+
options:
you use segment -Z # # # image.i2i, and filter_rptsinz.pl -z=#:#:# where the numbers match in
+
-p      : just print some info about the image and quit. outimage.i2i does not need to be specified in this case.
the two commands, then the resulting rpts will match the i2i image. rpts which are not in
+
-s # # : multiply values by the first number and add the second, then cast to a short int.
the correct slices are not kept.
+
-d debug
  
usage:
+
Examples:
   filter_rptsinz.pl -z=#:#:# infile.rpts > outfile.rpts
+
   mhd2i2i test.mhd test.i2i
  
options:
+
See also: i2i2mhd, http://www.itk.org/Wiki/MetaIO/Documentation, ~/krypton/ITK/README.lml.build-4.3,
  -z=#:#:#    Z axis start, end and increment in pixels (1-indexed).
+
~/krypton/segmenation/MR-Source/README.lml, /home/lml/krypton/segmentation/MR-Source/ACME/lmltest/README
  -float keep (or convert) x,y,z values as floats. Otherwise it tries to auto-detect when to output floats.
+
      mayavi2 (which can view .mhd files directly)
  
  only works on rpts files which have a z value (e.g. xyz or xyzw format).
+
source code in:  /home/lml/krypton/facil
 +
 +
===  oib2i2i  ===
  
  see also:
+
oib2i2i takes an Olympus oib file and converts it into one or three i2i files.
   chres_rpts.pl
+
 
 +
note: it should also work with many other file types, including DeltaVision files.
 +
 
 +
java oib2i2i [options] file.oib file.i2i  [z dimension will be the number of channels]
 +
java oib2i2i [options] file.oib file_red.i2i file_green.i2i file_blue.i2i
 +
java oib2i2i [options] file.oib file_red.i2i file_green.i2i file_blue.i2i file_alpha.i2i
 +
 
 +
options:
 +
    -l[ittle]: force interpretation of 2 byte pixel values to be little endian (I may have this backwards)
 +
    -b[ig]:    force interpretation of 2 byte pixel values to be big endian (I may have this backwards)
 +
    -v[erbose]: verbose. prints info about file contents as planes are converted.
 +
    -d[ebug]:  prints debug info to stderr.
 +
    -i[nfo]:    like verbose. but ONLY prints info about file contents, then stops
 +
                must still give it a (dummy) output file argument
 +
 
 +
see also:
 +
   GetMicroscopeImageInfo file.oib      :will produce lots of information about the file
 +
  http://www.loci.wisc.edu/software/bio-formats
  
 +
source in /home/lml/krypton/packages/BioFormats/oib2i2i.java
 
   
 
   
===  gedmat_to_xy.pl ===
+
entered main()
 +
 
 +
===  pwarpL ===
 +
pwarp warps an image into a new image based upon a set of
 +
registered points from one image to another. That is, the
 +
transformation necessary to transform one set of registered
 +
points into the other is calculated. Then this transformation
 +
is applied to the image specified, producing a new image.
 +
A line segment can also be specified as an old "pt".  The new
 +
pt will match the best position along this line segment.
 +
The pointfile should contain points in the following format,
 +
new x and y dimensions, number of pts, new pts, oldpts. for
 +
example if 10 pts are given:
 +
  300 240
 +
  10 points
 +
  new_x1        new_y1 
 +
      .   .  
 +
      .   .  
 +
  new_x10      new_y10 
 +
  initial_x1  initial_y1 
 +
      .   .  
 +
      .   .  
 +
  L old_lowx old_lowy old_hix old_hiy  (this is a line segment)
 +
      .          .     
 +
      .          .     
 +
  initial_x10  initial_y10 
 +
the points can be in floating point.
  
  Takes files of data produced by mask_gedmat_images.pl (either via stdin or as command line arguments, [filenames])
+
Usage: pwarp [options] oldimage pointfile newimage
  and writes x y columns of processed data to stdout (but -unique_header=none will allow it to work on other formats).
+
options:
  These files have a line with column names, and can have comment lines (start with #) or blank lines in them.
+
  none.
  All other lines should just be columns of ascii text data.  strings are allowed (not quoted, and no spaces in them).
 
  The column header line (which can appear on any line and multiple times) must have a word (ie column name) unique
 
  to it (since the data can also have strings in them).  By default this word is assumed to be "filename"
 
  (-unique_header can change this).
 
  
  -cond (or -form if I bother to get that working) specifies a condition which decides which lines
+
Note: the .i2i extension is NOT necessary.
  of data to analyze. Any expression which evaluates to something > 0 will be analyzed.
+
 +
===  rawtoi2i2 ===
  
  -xcoord and -ycoord are the formula to use to determine what will go in the x or y column (if the -cond test is passed).
+
Converts a "raw" image into our i2i format. The raw image can be alternating red, green
 +
blue values or either 1 byte per color channel or 2 bytes per color channel.
 +
It can also be grayscale (-n 1) and 1,2, or 4 bytes per channel.
  
  usage:
+
Usage:
        gedmat_to_xy.pl [-form='xxx' | -cond='xxx'] -xcoord='xxx'  -ycoord='xxx' [options] [filenames]
+
rawtoi2i [options] -d xdim ydim zdim inimage.rgb outimage.i2i
 +
Options:
 +
-d xdim ydim zdim: dimensions of inimage.rgb. This MUST be specified.
 +
-b #: 1 or 2 bytes per color channel, default = 1
 +
                if the image is grayscale (-n 1) this can be 4
 +
-c #: which color channel to use (0=r, 1=g, 2=b), default = 0
 +
ignored if grayscale (-n 1).
 +
-n #: 3 if color channels (rgb), or 1 for grayscale.
 +
-S scale black: newval = (oldval-black)/scale.
 +
-m min max: after rescaling, if newval < min, newval = min. defaults = -32765,32765
 +
-s: values in inimage are signed values (not unsigned).
 +
-e: swap bytes (change endian). only make sense if -b 2 or 4
 +
  -v: verbose
 +
Examples:
 +
  identify inimage.tif :get image dimensions (xdim,ydim,zdim)
 +
  /usr/bin/convert inimage.tif -channel Red inimage.rgb
 +
  rawtoi2i -d xdim ydim zdim inimage.rgb outimage.i2i
 +
See Also:
 +
  cstoi2i, zeisstoi2i, convert (man ImageMagick), imformat, imformatb.
 +
Bugs:
 +
  the created image has a strange permission. fix it by doing: chmod 644 outimage.i2i
  
        xxx should contain the words (as variables) which are the column names in the output produced by mask_gedmat_images.pl.
+
Source code in ~krypton/lml/facil 
 +
 +
===  replace_slicesL  ===
  
 +
This program reads a 3D image and replaces the specified slices
 +
with a weighted composite of the closest surrounding slices which
 +
are not being replaced.  It is useful for getting rid of bad slices
 +
from an image.  The weights perform a linear interpolation.
  
  required:
+
Usage: replace_slices [options] inimage.i2i outimage.i2i
        -cond='xxx'  a perl expression to be evaluated to determine whether to print x and y derived from each row of data.
+
options:
if it evaluates to > 0 the row will be used.
+
  -r # s1 s2 s3, etc : replace # slices (e,g,. 3 slices);
e.g., -cond='if ($date eq "date_sure") {1;} else {0;}'
+
                        the slices to replace are s1, s2, s3, etc.
                        e.g., -cond='if ($area > 10) {$area+5;} else {$dist/2;}'
+
                        NOTE: the slices must be sorted (s1<s2<s3).
                        note the use of single (not double) quotes to protect this from the shell.
+
                        NOTE: slices are 0-indexed (first slice is 0).
If this is not specified all data lines will produce an x and y value.
+
                        NOTE: the first and last slices in the image cannot
                        Some simple perl info:
+
                              be replaced.
                          use eq (equal) and ne (not equal) for comparing strings (which are in double quotes).  
+
note: entire image name (with extension) is NOT required.
                          use ==  !=  >  >=  <=  for numeric comparisons. && (logical AND), || (logical OR).
+
note: a - in place of an image name means stdin or stdout.
                          put $ in front of all variables (string variables and numeric variables).
+
note: a compressed image will be automatically be uncompressed.
                          statements are separated by semicolons.  Blocks specified with braces.
+
                          if ( ) { }  else { }  where the "else {}" is optional. But don't forget the braces.
+
=== rescale  ===
note: you can also use variables $exarea  and $exdist to refer to the area and dist fields
 
from the day 0 datalines. These values correspond to the explant area and its distance
 
from the image (ie, well) center for the same patient, well, and tissue type as the
 
current line being processed. Suppose you want to look only at data from day 11 if
 
the explant area (ie, day 0 area) was larger than 200,000 pixels:
 
-cond='if (($exarea > 200000) && ($day == 11)) {1;} else {0;}'
 
  
-xcoord='xxx' like -cond, but used to specify what the xcoord value should be
+
This program linearly rescales image intensities to a new intensity
e.g., -xcoord='$farea/$area';    do not specify this if you specify -col#
+
range: 0 (new_min) to 1023 (new_max) by default.
-xcoord='$numprinted' will print 1, 2, 3, etc (ie, a count of how many datalines have been printed so far) for x.
 
  
-ycoord='xxx' like -cond, but used to specify what the ycoord value should be,
+
Usage: rescale [options] inputimage outputimage
e.g., -ycoord='$dist';    do not specify this if you specify -col#
+
options:
-ycoord='$numprinted' will print a count of how many datalines have been printed so far for y.
+
-N #: New max should be #.
 +
-n #: New min should be #.
 +
-M #1 #2: any original pixel value greater than # should be
 +
      set to #2 before any rescaling takes place.
 +
-m #1 #2: any original pixel value less than #1 should be
 +
      set to #2 before any rescaling takes place.
 +
      So if you have a few munged values, ie, large negative
 +
      numbers which you don't want to mess up the rescaling
 +
      you can just use -m 0 0 on the command line.
 +
-v old new:  voxels with value old will just be set to value new.
 +
      note: "old" cannot be within the range which other pixels will
 +
    be rescaled to.
 +
-b    write out an i2i byte image (rather than a short). values > 255 will be truncated.
 +
note: entire image name (with extension) is NOT required.
 +
note: a - in place of an image name means stdin or stdout.
 +
note: compressed images are temporarily uncompressed into /usr/tmp.
 +
 +
== Miscellaneous ==
 +
===  analyze_cross_sections_of_voronoi.pl  ===
  
  options describing input:
+
This program reads files produced by cross_sections_of_voronoi (-P)
-unique_header=something rather than look for "filename" to determine which line contains header names, look for something
+
Results prints volume (x) vs predicted volume (y) to stdout.
-unique_header=none if you specify the word "none" then column names will be col1, col2,  ... and no header lines
 
should exist
 
  
  options describing output:
+
analyze_cross_sections_of_voronoi.pl [options] file1.txt [... filen.txt]
-comment include a comment line up front showing the command line used to generate this data.
 
-col#='xxx' rather than just two columns, you can specify what to print in up to 20 by repeating this command
 
# is the column number (starting with 1). do not specify -xcoord or -ycoord if you use this option.
 
It will also cause column names to be printed.
 
  
-col#_name='name'  if you don't want the default name for the column (which is just col#_name) specifiy a name here.
+
options:
 +
-debug info about all fields on each line printed to stderr
 +
-stdout everything to stdout
 +
-print_avg for each file, just graph mean and std error of the mean, rather than all data pts
  
        -form='xxx'    instead of -cond.  a formula. eg -form='(area/dist+.5)-(area/2)' or -form='myfunc(dist,area)'
 
not implemented yet.
 
  
-line if -cond is satisfied, print the entire line of data (-xcoord and -ycoord not needed, they are ignored).
+
examples:
note: fields will be in the same order than they were in the input files, but formatting may be a bit different.
+
cross_sections_of_voronoi -P voronoi.i2i > filename1.txt
 +
cross_sections_of_voronoi -P voronoi.i2i > filename2.txt
 +
        axnalyze_cross_sections_of_voronoi.pl *.txt
  
-xmgr_labels=# add output commands for xmgr which will add a label to each point. # is font size (.5 seems to be a good value). 
+
see also:
The command lines all begin with @, so if you have a file produced that way and decide you do not want them
+
/storage/big1/lml/Raz/voronoi/README, true_vs_predicted.xmgr
displayed in xmgrace do:
+
/home/lml/krypton/Corvera/Raz/stereology/README, run_voronoi.pl, run_voronoi2.pl, compare_volume_measurements.pl, plot_results.pl
gedmat_to_xy.pl -xmgr_labels=1 gedmat.areas  > gedmat.xmgr      # you did this thinking you wanted labels
+
cross_sections_of_voronoi
fgrep -v @  gedmat.xmgr |xmgrace -free -pipe # but now you decide you don't want the labels
+
/home/lml/krypton/packages/fiji/Fiji.app/macros/stereology_lml.txt
This command cannot be used with the -col or -line options (ie, -xcoord and -ycoord must be specified).
+
/home/lml/krypton/packages/fiji/run_stereology.txt
Unless -unique_header is specified, the label is the patient id number (gotten from the filename field)
+
/storage/big1/lml/Raz/voronoi/
and the well id (from the well field) - these are produced by mask_gedmat_images.pl.
 
If -unique_header is specified the label will be the data line number in the file (excluding blank lines, comments, etc).
 
  
health options:
+
 +
===  neartrack.pl  ===
 +
neartrack.pl
  
-dummy_health add a dummy field (called dummy_health) for health status (e.g. normal, db1, db2) so I can start testing my stats software.
+
find which track a specified coordinate is near (ie, with dx,dy) (eg, DAVE crosshairs gives us a coord, what track is it?)
only use if -col is also specified.
+
  assumes coords passed are zero indexed
-seed=# seed for random number generator used if -dummy_health is specified. Specifying a seed lets you repeat this over and
 
over and get the same random numbers. The default is to use the time of day (which will change with each running).
 
  
-t2dm=id[:...:id] list of patients which are type 2 diabetic (t2dm).  These ids should match the patient id field (the 3 digit number)
+
    usageneartrack.pl -x=# -y=# [-z=#] [-dx=#] [-dy=#] [-oneindexed] file.rpts
in the *.areas files being analzyed.  For example in 017_VQU_OM.areas:
 
    filename              well type day  area      farea  area_mex area_mex_border  dist  date        id   perr aerr bad
 
B05_017_VQU_OM_Area.zip  B05 OM  11  2866176  2869698    2563883  1642634        1712.8  date_sure  017  0    0
 
So if patient 17 is t2dm  specifiy -t2dm=017
 
-gdm=id[:...:id] list of patients which are gestational diabetic (gdm).
 
The name should be the (3 digit) id field in the data line, just as in the -t2dm example.
 
if either (or both) of -tdm and -gdm are specified, a field called "health" will be added to the output. It will
 
have values t2dm, gdm, or normal.
 
  
misc options:
+
 +
===  parse_macros4.pl  ===
 +
Can't use 'defined(%hash)' (Maybe you should just omit the defined()?) at /home/lml/krypton/bin/parse_macros4.pl line 562.
  
-one_space separate columns by exactly one space so sas can parse it easier (see also: spaces.pl) with proc import.
+
===  path_diff.pl ===
 +
compare the differences between the paths found from two different runs of exo5
  
 +
path_diff.pl  file1 file2
  
-silent suppress some messages
+
options:
        -debug stuff to stderr
+
  -dx=# x coord at fusion time can differ by this and still be considered same path (default = 0)
        -Debug other stuff to stderr
+
  -dy=# y coord at fusion time can differ by this and still be considered same path (default = 0)
-debug_print_columns
+
  -df=# fusion time can differ by this and still be considered same path (default = 0)
  
   examples:
+
   -debug
+
  -Debug
# analyze some zip files
+
mask_gedmat_images.pl > file.areas
+
===  trackinfo.pl ===
  
# compare the area mask_gedmat_images.pl produced with that produced by fiji (these should be very close):
+
# analyze output from "track or track -r".
gedmat_to_xy.pl -cond='if ($date eq "date_sure") {1;} else {0;}' -xcoord='$area' -ycoord='$farea' file.areas | xmgrace -free pipe
+
# assumes coords passed are zero indexed.  
  
# compare the area mask_gedmat_images.pl produced with area_mex_border (eliminating regions near the well border).
+
# usage:   trackinfo.pl -x=# -y=# [options] file.rpts
# This is excluding the explant area.  ignore any lines with uncertain dates or parse errors (perr) or area errors (aerr):
 
gedmat_to_xy.pl -cond='if (($date eq "date_sure") && ($perr==0) && ($aerr==0)) {1;} else {0;}'
 
-xcoord='$area_mex' -ycoord='$area_mex_border' file.areas | xmgrace -free -pipe
 
  
# suppose you just have columns of data produced some other way, and no header line, and you just want to do stuff:
+
#   options:  
gedmat_to_xy.pl -cond='if ($col5>0) {1;} else {0;}' -xcoord='$col5' -ycoord='abs($col5-$col6)'
 
-unique_header=none yourdatafile | xmgrace -free -pipe
 
  
  see also:
+
#    -reg=# : just print info about the specified region number
mask_gedmat_images.pl
+
#    -track=# : just print info about the specified track
/home/lml/krypton/lml/Corvera/Raz
+
#    -trackcoords=minsize:maxsize:miniod:maxiod:minlife:maxlife
 
+
# : print the coords (rpts format) of all tracks which satisfy
  source code in /home/lml/krypton/bin
+
#   the criteria (or all its regions satisfy them). lifetime is # of timepts it exists for.
 +
#    -tdist=mindist:maxdist: use with -trackcoords to specify min and max (xy manhattan) distance track travels
 +
#    -micro:   print coords of all paths. color code them so if they connect at all
 +
#   they are the same color (eg, all along the same microtubule)
 +
#    -x=# -y=# : find which track the specified coordinate is near (eg, DAVE
 +
#   crosshairs gives us a coord, what track is it?)
 +
#    -z=# : also include z in distance calculation.
 +
#    -dx=# : dx, default = 3
 +
#    -dy=# : dy, default = 3
 +
#    -dz=# : dy, default = 1000 (ie, essentially ignored)
 +
#    -oneindexed : otherwise -x, -y, -z assumed to be zero indexed (rpts file is always one indexed)
 +
#    -t : print additional region and track info (which should be in file.rpts
 +
#   if -r was specified when running "track") for objects found
 +
#   (eg, via -x=#,-y=#,or  -region=#)
 +
#    -sf=name : sort field. name of field to sort on when printing out a track.
 +
#   implies -t. default = time ("set");
 +
#    -rs : reverse the "sense" of the sort (normally smallest to largest). implies -t.
 +
#    -pf=field1:field2:field3 : print fields. which fields to print from the region info (implies -t).
 +
#   default is all fields.  you can put as many fields as you want here,
 +
#   separated by colons.
 +
#    -verbose: : print info about progress to stderr
 +
 
 +
# example:
 +
#    track -a 3 -n 400 -r -s 0 5 -S -t 25 -v 5 500 -d 15 9 -u .33 .33 .25 5 -h .01 a.vel a.i2i > a.rpts
 +
#    trackinfo.pl -x=52 -y=28 -t -pf=set:size:nextid a.rpts
 +
#    trackinfo.pl -reg=103 -t -pf=set:size:nextid a.rpts
  
 
   
 
   
===  get_columns.pl ===
+
===  find_bkgnd ===
 +
 
 +
find_bkgnd takes a 3D image and tries to estimate a background intensity value.
 +
It does this by examing the IOD in each of the four corners of the image, picking
 +
the average pixel value associated with the lowest IOD. IOD is calculated in a square
 +
region whose width (default = 2) can be changed with -r.  The IOD is the total light
 +
in this square region added across all z-planes. The avg pixel value is printed to stdout.
  
pulls out specified columns from a file. Ignores comment linesHeader for the file must be the first non-comment line.
+
Usage: find_bkgnd image1
 +
options:
 +
  -r #:  change width of region examined, default = 2
 +
  -c also print out the x and y coord (1-indexed) of the corner producing the avg value.
 +
  -a # add this fraction to the value. eg: -a -.10 will subtract 10 percent from whatever
 +
avg value would have otherwise been printed out, so we don't subtract quite so aggressively.
  
  usage:
+
see also: ~/krypton/Melikian/find_and_restore.pl
    get_columns.pl [options] -cols=name:....:name  datafile > out.nxy
+
 
 +
source code in: /home/lml/krypton/facil
 +
 +
===  interp  ===
 +
 
 +
interp takes a list of contours from an rpts file and
 +
interpolates new contours between them at each zslice that
 +
was skipped.
 +
METHOD: By default it does this by taking the fft of
 +
each curve, thereby obtaining fourier coefficients. These
 +
coefficients are then interpolated between the known contours
 +
to get coefficients for the in-between slices, then an inverse
 +
fft is taken to produce the curve for the in-between slices.
 +
 
 +
Usage:
 +
    interp [Options] input.rpts output.pts
  
options:
 
-linenum precede each line with a linenumber
 
-noheader do not print out a header line
 
-noinfo do not print an info line
 
        -cond='xxx'  a perl expression to be evaluated to determine which rows of data to pull data from. default is all rows.
 
                        if it evaluates to > 0 the row will be used.
 
                        e.g., -cond='if ($tissue eq "OM") {1;} else {0;}'
 
                        e.g., -cond='if ($date == 7) {1;} else {0;}'
 
                        note the use of single (not double) quotes to protect this from the shell.
 
                        If this is not specified all data lines will produce an x and y value.
 
                        Some simple perl info:
 
                          use eq (equal) and ne (not equal) for comparing strings (which are in double quotes).
 
                          use ==  !=  >  >=  <=  for numeric comparisons. && (logical AND), || (logical OR).
 
                          put $ in front of all variables (string variables and numeric variables).
 
                          statements are separated by semicolons.  Blocks specified with braces.
 
                          if ( ) { }  else { }  where the "else {}" is optional. But don't forget the braces.
 
  
-skipvals=#:...:#  list of values (or text), of lines which should be skipped if any fields have one of these values
+
Options:
 +
-f #:  number of positive frequency terms to use,
 +
default = 9
 +
-l: perform linear instead of cubic spline interpolation
 +
on the parameters describing the existing outlines.
 +
-o name: only read object "name" from the rpts file.
 +
-n #: number of pts to resample each slice.
 +
(all #'s  factors must be 2)
 +
-S:    do interpolation in spatial domain. do not take fft.
 +
      this is only a linear spatial interpolation.
 +
-a: angularly interpolate positions (fft not used).
 +
this is used if we are interpolating curves, such
 +
as microtubules. The beginning of the curve is linearly
 +
interpolated (the mtoc location), all other points have
 +
their distance and angle from the mtoc linearly interpolated
 +
between their initial distance/angle and final distance/angle.
 +
NOTE: the angular change must by < 180 between defined curves.
 +
NOTE: only one open curve is allowed per image slice.
 +
-p #: pixel value to be output to rpts file, -3 default.
 +
        -c:   add 1 more point to each contour to ensure it is closed, ie
 +
              that the first point equals the last point. (This is not necessary,
 +
              and ill-advised, for use with min_cylinder or shrink_wrap.)
 +
NOTE: zslices must be in ascending order in rpts file.
 +
NOTE: contours must all be drawn in the same direction
 +
      (i.e., all clockwise or all counter-clockwise).
 +
NOTE: the name of each object is changed to "nuke" if -o is not specified.
 +
NOTE: a maximum of 3000 zslices is allowed
  
-replacevals=#=#:...#=# if this value (or text) is seen in any field, replace it with the second value
+
see also: interp_many
  example: -replacevals=unk=-1:20=10  replace unk with -1 and replace 20 with 10
+
source code was in: /storage/big1/lml/was_vision/interp
 +
source code now in: /home/lml/krypton/was_big1/was_vision/interp
 +
 +
===  object_overlap  ===
 +
#/home/lml/krypton/bin/object_overlap
  
-debug stuff to stderr
+
Takes images produced by countobjs -Q option or vcspat-models -n option and calculates
 +
how many object from each image overlap
 +
with objects from the other image.  Writes to stdout.
  
 +
Usage: object_overlap [options] image1.i2i image2.i2i > overlap.txt
 +
options:
 +
  none yet.
  
example:
+
Example:
    get_columns.pl -cols=time:mass:growth  datafiles > out.nxy
+
    countobjs -Q im1_obj.i2i im1.count im1.i2i
    xmgr -type nxy out.nxy
+
    countobjs -Q im2_obj.i2i im2.count im2.i2i
 +
    object_overlap im1_obj.i2i im2_obj.i2i > im1_im2.overlap
  
see also:
+
See also: vcspat-models, vcspat, krypton/Qiong/run1
graph_xpp2.pl
 
cull
 
  
 +
Source code in krypton/facil
 
   
 
   
===  get_dir_results.pl  ===
+
== Data Reformatting ==
This program looks in subdirectories, finds files named something_Results.txt and then reads info from them,
+
===  chres_rpts.pl  ===
These files can be the result of analyzing a projection of the 3D stack (5 z slices) or the result of
 
just analyzing the best slice from the stack.  By default only stack projected results files are extracted.
 
Results written to stdout.
 
  
usage:
+
  Reads in some rpts files and rescales their x and y coords so that they will match an image which
get_dir_results.pl
+
  has been similarly rescaled.
  
  options:
+
  usage:
-verbose stuff written to stderr
+
    chres_rpts.pl [options] infile.rpts > outfile.rpts
-loc=/some/path/here rather than looking in /storage/big1/raz/GEDMAT, look in this location
 
  
NOTE: the slice options may be buggy, it is better to use get_dir_slice_results.pl
+
  options:
-also_use_slice_data also include Results from single slice data (rather than just stack project data).
+
-sx=# rescale x -> x*#
this may cause multiple entries in the output (one for stack results and one for slice results).
+
-sy=# rescale y -> y*#
-only_use_slice_data exclude any file which are NOT from slice data.
+
-truncate  after rescaling, truncate to an integer (newer versions of addlines can handle floating pt)
 +
-round     after rescaling, round to an integer
 +
-max=#:#    don't let x become > than #1. don't let y become > #2.
 +
-min=#:#    don't let x become < than #1. don't let y become < #2.
  
examples:
+
  example:
get_dir_results.pl > all_results.txt
+
# suppose you have a floating pt rpts file
 
+
    find_peaks_inrpts.pl -rpts=QS_H10+1Q_3T3_center_2_peaks.rpts:.15:.033
see also:
+
Results/mat_quad/QS_H10+1Q_3T3_center_2_control_q_kept.rpts > /dev/null
get_dir_slice_results.pl
+
# and you want to see it in better spatial detail:
get_find_vesselness_results.pl
+
    chres -S 4 4 1 Data/QS/QS_H10+1Q_3T3__center_2_ra7.i2i QS_H10+1Q_3T3__center_2_ra7_ch441.i2i
combine_Raz_and_lml_data.pl
+
    chres_rpts.pl -sx=4 -sy=4 QS_H10+1Q_3T3_center_2_peaks.rpts > QS_H10+1Q_3T3_center_2_peaks_ch441.rpts
combine_with_Raz_curated_data.pl
+
    addlines2 QS_H10+1Q_3T3__center_2_ra7_ch441.i2i QS_H10+1Q_3T3_center_2_peaks_ch441.rpts - |playc -
 +
 
 +
  see also:
 +
  filter_rptsinz.pl
  
 
   
 
   
===  graph_channel_current.pl  ===
+
===  combine_Raz_and_lml_data.pl  ===
Reformats data from the histograms produced by channel_current for graphing by xmgrace.
 
  
  graph_channel_current.pl [options] *.channel_current | xmgrace -source stdin
+
combine data pts from Raz with my data points. results printed to stdout
  
  -linetype=# : 0=no lines, 1=lines[default]
+
  usage:
-symboltype=# : 0=pts[default]   1=circles
+
combine_Raz_and_lml_data.pl [optionsfile1 file2
-normsum : normalize so sum (area under curve) = 1
 
-normmax : normalize so the max of the curve = 1
 
-countmax=# : cap each bin count at #. applied before normsum or normmax.
 
-binmax=# : group all counts in bins > # into that last bin
 
-cum : plot cumulative distribution. applied after all other options.
 
  
See also:  /home/lml/krypton/Zhuge/BKandRyr/analysis5/graphall3.csh
+
where file1 is find_vesselness_results2.txt (or something else in that format, ie with internal filenames formatted that way)
 +
      file2 is raz_results.out (or something else in that format)
  
   
+
  options:
===  makebeads2rpts.pl  ===
+
      -cond1='xxx'  a perl expression to be evaluated to determine which rows of data to analyze. default is all rows.
 
+
                        if it evaluates to > 0 the row will be used.
This program takes output from makebeads2 and converts it into
+
                        e.g., -cond='if ($tissue eq "OM") {1;} else {0;}'
an rpts formatA coord from [0,1) is considered in the first pixel;
+
                        e.g., -cond='if ($date == 7) {1;} else {0;}'
this has a pixel coord 1 since rpts uses 1-indexed valuesA coord from
+
                        note the use of single (not double) quotes to protect this from the shell.
[1,2) will have a pixel coord 2, etc.
+
                        If this is not specified all data lines will produce an x and y value.
 +
                        Some simple perl info:
 +
                          use eq (equal) and ne (not equal) for comparing strings (which are in double quotes).  
 +
                          use ==  !=  >  >=  <= for numeric comparisons. && (logical AND), || (logical OR).
 +
                          put $ in front of all variables (string variables and numeric variables).
 +
                          statements are separated by semicolonsBlocks specified with braces.
 +
                          if ( ) { }  else { }  where the "else {}" is optional. But don't forget the braces.
  
usage:
 
  makebeads2rpts.pl makebeads2.out > makebeads2.rpts
 
  
options:
+
-unique_header1=something string which uniquely exists on the header line of file1 (so it can be identified)
  -oldres=#    :  pixel size used to create makebeads2.out. default = 1nm
+
-data_field1=something which column has the actual data we care about and will graph. default = rate
  -newres=#     :  pixel size for makebeads2.rpts
+
        -data_factor1=# multiply data_field value in file 1 by data_factor prior to analyzing (or printing) it.
  default is the same size as oldres.
+
-group_by1=something how to match the data, eg, a datapoint in file1 will by matched to a datapt in file2 by this criteria
  If newres = oldres, the pixel coords won't change (except for
 
  being converted to 1-indexed integers).
 
  -project : ignore z value, project all pts onto the first plane
 
  -jack=# :  instead of just coords of each pt, produce a jack of the specified integer radius (in pixels)
 
  -verbose
 
  
+
-cond2 same but for file2, defaults to -cond1
===  merge_rpts.pl  ===
+
-unique_header2=something same but for file2. defaults to -unique_header1
 +
-data_field2 same but for file2, defaults to -data_field1
 +
-data_factor2 same but for file2, defaults to 1
 +
-group_by2 same but for file2, defaults to -group_by1
  
Takes output from runall.m, which produces a series of rpts files for a data set, where each rpts file is for a
+
-silent don't print warning to stderr when a data pt in one file does not have a match in the other file.
different range of z values, and concatenates the paths together.  The result can then be analyzed by paths5.pl.
+
Assumes the files passed are already sorted in z (ie, the first file has paths from z = 1 to 500, the next has
 
paths from z = 501 to 1000, etc.).
 
  
usage:
+
  -debug stuff to stderr
  merge_rpts.pl [options]  z1_500_tracks.rpts 2_z501_1000_tracks.rpts z1001_1500_tracks.rpts > all_tracks.rpts
+
    -Debug other stuff to stdout
  
  options:
+
  example:  
  
  -dx=# how close (in pixels) the paths must be in x to merge (be considered the same path), default = 0.5
+
get_find_vesselness_results.pl  -gdm=014:019 -t2dm=005:020:021 > find_vesselness_results2.txt
  -dy=# how close (in pixels)the paths must be in y to merge (be considered the same path), default = 0.5
+
get_dir_results.pl -verbose > raz_results.out
  -verbose_merging prints merging info to stderr
+
combine_Raz_and_lml_data.pl -data_factor1=2 -unique_header1=filename -data_field1=pixels_in_mask -group_by1=filename
  -vverbose_merging very verbose, prints other into about merging.
+
                      -data_field2=mass -group_by2=imagename find_vesselness_results2.txt raz_results.out > Raz_lml_combined.txt
  -verbose_paths
 
  -verbose_files
 
  -silent
 
  
 
  see also:
 
  see also:
/home/lml/krypton/Satoshi/runall.m
+
 
/home/lml/krypton/Satoshi/Results/
+
combine_with_Raz_curated_data.pl
 
+
compare_data_points.pl
note:
+
boxandwhisker2.pl
this could probably be easily modified to skip over short gaps in z by defining a -dz and taking out
+
xmgrace --help
the test that requires a path to end at the maxz of the file. But it would only skip over gaps exactly at
+
http://plasma-gate.weizmann.ac.il/Grace/doc/UsersGuide.html
the end of the files, unless the comparisons are extended to also look at other paths in the same file.
+
/home/lml/krypton/Corvera/Raz/gedmat_dummyhealthr.data
 +
/home/lml/krypton/Corvera/Raz/README 4/2/14
 +
gedmat_to_xy.pl used to produce gedmat_dummyhealthr.data. can also pull out arbitrary rows and columns
  
 
   
 
   
===  modtracks.pl  ===
+
===  coords2pts.pl  ===
 +
Converts from coords format produced by track_pts to pts format needed by dave.
 +
Only handles output from track_pts with one object in it right now.
  
# takes output rpts from track and modifies it so that format is changed to superimpose on a projection image
+
coords2pts.pl [options] <in.coords   > out.pts
# where each time pt is represented by a single (projection) z slice. This lets us view the result for huge time series.
 
# original format:
 
#    xyzw # time
 
# new format:
 
#    x y t
 
# assumes time coords passed are zero indexed.  
 
  
# usagemodtracks.pl [options] file.rpts > newfile.rpts
+
options:
 +
  -one: add 1 to x,y,z coords (e.g, to go from zero indexed to the one-indexed coords dave expects)
 +
   -name=trackname    the name of the object created. dave wants different objects to have different names.
 +
  -w=# for the w coord (intensity) just use the specified number (dave has problems if the number > 255)
 +
track_pts usually puts the max intensity in the w field.
  
  options:
+
Example usage:
    -everyplane have each track show up on all z planes (all projections), otherwise
+
  track_pts -tdim 30  green.i2i green_in.coords green_out.coords
only part of the track will be visible at each time point.
+
  track_pts -tdim 30  red.i2i  red_in.coords  red_out.coords
    -dup duplicate points so a line from t1 to (t1+1) is completely visible
+
  coords2pts.pl -w=1 -one -name=green_track < green_out.coords > green_out.pts
in t1 and in t1+1 (otherwise half will appear in t1 and half in t1+1).
+
  coords2pts.pl -w=1 -one -name=red_track < red_out.coords > red_out.pts
    -color color the tracks (use play with options: -P -1 R -P -2 G -P -3 B -P -4 C -P -5 Y)
+
  concateima green.i2i red.i2i both.i2i
    -tshift=# add # to the time (z) coord of all pts.  
+
  dave -n 0 -u -O -z 1 -4 -I both.i2i green_out.pts red_out.pts
  
# example (a1.i2i through a3.i2i are each a 4D time series):
 
#    track3dg.linux -a 3 -u .33 .33 .25 5 -h .01 a.vel a1.i2i a2.i2i a3.i2i > a.rpts
 
#    modtrack.pl  a.rpts  > amod.rpts
 
#    reduceima -sets 10 -P a1.i2i aproj1.i2i
 
#    reduceima -sets 8 -P a2.i2i aproj2.i2i
 
#    reduceima -sets 11 -P a3.i2i aproj3.i2i
 
#    concateima aproj1.i2i aproj2.i2i aproj3.i2i aproj.i2i
 
#    addlines aproj.i2i amod.rpts - |play -P -1 R -P -2 G -P -3 B -P -4 C -P -5 Y  -
 
 
see also:
 
trackinfo.pl
 
  
 
   
 
   
===  objs2bb.pl  ===
+
===  crosshair2bestpath.pl  ===
 +
  Convert a list of pts produced inside DAVE by using the crosshair and the
 +
  "clear and save stack to file" option, to commandline arguments for
 +
  BestPath3D. May still need to add -t and -f options manually.
 +
  Must also change IMAGE.i2i and IMAGE.rpts args in the output.
  
#this program takes the object outputfile produced by countobjs and creates a pts file
+
  crosshair2bestpath.pl [options] crosshair.dat > commandline.txt
#from it. Each object in the original file gets turned into a wireframe cube of the bounding box.
 
  
#usage:
+
  options:
# objs2bb.pl <file.objs >file_bb.pts 
+
    -image=# image name (instead of IMAGE.i2i) written out.
 +
    -rpts=# rpts name written out (instead of IMAGE.rpts)
 +
    -t=# add -t # to options written out written out for BestPath3D
 +
    -f=#:# add -f # # to options written out for BestPath3D
  
#example:
 
#  countobjs -k -t 2000 2000 -O cs1_4c_c_objs2.i2i cs1_4c_c.objects2 cs1_4c_c.i2i
 
#  objs2bb.pl < cs1_4c_c.objects2 > cs1_4c_c_bb.pts
 
#  dave -n 0 -u -kptcolor -K -I cs1_4c_c.i2i cs1_4c_c_bb.pts
 
  
 
   
 
   
===  path2rpts.pl  ===
+
===  dup_rpts.pl  ===
  
This program converts path files as produced by gimp to our standard rpts format.
+
Takes an input file with one z slice per object, and, for each
Currently only handles one path, and strips off any identifying name.
+
object named on the command line, duplicates that slice for a
 +
range of z slices. rpts file must be in xy (not xyz) format
  
path2rpts.pl [options] infile.path > outfile.rpts
+
dup_rpts.pl -name1=#-# [-name2=#-# ...] < in.rpts  > out.rpts 
 +
or
 +
dup_rpts.pl -name1=#-# [-name2=#-# ...]  in1.rpts [in2.rpts ...]  > out.rpts
  
options:
+
example:
 
+
  dup_rptsinterp.pl -foo=1-5 -bar=2-8  < in.rpts  > out.rpts
-xmgr: output xmgr format instead of rpts format
 
  
 +
  This will take the zslice associated with the object named
 +
  foo and duplicate it into zslices 1 through 5, and duplicate
 +
  object bar into zslices 2-8.
  
 
   
 
   
===  pgfocus2.pl  ===
+
===  extract_overlap.pl  ===
   
+
  Reformats data from the overlap data produced by closest_object for graphing by xmgrace.
===  plotdata.pl  ===
 
  
Takes sas output from running proc tpsline (see runtest.sas) and graph it.
+
extract_overlap.pl [options] *.patchdist2 | xmgrace -source stdin
  
plotdata.pl output.txt > output.xy
+
  -mstring=im1_im2: : pull out data for fraction of each object in image1 which overlaps with image2 object, default = im2_im1
 
+
  You can also specify im1_im1 and im2_im2, in which case overlap is always 0 and the
options:
+
  distance (-distance option) is the distance to the nearest other object in the same image.
-alldata : tspline putting out all the variables it can (so there are more cols in output.txt that must be parsed)
+
-distance : pull out distance info instead of overlap info
-numbins=# : number </