Difference: TemimpsXtracedrop (17 vs. 18)

Revision 1821 Jul 2011 - Main.BillRice

 
META TOPICPARENT name="DetConcent_DropShape"

xtracedrop program for characterizing drop shape and quantifying detergent concentrations

Contents

Program Installation

xtracedrop is a python program (xtracedrop.py). It is known to run under python 2.4 (Centos 5) or 2.6 (Windows). It relies on the following packages

Program Dependencies

  • numpy (python package)
  • scipy (python package)
    • requires blas and lapack
  • python imaging library (PIL) (python package)
  • gnuplot is used, both for fitting and for plotting results
Changed:
<
<
download xtracedrop.py.txt, rename it to xtracedrop.py
To make xtracedrop executable, type: chmod +x xtracedrop.py
>
>
download and unzip http://temimps.nysbc.org/xtracedrop.zip
It is already marked as executable, so run as ./xtracedrop.py
 
  • you can also type: python xtracedrop.py
Changed:
<
<
download sample drop images to test installation: drop_demo.tgz
>
>
download sample drop images to test installation: http://temimps.nysbc.org/drop_demo.tgz
Added:
>
>
  • extract with tar xvzf drop_demo.tgz
 principles and practice for measuring detergent concentrations from drop shape are described here

Running the xtracedrop

  • place drop images to be analyzed into a common directory
  • run xtracedrop
  • change the filename template to match the files you want to analyze
    • a list of relevant files should appear in the main window
    • xtracedrop0.jpg
  • if desired, enter the detergent concentrations next to each filename
    • this is useful if you are analyzing a standard curve of known detergent concentrations
    • this information will allow xtracedrop to produce a plot of your results
  • change the name of the output file if desired
  • adjust the center coordinates of the drops if necessary
    • this value needs only be approximately correct
    • a single center is assumed to apply to all drops
  • Hit the "Run" button
  • Output will appear in the stdout window only after analysis of all the drops is complete
    • xtracedrop4.jpg

View results of xtracedrop

  • a summary of the results is shown in the main window
    • namely the ratio of major/minor axes of the fitted ellipse
    • the error of the fit is shown (in pixels) and should typically be ~1
    • xtracedrop1.jpg
  • the "Plot Results" button will create a plot of concentration (entered by user) vs. a/b ratio (determined by program)
    • this information is also stored in the "results file" and can be imported into another program (e.g. excel)
    • a right-click will bring up the plot and offer to save the image - make sure to specify the directory
    • xtracedrop5.jpg
  • for information on individual drops, select the number of the relevant file (shown in main window)
    • "Show Img" will bring up a window with the original image
      • xtracedrop3.jpg
    • "Show Fit" will bring up a window showing the data fitted to an ellipse
      • this fit is displayed using gnuplot. The gnuplot command file (e.g. DSC_0014-fit.gnuplot) can be used later to recreate the plot
      • xtracedrop2.jpg

Files produced by xtracedrop

    • a number of intermediate files are created that could be useful for troubleshooting
    • img-boundary.txt lists the coordinates of all the points found at the boundary of the drop/substrate
    • img-trimmed.txt lists the "trimmed" coordinates though to actually represent the surface of the drop
    • img-edge.txt lists coordinates at the lateral edges of the drop (excluded from the fit)
    • img-fit.gnuplot is a gnuplot command file used to create the plot
      • type gnuplot img-fit.gnuplot to recreate this plot
    • img-plotgnu.gnuplot is a command file for fitting the edge data to an ellipse (alternative fit to the python code)
    • results.dat (or equivalent) has a listing of the final results

  • Set ALLOWTOPICVIEW =

-- DavidStokes - 17 Jan 2011

META FILEATTACHMENT attr="" autoattached="1" comment="xtracedrop2" date="1295297934" name="xtracedrop2.jpg" path="xtracedrop2.jpg" size="33521" user="Main.DavidStokes" version=""
META FILEATTACHMENT attr="" autoattached="1" comment="xtracedrop5" date="1295297988" name="xtracedrop5.jpg" path="xtracedrop5.jpg" size="18814" user="Main.DavidStokes" version=""
META FILEATTACHMENT attr="" autoattached="1" comment="xtracedrop3" date="1295297954" name="xtracedrop3.jpg" path="xtracedrop3.jpg" size="28150" user="Main.DavidStokes" version=""
META FILEATTACHMENT attr="" autoattached="1" comment="xtracedrop4" date="1295297971" name="xtracedrop4.jpg" path="xtracedrop4.jpg" size="37562" user="Main.DavidStokes" version=""
META FILEATTACHMENT attr="" autoattached="1" comment="xtracedrop1" date="1295297913" name="xtracedrop1.jpg" path="xtracedrop1.jpg" size="31967" user="Main.DavidStokes" version=""
META FILEATTACHMENT attr="" autoattached="1" comment="xtracedrop0" date="1295298584" name="xtracedrop0.jpg" path="xtracedrop0.jpg" size="28342" user="Main.DavidStokes" version=""
META FILEATTACHMENT attr="" autoattached="1" comment="drop images" date="1295298692" name="drop_demo.tgz" path="drop_demo.tgz" size="13380190" user="Main.DavidStokes" version=""
META FILEATTACHMENT attr="" autoattached="1" comment="xtracedrop.py" date="1295298020" name="xtracedrop.py.txt" path="xtracedrop.py.txt" size="21032" user="Main.DavidStokes" version=""
 
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding this intranet, Send feedback