diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2011-02-21 17:22:14 -0500 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2011-02-21 17:22:14 -0500 |
commit | 22e1c3b33984da853d1403843d9d2ce7a596c335 (patch) | |
tree | 060dc919c203fcd307eaff3d6221e018b1028acf | |
parent | 4c71aaaebec1cb9a05923c085503571f95016cc0 (diff) |
support application of the standard deviation filter
-rwxr-xr-x | oplot.py | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -29,6 +29,9 @@ options = [ | |||
29 | o('-n', '--normalize', action='store_true', dest='normalize', | 29 | o('-n', '--normalize', action='store_true', dest='normalize', |
30 | help='use normalize counts'), | 30 | help='use normalize counts'), |
31 | 31 | ||
32 | o('-d', '--stdev', action='store_true', dest='use_std', | ||
33 | help='use standard devation filter'), | ||
34 | |||
32 | o('-c', '--cut-off', action='store', dest='cutoff', type='int', | 35 | o('-c', '--cut-off', action='store', dest='cutoff', type='int', |
33 | help='max number of samples to use'), | 36 | help='max number of samples to use'), |
34 | 37 | ||
@@ -57,6 +60,7 @@ defaults = { | |||
57 | 'extent' : 3, | 60 | 'extent' : 3, |
58 | 'cutoff' : None, | 61 | 'cutoff' : None, |
59 | 'normalize' : False, | 62 | 'normalize' : False, |
63 | 'use_std' : False, | ||
60 | 64 | ||
61 | # formatting options | 65 | # formatting options |
62 | 'binsize' : 0.25, | 66 | 'binsize' : 0.25, |
@@ -170,8 +174,9 @@ class OverheadPlotter(defapp.App): | |||
170 | 174 | ||
171 | data, max_idx, min_idx, iqr_max, iqr_min = get_data(datafile, | 175 | data, max_idx, min_idx, iqr_max, iqr_min = get_data(datafile, |
172 | scale, | 176 | scale, |
173 | self.options.extent, | 177 | extent=self.options.extent, |
174 | self.options.cutoff) | 178 | cutoff=self.options.cutoff, |
179 | stdev=self.options.use_std) | ||
175 | 180 | ||
176 | samples = data[min_idx:max_idx] | 181 | samples = data[min_idx:max_idx] |
177 | discarded = (len(data) - len(samples)) / float(len(data)) * 100 | 182 | discarded = (len(data) - len(samples)) / float(len(data)) * 100 |