-------------------------------------------
entry variable: $fmid -- overlay sigmoid threshold
-------------------------------------------
default: 1.1
keyboard adjust Linux: <Alt-i,I>  -- down/up 0.1
keyboard adjust Mac: <Cmd-i,I> -- down/up 0.1

Adjust position (in amplitude statistic units --
e.g., sqrt F-ratio) where color contrast sigmoid
changes the fastest (see "fslope" to adjust
contrast).  In double-ended scales, there are two
sigmoids at equal distances from zero.  Fmid is
effectively a soft threshold (setting fthresh
equal to fmid truncates lower half of sigmoid).

If an additional masking statistic has been read
in ($overlaymaskflag is set), two fmid entries
will appear (re-labeled "md"). The first is the
same as before (in amplitude units), and the
second is a soft threshold in mask statistic
units.

Details

Code outline for set real-valued color given
input: real, stat, bgcol:

  /* hard thresh on amplitude */
  if (fabs(ampl)<fthresh) {
    color = bgcol;
    return;
  }

  /* hard thresh if below stat */
  if (overlaymaskflag && fabs(stat)<sfthresh) {
    color = bgcol;
    return;
  }

  /* second sigmoid for soft stat thresh */
  real *=
   (1.0 + tanh(sfslope*(fabs(stat)-sfmid)))/2.0;

  /* use real to set hue (sigmoid here) */
  ...


Code outline for set complex-valued color given
input: real, imag, stat, bgcol

  /* get ampl,phase from real,imag */
  ampl = sqrt(real*real + imag*imag);
  phase = atan2(imag,real);

  /* hard thresh on amplitude */
  if (fabs(ampl)<fthresh) {
    color = bgcol;
    return;
  }

  /* hard thresh if below stat */
  if (overlaymaskflag && fabs(stat)<sfthresh) {
    color = bgcol;
    return;
  }

  /* first sigmoid for soft ampl thresh */
  ampl = (1.0 + tanh(fslope*(ampl-fmid)))/2.0;

  /* second sigmoid for soft stat thresh */
  if (statmaskampflag)
    ampl *= (1.0 + tanh(sfslope*(stat-sfmid)))/2.0;

  /* use ampl to set saturation */
  ...

  /* use phase to set hue */
  ...
