ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/osprai/osprai/trunk/cal_module.py
(Generate patch)
# Line 2 | Line 2
2   cal: Calibration module for SPRI data in a ba class.
3   Christopher Lausted, Institute for Systems Biology,
4   OSPRAI developers
5 < Last modified on 100426 (yymmdd)
5 > Last modified on 101116 (yymmdd)
6  
7   Example:
8   #import cal_module as cal
# Line 82 | Line 82
82      ## End of copyinterval().
83  
84  
85 + def zerotime(ba):
86 +    """Adjust sensorgrams to start at time[0]=0."""
87 +    for roi in ba.roi:
88 +        if (len(roi.time) > 0):
89 +            roi.time -= roi.time[0]
90 +    return
91 +    ## End of zerotime().
92 +    
93 +    
94 + def zerovalue(ba):
95 +    """Adjust sensorgrams to start at value[0]=0."""
96 +    for roi in ba.roi:
97 +        if (len(roi.value) > 0):
98 +            roi.value -= roi.value[0]
99 +    return
100 +    ## End of zerovalue().
101 +
102   ################################# End of module #################################

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines