extract.power: Analyze the power trace and extract the work

Description Usage Arguments Details Value Author(s) See Also

View source: R/EnergyAnalysis.R

Description

Computes the Cohen's d and Hedges'g effect size statistics.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
extract.power(data,
              t.sampling,
              N=30,
              marker.length=5,
              marker.tolerance=0.25,
              cutoff = min(40, 1/t.sampling),
              adjust = 2,
              peakspan = 69,
              intermediate=FALSE,
              include.rawdata=FALSE,
              baseline = "gmin")

Arguments

data

the power levels measured during the experiment

t.sampling

sampling period (in seconds)

N

number of work unit repetitions (default 30)

marker.length

marker pulse width can be expressed either as number of samples or in terms of duration (seconds). If the value is smaller than 10 it is assumed to be in seconds otherwise it is the number of samples

marker.tolerance

marker width tolerance as a percentage

cutoff

Cut-off frequency used to smooth down the samples and identify the markers, it is expressed in Hz (default: min between 40 Hz and sampling frequency)

adjust

density function smoothing parameter (default=2)

peakspan

width of peak detection (default=69)

intermediate

returns intermediate computations results

include.rawdata

should rawdata be included in the results

baseline

define how the baseline power is computed, see details below

Details

The function first identifies the markers in the power trace and after that – as a consequence – it finds the work units between the markers.

Starting from the work units, using the function effective.power the effective power of the work units is computed. The argument baseline is passed to that function, see effective.power for the possible values and meaning.

Value

A list of class EnergyAnalysis containing the following components:

t

sampling period

n

number of samples

work

a data frame containing the information about the work units with the following columns:

start: the initial sample
end: the final sample
duration: the duration (in sec)
P.real: the mean power
P.idle.left: the mean power in the pause phase preceding the work unit
P.idle.right: the mean power in the pause phase following the work unit
P: the effective power
E: the effective energy consumed
P

a numeric array containing the power trace values, included only if include.rawdata is TRUE

P.samples

a data frame containing the sampled elements of the original trace and the corresponding times if include.rawdata is FALSE

Author(s)

Marco Torchiano http://softeng.polito.it/torchiano/

See Also

effective.power


SoftengPoliTo/powtran documentation built on April 16, 2020, 1:47 a.m.