curve fitting n0, r0