Optical method for determining the frequency response of pressure-measurement systems in respiratory mechanics