if (data->lambda0 < 0)
  data->lambda = pow(10,floor(log10(Sk_new/(2*nrobs))));
else
  data->lambda = data->lambda0;