Method for determining the composition of a homogeneous fluid, for example a petroleum effluent on flow, an emulsion consisting of water and oil, or a foam consisting of oil and gas.