Condition for single-frequency emission from short gas lasers