ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/osprai/osprai/trunk/test.py
(Generate patch)
# Line 1 | Line 1
1   """
2   Christopher Lausted, Institute for Systems Biology
3 < Last modified on 100422 (yymmdd)
3 > Last modified on 100425 (yymmdd)
4   Small script to test ba_class, io_module, etc.
5   """
6  
# Line 27 | Line 27
27   roi0 = ba0.roi[0]
28   roi0.time = np.arange(300, dtype=float)  ## Samples every 1 second.
29   roi0.value = np.zeros(300, dtype=float) + 20  ## Baseline signal is 20 units.
30 < roi0.params = {'t1': {'value':30.0, 'min':60.0, 'max':60.0, 'fixed':True} }
30 > roi0.params = {'t1': {'value':30.0, 'min':30.0, 'max':30.0, 'fixed':True} }
31   roi0.params['rmax'] =  {'value': 100.0}
32   roi0.params['conc'] =  {'value': 1e-6}
33   roi0.params['kon'] =   {'value': 2e4}
# Line 41 | Line 41
41   print "Testing the fitting..."
42   ba1 = deepcopy(ba0)
43   roi0 = ba1.roi[0]
44 < roi0.params['koff'] = {'value':0.1, 'min':1e-10, 'max':1e10, 'fixed':False}
45 < roi0.params['kon'] =  {'value':0.1, 'min':1e-10, 'max':1e10, 'fixed':False}
46 < roi0.params['rmax'] =  {'value':150, 'min':150, 'max':150, 'fixed':True}
47 < fit.lma(roi0)
44 > roi0.params['koff'] = {'value':1.0e-2, 'min':1e-8, 'max':1e-1, 'fixed':False}
45 > roi0.params['kon'] =  {'value':1.0e2, 'min':1e1, 'max':1e8, 'fixed':False}
46 > roi0.params['rmax'] =  {'value':50, 'min':1, 'max':90, 'fixed':False}
47 > fit.clma(roi0)
48   roi0.value =roi0.model(roi0.time, roi0.value, roi0.params)
49   vu.dualgraph(ba0, ba1, "Fitted Data with an incorrect Rmax parameter")
50   exit()

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines