Map energy measurements into scala.Arrays of scala.Doubles, and
separate the data into measurement Runs based on the idleThresh
threshold.
Map energy measurements into scala.Arrays of scala.Doubles, and
separate the data into measurement Runs based on the idleThresh
threshold.
An average over half a second is calculated from each half a second period of the data.
If such an average is above idleThresh
, values in the period and after it are considered a measurement run.
When the average drops below idleThresh
, the run is considered finished. Periods of averages of less than idleThresh
are skipped.
the SparkContext used to execute the task.
data file path. Assumed to contain a text file with lines of the form
num, secs, mA, V
where num is an integer measurement number, secs is the time in seconds since measurement was started, mA the current in milliAmperes, and V is the voltage in Volts. Example:
1, 0.000, 350, 3.95 2, 0.002, 342, 3.96 ...
The threshold to compare half a second averages against, and detect activity.
Main program entry point.
Main program entry point. runs detectRuns
and saves the result as a file called "temp" in the current directory.
Calculate total energy of an entire measurement file using the deprecated tuple-based MeasurementRunRDD class.
A class that shows some energy data processing facilities, such as calculation of total energy consumed during an energy measurement experiment, detection of interesting peaks or periods of activity from energy data, and saving statistics of these runs into a file.
Usage: