@@ -87,6 +87,30 @@ def _plot(self, data, index, xlines, title, startEpoch,
87
87
plt .close ()
88
88
return outputfile
89
89
90
+ def fileTitles (self ):
91
+ """ Return list of file title components. If empty, no plot should be produced
92
+ """
93
+ # Order of fields is MPRS
94
+ return [ "" ,
95
+ "" ,
96
+ "" ,
97
+ "mean_x" ,
98
+ "peak_to_peak_x" ,
99
+ "rms_x" ,
100
+ "std_dev_x" ,
101
+ "mean_y" ,
102
+ "peak_to_peak_y" ,
103
+ "rms_y" ,
104
+ "std_dev_y" ,
105
+ "mean_z" ,
106
+ "peak_to_peak_z" ,
107
+ "rms_z" ,
108
+ "std_dev_z" ,
109
+ "mean_total" ,
110
+ "peak_to_peak_total" ,
111
+ "rms_total" ,
112
+ "std_dev_total" ]
113
+
90
114
def __call__ (self , filename , controlFile = None , showtime = False ,
91
115
ymin = None , ymax = None , selectedPlot = None , grid = False ):
92
116
"""Process a CSV file of per-minute data as produced by ax3_stats.py.
@@ -150,34 +174,8 @@ def __call__(self, filename, controlFile=None, showtime=False,
150
174
"RMS of tot acceleration over minute" ,
151
175
"std dev of tot acceleration over minute" ]
152
176
153
- # These are the titles of the graphics files. Empty string
154
- # means no file is produced. Each file plots minutes against
155
- # the CSV field corresponding to the current index into this
156
- # array. e.g. mean_x is index 3, so the mean_x file plots
157
- # minutes against (zero based) column #3, which is the mean x
158
- # values per minute
159
-
160
- # Order of fields is MPRS
161
- fileTitle = [ "" ,
162
- "" ,
163
- "" ,
164
- "mean_x" ,
165
- "peak_to_peak_x" ,
166
- "rms_x" ,
167
- "std_dev_x" ,
168
- "mean_y" ,
169
- "peak_to_peak_y" ,
170
- "rms_y" ,
171
- "std_dev_y" ,
172
- "mean_z" ,
173
- "peak_to_peak_z" ,
174
- "rms_z" ,
175
- "std_dev_z" ,
176
- "mean_total" ,
177
- "peak_to_peak_total" ,
178
- "rms_total" ,
179
- "std_dev_total" ]
180
-
177
+ fileTitle = self .fileTitles ()
178
+
181
179
# All the interesting stuff happens in the first few mins in
182
180
# some datasets. This is the code for producing plots which
183
181
# are limited and annotated by the optional config file
0 commit comments