if (this.autofmin) {
        //initially sets minimum as 1/2 of current value, otherwise update it
        if (!this.afminset) {
          this.fmin = x*0.9;
          this.afminset = true;