f0=1.;
a0=0.05;
x0=0.5;
xw=0:0.01:1;
f=-f0./(1+exp((-xw+x0)./a0));

f1=ncum98(1,1)-ncum98(1,np98);
a1=0.17;
x1=-6.1;
xw1=-7.5:0.01:-4.5;
ff=-f1./(1+exp((-xw1+x1)./a1))+1.25e-6;
test=log10(ff);