amp   = pList[0];
alpha = pList[1];

if (alpha < 0.0001)
   {
    alpha = 0.0001; /* Prevent divide by zero. */
   };

for( i = 0; i < xyCount; i++ )
   {
    msec     = xList[i];
    yList[i] = amp*exp( -msec/alpha );
   }

if (reportFlag)
   {
    char outName[80];

    (void) sprintf( outName, "gnu/fit%.0f.gnu", id );

    fd = dOpen( outName, "w" );

    (void) fprintf( fd, "amp   = %f\n", amp );
    (void) fprintf( fd, "alpha = %f\n", alpha );
    (void) fprintf( fd, "s(x)  = amp*exp( -x/alpha )\n" );
 
    (void) fprintf( fd, "set title \"ID: %.0f", id );
    (void) fprintf( fd, " Ass: " );
    (void) fprintf( fd, ass );
    (void) fprintf( fd, " Amp: %.4f +/- %.4f", amp, eList[0] ); 
    (void) fprintf( fd, " Alpha: %.3f +/- %.3f", alpha, eList[1] ); 
    (void) fprintf( fd, " WRMS: %.4f\"", sqrt(lsRes/xyCount) );
    (void) fprintf( fd, "\n" );

    (void) fprintf( fd, "set xlabel \"msec\"\n" );
    (void) fprintf( fd, "set yrange [0:1.1]\n" );
    (void) fprintf( fd, "set term postscript\n" );
    (void) fprintf( fd, "set output \"plot/fit%.0f.ps\"\n", id );

    (void) fprintf( fd, "plot \"txt/fit%.0f.txt\" w errorbars,", id );
    (void) fprintf( fd, " s(x) title \"exp( -t/alpha )\" w lines\n" );

    (void) dClose( fd );
   };
