ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/osprai/osprai/trunk/test.py
Revision: 14
Committed: Wed Apr 14 00:40:11 2010 UTC (9 years, 2 months ago) by clausted
File size: 1320 byte(s)
Log Message:
Added features to select time points for measuring binding responses and to output that data to a file or scatterplot.  Added the background subtraction feature to cal_module.  Also a few bug fixes. --CGL
Line User Rev File contents
1 clausted 7 """
2     Christopher Lausted, Institute for Systems Biology
3 clausted 14 Last modified on 100413 (yymmdd)
4 clausted 7 Small script to test ba_class, io_module, etc.
5     """
6    
7 clausted 11 ## Import modules.
8     import vu_module as vu
9 clausted 7 import io_module as io
10 clausted 12 import cal_module as cal
11 clausted 11 ## Reload in case code has changed.
12     reload (vu)
13     reload(io)
14 clausted 12 reload(cal)
15 clausted 7
16 clausted 14 print "Loading an SPR data file..."
17 clausted 11 #ba1 = io.readbiosensor("example-biosensor.txt")
18     ba1 = io.readicmtxt("example-icm.txt")
19 clausted 9 #ba1 = io.readsprit("example-sprit.txt")
20     #ba1 = io.applykey(ba1, "example-key.tsv")
21 clausted 11 #ba1.set_plot_all()
22     #ba1.set_plot_list(range(6))
23     #ba1.plot()
24 clausted 7
25     #io.writesprit(ba1,"testwritesprit.txt")
26     #io.writeclamp(ba1,"testwriteclamp.txt")
27 clausted 11 #io.writebiosensor(ba1, "testwritebiosensor.txt")
28 clausted 7
29 clausted 14 print "Plotting the raw data file..."
30 clausted 11 vu.linegraph(ba1)
31 clausted 12 #vu.dotgraph(ba1)
32     #vu.dualgraph(ba1, ba1)
33 clausted 11
34 clausted 14 print "Plotting the calibrated data..."
35     ba2 = cal.calibrate(ba1, ba1, 2850, 3120)
36     vu.linegraph(ba2, "Calibrated SPR Data")
37 clausted 12
38 clausted 14 print "Use ROI #16 as background, subtract, and plot..."
39     cal.bgset(ba2, 16)
40     ba2 = cal.bgsubt(ba2)
41     vu.linegraph(ba2, "Calibrated & Referenced SPR Data")
42    
43     print "Test of scatterplot using time points 500, 1000, 1500, 2000"
44     vu.scatterplot(ba2, 3600, 4200, 3600, 4700, "Scatterplot")
45    
46     print "Done with test."
47     #input("Done with test. Press any key")