Determination of grain size distributions in thin films