double scale = yError/this.weightsMean;
for(int i=0; i<this.nAnalyteConcns; i++)sWeights[i] = weights[i]*scale;
if(this.weightsEntered && !monoCheck){
// linear interpolation if weights are non-monotonic or have big jumps
LinearInterpolation liee = new LinearInterpolation(this.analyteConcns, sWeights);
for(int i=0; i<this.nWorking; i++)ee[i] = Math.abs(liee.interpolate(xx[i]));
}
else{
// cubic spline interpolation if weights are monotonic without big jumps
CubicSpline csee = new CubicSpline(this.analyteConcns, sWeights);
for(int i=0; i<this.nWorking; i++)ee[i] = Math.abs(csee.interpolate(xx[i]));