class StepModelFit extends StepModel {

    @Override
    public double getValue() {

        // no possible increments where supplied
        // or no region defined
        if (steps == null || scale == null || !scale.isDefined())
            return super.getValue();

        double curStep = steps[0];
        double oldDistance = Math.abs((scale.length().doubleValue() / curStep)-super.getValue() );

        // determine which step size comes closest to the desired number of steps
        // since steps[] is a small array brute force search is ok
        for (double step : steps) {

            double newDistance = Math.abs((scale.length().doubleValue() / step)-super.getValue() );

            // closer than previous stepping?
            if (newDistance < oldDistance){
                curStep = step;
                oldDistance = newDistance;
            }
        }
        return curStep;
    }

    public  StepModelFit(Region axisRegion, double[] increments, double numLines);

}