function subtractBaseline(baseline, average) {
    let absBaseline = Math.abs(mathFunctions.getAverage(baseline));
    let result;
    if (average > 0) {
        result = average - absBaseline;
    } else {
        result = average + absBaseline;
    }
    return result;
}
/**
 * returns average minus baseline averages for one Channel Data
 *
 */
returns average minus baseline averages for one Channel Data
returns average minus baseline averages for one Channel Data
function subtractBaseline(baseline, average) {
    let absBaseline = Math.abs(mathFunctions.getAverage(baseline));
    let result;
    if (average > 0) {
        result = average - absBaseline;
    } else {
        result = average + absBaseline;
    }
    return result;
}
function subtractBaseline ( baseline , average ) { let absBaseline = Math . abs ( mathFunctions . getAverage ( baseline ) ) ; let result ; if ( average > 0 ) { result = average - absBaseline ; } else { result = average + absBaseline ; } return result ; }
returns average minus baseline averages for one Channel Data
returns average minus baseline averages for one Channel Data