working version of rayleigh_fit and read_ascii.