Estimating gas volume from headspace pressure in a batch culture system