fixed group velocity calculation