Skip to content

Commit f3abd78

Browse files
Jason LeakeJason Leake
Jason Leake
authored and
Jason Leake
committed
Move filename array
1 parent 2421bb4 commit f3abd78

File tree

1 file changed

+26
-28
lines changed

1 file changed

+26
-28
lines changed

ax3_plot_minutes.py

+26-28
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,30 @@ def _plot(self, data, index, xlines, title, startEpoch,
8787
plt.close()
8888
return outputfile
8989

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+
90114
def __call__(self, filename, controlFile=None, showtime=False,
91115
ymin=None, ymax=None, selectedPlot=None, grid=False):
92116
"""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,
150174
"RMS of tot acceleration over minute",
151175
"std dev of tot acceleration over minute"]
152176

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+
181179
# All the interesting stuff happens in the first few mins in
182180
# some datasets. This is the code for producing plots which
183181
# are limited and annotated by the optional config file

0 commit comments

Comments
 (0)