@Override public final Calibrator createCalibrator(int i) throws IOException { final SequenceData coefficientsSequence = provider.getCalibrationCoefficients(i); final CompoundData coefficients = coefficientsSequence.getCompound(channelIndex); final double slope = coefficients.getInt(0) * slopeScaleFactor; final double intercept = coefficients.getInt(1) * interceptScaleFactor; return new CoefficientCalibrator(this, slope, intercept); }
protected AbstractCalibratorFactory(int channelIndex, CalibrationCoefficientsProvider provider) { this.channelIndex = channelIndex; this.provider = provider; slopeScaleFactor = provider.getSlopeScaleFactor(); interceptScaleFactor = provider.getInterceptScaleFactor(); }