private static double estimateBias(double E, byte w) {
    int idx = (int)(w - MIN_P);
    double[] red = rawEstimateData[idx];
    double[] bd = biasData[idx];
    if(E <= red[0]) {
      return bd[0];
    }
    if(E > red[red.length - 1]) {
      return 0.0;
    }
    for(int i = 0; i < red.length - 2; i++) {
      if(red[i] < E && E < red[i + 1]) {
        double slope = (bd[i + 1] - bd[i])/(red[i + 1] - red[i]);
        double intercept = bd[i + 1] - (slope * red[i + 1]);
        return (slope * E) + intercept;
      }
    }
    return 0.0;
  }