Characterization and optimization of a flash-X-ray source for diagnostic of dense sprays