code: function pulseCorrection(pulses, timespanSource, timespanTarget, gainA, gainB, offTot, offNoise) {
  
      if (pulses == 0) {
          return pulses;
      }
  
      var corrected = 0;
      var value = pulses / timespanSource;
      //console.log("pulses per sec", value);
      var out = timespanTarget * (((Math.pow(value + offNoise, 2) * gainB) + ((value + offNoise) * gainA)) + offTot);
      //console.log("pulses per sec after correction:", out);
      return out;
  
  }
docs: power functions